Building snapshot ghc-5.05.20030123 on macOSX
I want to play a bit with Template Haskell, so I downloaded a cvs snapshot (ghc-5.05.20030123.tar.gz) and tried to compile it on my mac (OSX 10.2). I figured out that I needed a stage2 or stage3 compiler to get TH working, so I tried 'make stage3' . GHC started to compile itself three times. At lot of hours later it finished. Unfortunately, when I tried run the thing on a Prinf example, I got the following message. compiler/stage3- ./ghc-inplace -c Printf.hs -fglasgow-exts -package haskell-src Template Haskell bracket illegal in a stage-1 compiler [| \s - s |] The thing incompiler/stage3 was just a stage-1 compiler, so ghc had achieved nothing useful after re-compiling three times :-( The problem is that GHCi support is not turned on for MacOSX. I guess GHCi is used to do compile-time evaluation of code for TH. In file mk/config.mk.in it says: # Include GHCi in the compiler. Default to NO for the time being. ifneq $(findstring $(HostOS_CPP), mingw32 cygwin32 linux solaris2 freebsd netbsd openbsd) GhcWithInterpreter=YES else GhcWithInterpreter=NO endif In the list of supported systems MacOSX is missing. After adding darwin to this list, and waiting for hours, I got a working TH-compiler. Can someone add OSX(darwin) to the mk/config.mk.in file? It would also be nice to get a warning if one tries to compile a stage-(N1) compiler without GHCi support. Cheers, Arthur ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: Building snapshot ghc-5.05.20030123 on macOSX
This is usually caused by not separating out the template haskell code from the normal haskell code. The compiler needs to see them in separate files. On Wednesday 12 February 2003 12:06 pm, Arthur Baars wrote: I want to play a bit with Template Haskell, so I downloaded a cvs snapshot (ghc-5.05.20030123.tar.gz) and tried to compile it on my mac (OSX 10.2). I figured out that I needed a stage2 or stage3 compiler to get TH working, so I tried 'make stage3' . GHC started to compile itself three times. At lot of hours later it finished. Unfortunately, when I tried run the thing on a Prinf example, I got the following message. compiler/stage3- ./ghc-inplace -c Printf.hs -fglasgow-exts -package haskell-src Template Haskell bracket illegal in a stage-1 compiler [| \s - s |] The thing incompiler/stage3 was just a stage-1 compiler, so ghc had achieved nothing useful after re-compiling three times :-( The problem is that GHCi support is not turned on for MacOSX. I guess GHCi is used to do compile-time evaluation of code for TH. In file mk/config.mk.in it says: # Include GHCi in the compiler. Default to NO for the time being. ifneq $(findstring $(HostOS_CPP), mingw32 cygwin32 linux solaris2 freebsd netbsd openbsd) GhcWithInterpreter=YES else GhcWithInterpreter=NO endif In the list of supported systems MacOSX is missing. After adding darwin to this list, and waiting for hours, I got a working TH-compiler. Can someone add OSX(darwin) to the mk/config.mk.in file? It would also be nice to get a warning if one tries to compile a stage-(N1) compiler without GHCi support. Cheers, Arthur ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users -- Seth Kurtzberg M. I. S. Corp. 480-661-1849 [EMAIL PROTECTED] ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: Building snapshot ghc-5.05.20030123 on macOSX
Can someone add OSX(darwin) to the mk/config.mk.in file? Done. I had it enabled in my build.mk file and I hadn't noticed that it wasn't yet on by default. Sorry for wasting your time. Cheers, Wolfgang ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users