[Haskell-cafe] GHC core packages: same core?

Max Bolingbroke batterseapower at hotmail.com
Tue Oct 13 16:53:31 EDT 2009


Hi Dimitry,

ghc-core is a pretty-printer for GHC's internal Core language (you can
get a non-pretty-printed version simply by compiling with (IIRC)
-dverbose-core2core). This is what we actually optimize and generate
code from, and the formatting of this output might change at any time.
This is probably what you should be looking at, as a human trying to
understand how your programs are being complied.

extcore is a library that parses "external" Core, which is an
alternative format intended to be stable and hence a suitable target
for consumption by non-GHC tooling. You can have GHC output external
core instead of machine code / C. I don't believe this is widely used
yet.

Cheers,
Max

2009/10/12 Dimitry Golubovsky <golubovsky at gmail.com>:
> Hi,
>
> Just curious whether package
> http://hackage.haskell.org/package/ghc-core and
> http://hackage.haskell.org/package/extcore operate on the same flavor
> of GHC Core?
>
> There seem to be external [1] and internal [2] flavors of GHC Core.
>
> [1] http://www.haskell.org/ghc/docs/6.10.2/html/ext-core/core.pdf
> [2] http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler/CoreSynType
>
> Thanks.
>
> --
> Dimitry Golubovsky
>
> Anywhere on the Web
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>


More information about the Haskell-Cafe mailing list