GHC-6.2 and Template Haskell on OS X

Gregory Wright gwright at
Thu Jan 29 10:57:07 EST 2004


I have a question about ghc-6.2 and template haskell on  Mac OS X. I 
it's a ghc configuration or build issue, so I'm posting here instead of 
the TH list.

I have ghc-6.2 built under darwinports. This uses a 6.0.1 binary to 
bootstrap the
6.2 build. I haven't updated the binary bootstrap compiler because it 
to work under both Jaguar (10.2.x) and Panther (10.3.x). The portfile 
builds ghc-6.2
with the command 'make all'. The resulting ghc-6.2 has worked fine 
until I tried to
build a program using TH. I tried to build the simplest example--the 
one in the
User's guide-- and it failed with:

 > ghc --make -fth main.hs -o main
Chasing modules from: main.hs
Compiling Printf           ( ./Printf.hs, ./Printf.o )

./Printf.hs:23: Type constructor or class not in scope: `Expr'

./Printf.hs:26: Variable not in scope: `string'

./Printf.hs:30: Type constructor or class not in scope: `Expr'

This must be a simple problem. The other thing to note about the 
build is that it stages the installation into a temporary directory so 
it can do an
inventory of the files that will be installed. If a path in the staging 
directory gets
compiled in, instead of the final installation directory, all manner of 
can result.

Any one have any ideas? The answer is probably staring me in the face 
I'm not able to see it.

Best Wishes,


Gregory Wright
Antiope Associates LLC
18 Clay Street
Fair Haven, New Jersey 07704

gwright at

More information about the Glasgow-haskell-users mailing list