Definitely not too early! Your code is quite ok (contrary to Ian L's rejoinder). But GHC was broken.
I've fixed it now... your program works fine. Simon | -----Original Message----- | From: Bryn Keller [mailto:[EMAIL PROTECTED]] | Sent: 31 December 2002 23:46 | To: [EMAIL PROTECTED] | Subject: TH segfault | | Hi folks, | | Maybe it's too early to start reporting problems for Template Haskell, | but here's a simple example that causes the compiler to segfault if | anyone's interested: | | [brk@brk haskell]$ ghc --make -fglasgow-exts -package haskell-src | metatest.hs | Chasing modules from: metatest.hs | Compiling Splices ( Splices.hs, ./Splices.o ) | Compiling Main ( metatest.hs, ./metatest.o ) | Loading package base ... linking ... done. | Loading package haskell98 ... linking ... done. | Loading package haskell-src ... linking ... done. | Segmentation fault | [brk@brk haskell]$ | | This is on RedHat 8, Pentium III-500, using ghc built from cvs pull from | December 30th at about 4pm PST. | | The TH sample from the users guide builds and runs fine. | | Thanks, | | Bryn | | | {- metatest.hs -} | import Splices | | main = do | print $(len "foo") | | | | {- Splices.hs -} | | module Splices where | | import Language.Haskell.THSyntax | | len s = [| length s |] | | _______________________________________________ | Cvs-ghc mailing list | [EMAIL PROTECTED] | http://www.haskell.org/mailman/listinfo/cvs-ghc _______________________________________________ Cvs-ghc mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/cvs-ghc
