1 A set of example programs for handling external core format.
3 In particular, typechecker and interpreter give a precise semantics.
11 The checker should work on most programs. Bugs I'm aware of:
12 1. GHC generates some questionable coercion applications involving
13 partially-applied function arrows (for details, see:
14 http://www.haskell.org/pipermail/cvs-ghc/2008-April/041949.html)
15 This shows up when typechecking a few of the library modules.
17 2. There's some weirdness involving funny character literals. This can
18 be fixed by writing a new lexer for chars rather than using Parsec's
19 built-in charLiteral lexer. But I haven't done that.
21 Typechecking all the GHC libraries eats about a gig of heap and takes a
22 long time. I blame Parsec. (Someone who was bored, or understood happy
23 better than I do, could update the old happy parser, which is still in the
26 The interpreter is not working yet.
30 To run the checker and interpreter, you need to generate External Core
31 for all the base, integer and ghc-prim libraries. This can be done by
32 adding "-fext-core" to the GhcLibHcOpts in your build.mk file, then
33 running "make" under libraries/.
35 Then you need to edit Driver.hs and change "baseDir" to point to your GHC
38 Once you've done that:
39 1. make prims (to generate the primops file)
41 3. make nofibtest (to run the parser/checker on all nofib programs...
44 Tested with GHC 6.8.2. I make no claims of portability.