Christoph Hermann <herrmann@fmi.uni-passau.de> wrote:
Dear Haskellers,
"Simon" == Simon Peyton-Jones <simonpj@microsoft.com> writes:
Simon> We agreed that it would be a Jolly Good Thing if GHC Simon> could be persuaded to produce GHC-independent Core output, Simon> ready to feed into some other compiler. For example, Simon> Karl-Filip might be able to use it. ANDREW will write a Simon> specification, and implement it.
a good idea. Before ANDREW will put a lot of effort in the specification and implementation, it would be good to have a discussion about the core representation that is gradually evolving.
Indeed, I plan to publish a draft specification (quite soon) and will be delighted to get feedback from the community before investing heavily in implementation. I'm very glad to hear that others are interested!
There is the risk that the representation, made by insiders, will be too complicated to be used by several other people as I feel the core output currently produced by GHC is.
Actually, I am something of an outsider myself (though physically located near a bunch of insiders just at the moment!) so I hope I'll be sensitive to this point. But perhaps Simon should not have written "GHC-independent" Core output; my goal is to expose GHC's existing Core language, or something very close to it, rather than to invent an ideal Core Haskell. So some GHC-specific complexities may be unavoidable.
It would be good to put all stuff related to this topic onto a WWW page, containing links to relevant papers, conventions, example pairs (Haskell source,core equivalent) which can be discussed.
A good idea; I'll set up such a page and put the draft there to get things started.
A toy interpreter (e.g., using happy) which interprets the core language and which is written with the goal of documentation, not under efficiency aspects, may be helpful.
Yes, I had already thought of doing this. Perhaps a type-checker too.
I'm not sure whether you like the idea, but a quick solution for a small subset of Haskell would, in my opinion, be smarter to the user, since her or she can get used to the representation and we have something concrete to discuss.
Well, yes. But the entire core language *is* really fairly small, so I am optimistic that a fairly complete job can be done in fairly short order. Cheers, Andrew Tolmach
[Andrew Tolmach <t-atolm@microsoft.com>]
Indeed, I plan to publish a draft specification (quite soon) and will be delighted to get feedback from the community before investing heavily in implementation. I'm very glad to hear that others are interested!
i'm also quite interested in this project, and eagerly await your draft! let us know when it's available! a quick question re: ghc's Core language... is it still very similar to the abstract syntax given in, for example, santos' "compilation by transformation..." (i think it was his dissertation?) and elsewhere, or has it changed significantly in the last couple of years? i only ask because i know the language used in that paper is somewhat different from the Core language given in peyton jones and lester's "implementing functional languages" from 92, and includes type annotations and so on. m -- matt hellige matt@immute.net http://matt.immute.net
participants (2)
-
Andrew Tolmach -
matt hellige