The semantics of Core?

Kirsten Chevalier
Tue, 18 Feb 2003 09:19:30 -0800

On Tue, Feb 18, 2003 at 12:01:02PM -0500, wrote:
> I'm also looking for actual code for working with Core. :) The
> Language.Haskell.* stuff gives me a very high-level representation of
> Haskell source, and I'd rather work with something simple, like Core. I
> *suppose* I could use ghc -fvia-ext or helium -C or something like that,
> and then parse the file it spits out, but it feels like a long way to go
> when there should be shortcuts available. Another way is to rip out the
> code from ghc or helium that does this, but that's not so nice either :(

There is a parser, typechecker, interpreter, and printer for Core in
ghc/utils/ext-core in the fptools distribution. The typechecker and
interpreter don't work on Core produced by the latest version of GHC,
but the parser and printer should still work OK. It's a lot easier
than linking your code with code from GHC!

Kirsten Chevalier * * Often in error, never in doubt