External Core in binary format
simonmarhaskell at gmail.com
Wed Jun 13 08:55:54 EDT 2007
Neil Mitchell wrote:
> I was wondering if you would be happy with the addition of a flag to
> generate Haskell Core (.hcr) files in a binary format, in addition to
> the text format currently generated? This would allow for easy parsing
> of the resultant files, something which is currently not possible.
> Matt has kindly volunteered to implement this, if you would be happy
> to accept such a patch.
In principle yes, but I see some practical problems.
Which binary library? There's one in GHC already, but if you wanted your parser
to be compatible, you'd have to use the same library (or carefully write the
binary parser to be compatible). Alternatively use Data.Binary, but that adds a
depenency to GHC, which is bad. You could make it an optional extension to GHC,
but that's bad too: you'd definitely want it enabled for binaries we distribute,
so it's not really an improvement over the mandatory dependency.
Isn't there a canonical parser and data types for GHC's core somewhere?
More information about the Cvs-ghc