See http://hackage.haskell.org/trac/ghc/ticket/5844

James Fisher is working on this, though I don't know how he's getting on.  
James?

S


From: [email protected] [mailto:[email protected]] On 
Behalf Of Knut Halvor Skrede
Sent: 04 April 2012 14:53
To: [email protected]
Subject: Generating External-Core for GHC libraries

Hi,

I am trying to generate External-Core files for the GHC libraries. I need these 
files as I am working on an interpreter for Haskell (by interpreting 
External-core).
I have tried following the README and HOWTO files of both the extcore and 
linkcore packages. Unfortunately, I have been unable to
create the files. I had hoped it would be as simple as adding the flag 
"-fext-core" to "GhcLibHcOpts" in "mk/build.mk<http://build.mk>", but this did 
not work. I got
a panic error. I have tried on a variety of versions (6.10, 6.12, 7.0 and now 
7.4), but have been unable to create the files. Have anyone
tried to do this before. Did you succeed? If so, what did you do? If not, do 
you have any suggestions to something I should try?

The error I get when attempting on ghc 7.4.1:
----------------------------------------------------------------

ghc-stage1: panic! (the 'impossible' happened)
  (GHC version 7.4.1 for x86_64-unknown-linux):
    MkExternalCore died: make_lit

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

make[2]: *** [libraries/base/dist-install/build/GHC/Num.o] Error 1
make[1]: *** [all_libraries] Error 2
make[1]: Leaving directory `/home/khs/documents/project/ghc741/ghc-7.4.1'
make: *** [all] Error 2

---------------------------------------------------------------

An alternative for me would be to use the GHC API to compile modules. However, 
I have been unsuccessful at using this method
to compile the GHC libraries. I attempted to use the Cabal API to get the 
necessary information from the .cabal files, and compile the
modules with compileToCoreSimplified and then create an own External-core like 
language from the result. So, does anyone have a
suggestion as to what method I should be using to do this?

Thanks,
Knut Halvor
_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to