Using the GHC API to write an interpreter
chrisdone at gmail.com
Mon Jun 27 12:06:58 UTC 2016
On 27 June 2016 at 04:11, Edward Z. Yang <ezyang at mit.edu> wrote:
> I don't understand what the bytecode format has to do here. Since
> your suggestion is to just store Core you can just compile to object
True, I could compile to either as long as I can link it dynamically.
> > Any input into this? How far away is GHC's current architecture from
> > supporting such a concept?
> Well, if you are going to support update you need to make sure that the
> tag information is more elaborate than what GHC currently supports
> (a type would just be a Name, which is going to get reused when you
Indeed -- like in GHCi when you redefine a named thing, I'd hope to
implement an incrementing Name[n] versioning for names. But Core's AST
is trivial so it'd be easy to make this kind of transformation.
More information about the ghc-devs