Re: GHC 6.8.1 on Mac OS X 10.5 (Leopard)

2007-11-19 Thread Christian Maeder
Ian Lynagh wrote: On Sat, Nov 17, 2007 at 03:02:55PM +, C.M.Brown wrote: Is there a way for GHC on OS X to find where it was run from, so that it can find package.conf? The command: ghc --print-libdir should do it. But the way that knows what to print on unix machines is that ghc is

Re: GHC 6.8.1 on Mac OS X 10.5 (Leopard)

2007-11-19 Thread Christian Maeder
Manuel M T Chakravarty wrote: this year are discharged (ie, in about two weeks). Secondly, the really unsatisfactory thing about frameworks for readline and gmp is that it entails that programs compiled with GHC will also depend on at least the GMP framework. I'd really like to have a

Re: GHC 6.8.1 on Mac OS X 10.5 (Leopard)

2007-11-19 Thread Simon Marlow
Christian Maeder wrote: Ian Lynagh wrote: On Sat, Nov 17, 2007 at 03:02:55PM +, C.M.Brown wrote: Is there a way for GHC on OS X to find where it was run from, so that it can find package.conf? The command: ghc --print-libdir should do it. But the way that knows what to print on unix

Re: GHC 6.8.1 on Mac OS X 10.5 (Leopard)

2007-11-19 Thread Christian Maeder
Simon Marlow wrote: Christian Maeder wrote: Ian Lynagh wrote: On Sat, Nov 17, 2007 at 03:02:55PM +, C.M.Brown wrote: Is there a way for GHC on OS X to find where it was run from, so that it can find package.conf? The command: ghc --print-libdir should do it. But the way that knows

Re: GHC 6.8.1 on Mac OS X 10.5 (Leopard)

2007-11-19 Thread Alfonso Acosta
On Nov 19, 2007 10:35 AM, Simon Marlow [EMAIL PROTECTED] wrote: pwd gives you the directory that the script was invoked *from*, not the directory in which the script resides. This is a common problem on Unix: there's no general way to find out the location of a binary. Well, you can always

Re: GHC 6.8.1 on Mac OS X 10.5 (Leopard)

2007-11-19 Thread Alfonso Acosta
On Nov 19, 2007 10:51 AM, Alfonso Acosta [EMAIL PROTECTED] wrote: Well, you can always combine the first argument of the script ($0) for absolute paths and combine it with with pwd for relative ones. I meant _use_ the first argument of the script ($0) for absolute paths and combine it with pwd

Re: GHC 6.8.1 on Mac OS X 10.5 (Leopard)

2007-11-19 Thread Christian Maeder
Alfonso Acosta wrote: On Nov 19, 2007 10:51 AM, Alfonso Acosta [EMAIL PROTECTED] wrote: Well, you can always combine the first argument of the script ($0) for absolute paths and combine it with with pwd for relative ones. I meant _use_ the first argument of the script ($0) for absolute paths

Re: GHC 6.8.1 on Mac OS X 10.5 (Leopard)

2007-11-19 Thread Simon Marlow
Christian Maeder wrote: Alfonso Acosta wrote: On Nov 19, 2007 10:51 AM, Alfonso Acosta [EMAIL PROTECTED] wrote: Well, you can always combine the first argument of the script ($0) for absolute paths and combine it with with pwd for relative ones. I meant _use_ the first argument of the script

Re: GHC 6.8.1 on powerpc OS X 10.5

2007-11-19 Thread Simon Marlow
[EMAIL PROTECTED] wrote: There are two possible avenues to proceed along. The first is to figure out from the crashing stage2 compiler what is going wrong to cause the segfault. I bet it would be easier to find a smaller program that crashes. Start from hello world, or try the programs in

Re: GHC 6.8.1 on Mac OS X 10.5 (Leopard)

2007-11-19 Thread Alfonso Acosta
Simon, as usual, is right. It's been quite a while since I last seriously coded in C. From the exec* man page: The first argument, *by convention*, should point to the file name associated with the file being executed. However, if nothing better is found I guess it's better to rely on an

Re: GHC 6.8.1 on Mac OS X 10.5 (Leopard)

2007-11-19 Thread Christian Maeder
An additional sanity check of topdir makes sense then. Christian Alfonso Acosta wrote: Simon, as usual, is right. It's been quite a while since I last seriously coded in C. From the exec* man page: The first argument, *by convention*, should point to the file name associated with the file

ghc/haskell tool registry (was: GHC 6.8.1 on Mac OS X 10.5 (Leopard))

2007-11-19 Thread Claus Reinke
may i suggest a different approach? most shells have commands to list programs in PATH beyond the first match, such as 'whereis ssh', 'which -a ssh', or 'type -a ssh'. now, this won't help directly because the ghc tool in question might not be on the PATH. but as this issue is so widespread,

The order if bindings generated by GHC

2007-11-19 Thread Victor Nazarov
I use STG-bindings generated by GHC during CoreToSTG phase. What is the order of this bindings is it random or does it correspond to original source code or does it reflect the dependency structure of the program? If I define the following in my program: data Numeral = Zero | Succ Numeral zero =

RE: The order if bindings generated by GHC

2007-11-19 Thread Simon Peyton-Jones
You probably want -ddump-simpl to print Core Yes, the bindings should be in dependency order. They certainly seem to be for me Simon Foo.hs data Numeral = Zero | Succ Numeral zero = Zero one = Succ zero ten = Succ one ghc -c -ddump-stg -ddump-simpl Foo.hs Tidy Core

Re: GHC 6.8.1 on Mac OS X 10.5 (Leopard)

2007-11-19 Thread Deborah Goldsmith
If you want to get the path to the main executable on Mac OS X, use _NSGetExecutablePath. See: man 3 dyld Deborah On Nov 19, 2007, at 4:07 AM, Christian Maeder wrote: An additional sanity check of topdir makes sense then. Christian Alfonso Acosta wrote: Simon, as usual, is right. It's

Re: The order if bindings generated by GHC

2007-11-19 Thread jerzy . karczmarczuk
Simon Peyton-Jones writes: Yes, the bindings should be in dependency order. They certainly seem to be for me Simon I always - naively - thought that it is a non-problem. How many times have I written stuff like that:... ping = 0 : pong pong = 1 : ping It seems that I don't understand

Re: The order if bindings generated by GHC

2007-11-19 Thread Victor Nazarov
On Nov 19, 2007 9:39 PM, [EMAIL PROTECTED] wrote: I always - naively - thought that it is a non-problem. How many times have I written stuff like that:... ping = 0 : pong pong = 1 : ping It seems that I don't understand the question of Victor Nazarov, nor the answer of SPJ... This is

The order if bindings generated by GHC

2007-11-19 Thread Victor Nazarov
STG syntax: Foo.zero = NO_CCS Foo.Zero! []; SRT(Foo.zero): [] Foo.one = NO_CCS Foo.Succ! [Foo.Zero]; SRT(Foo.one): [] Foo.ten = NO_CCS Foo.Succ! [Foo.one]; SRT(Foo.ten): [] Foo.Zero = NO_CCS Foo.Zero! []; SRT(Foo.Zero): [] Foo.Succ = \r [eta_s68]

Re: The order if bindings generated by GHC

2007-11-19 Thread jerzy . karczmarczuk
I wrote about binding order: I always - naively - thought that it is a non-problem. How many times have I written stuff like that:... ping = 0 : pong pong = 1 : ping It seems that I don't understand the question of Victor Nazarov, nor the answer of SPJ... This is the question about

Re: GHC 6.8.1 on Mac OS X 10.5 (Leopard)

2007-11-19 Thread Manuel M T Chakravarty
Deborah Goldsmith wrote, If you want to get the path to the main executable on Mac OS X, use _NSGetExecutablePath. See: man 3 dyld That's exactly what we need. The man page is on the web for those without a mac: