
Martin Grabmueller wrote:
Following up to myself:
Martin Grabmueller wrote:
Hello all,
I've been playing around with GHC-as-a-library a bit now, and using yesterday's snapshot of GHC (ghc-6.5.20061004, compiled from source), I ran into the following problem:
[...]
In following a suggestion by Mathew Mills, I tried to find out whether there was a problem with GHC finding my package.conf file (since I had previously a problem with ghc-pkg to set permissions wrong on that file, I thought GHC was possibly unable to read it).
When trying it again with a GHC fresh from darcs HEAD, I get a different error message. The loading via GHC.load works find, but when calling GHC.checkModule, the following error message is displayed, and no renamed or typechecked program is returned by GHC.checkModule, only the parsed one:
Test.hs:1:0: Bad interface file: /usr/local/ghc/lib/ghc-6.5/imports/Prelude.hi Prelude.Enum.Bool.toEnum: bad argument
Has anyone else encountered this problem? Are others out there successfully using GHC as a library?
I haven't seen this particular error message before, would you like to submit a bug report detailing the exact steps you took and the code you used to call the GHC API? Cheers, ` Simon