
Simon Marlow on 2007-05-29 16:05:49 +0100:
Ben Sinclair wrote:
Hello, I've had a problem with GHC.Prim when compiling the darcs HEAD lately. When I compile it in the normal way with no special options
sh boot && ./configure && make && make install
It works for me, with last night's HEAD build. Are you running GHC from the build tree, or installing it first? (not that it ought to make a difference). If you say 'ghc-pkg describe base', does it list GHC.Prim as exposed?
I built a clean HEAD from today and installed it with 'make install'. It works well enough to compile libraries like zlib and binary as well as applications like xmonad. When I try to compile the example file Ben gave using the installed ghc, it fails as Ben described - no GHC.Prim. 'ghc-pkg describe base' does not list GHC.Prim as exported, even though base's cabal file does. When I use the GHC from the build tree, it compiles fine.
While importing GHC.Prim should work, the right way is to import GHC.Exts instead.
GHC.Exts doesn't appear to export unsafeCoerce#, which hs-plugins and gtk2hs both want.