Trees that Grow in the hsSyn AST
david at well-typed.com
Fri May 26 00:11:06 UTC 2017
I haven't looked in detail yet, but there seem to be good ideas. I have two questions:
1. Which is better to start with: HsSyn or Core? Intuition suggests this sort of thing could be very helpful for making zapping more reliable and ensuring its efficiency, but there may be better reasons to start with HsSyn.
2. If we're making intrusive changes to representations, would now be a sensible era to consider switching to a different variable representation (unbound, bound, abt, etc)?
David FeuerWell-Typed, LLP
-------- Original message --------From: Simon Peyton Jones via ghc-devs <ghc-devs at haskell.org> Date: 5/25/17 6:48 PM (GMT-05:00) To: Alan & Kim Zimmerman <alan.zimm at gmail.com>, ghc-devs at haskell.org Subject: RE: Trees that Grow in the hsSyn AST
Do take a look at this:
· We propose to re-engineer HsSyn itself. This will touch a lot of code.
· But it’s very neat, and will bring big long-term advantages
· And we can do it a bit at a time
The wiki page https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow has the details.
It’s entirely an internal change, not a change to GHC’s specification, so it’s independent of the GHC proposals process. But I’d value the opinion of other GHC devs.
Alan has done a prototype first step, which worked out rather well. Rather than having
(which we all know means “HsExpr after the typechecker” but tha’s a bit inexplicit, we have
meaning “HsExpr after GHC’s Tc pass”. In some ways this is quite superficial, but it unlocks the Trees That Grow machiney.
Please ask questions etc. Alan and Shayan can record the answers in the wiki. I’m inclined to go ahead with this, so yell soon if you disagree.
From: ghc-devs [mailto:ghc-devs-bounces at haskell.org] On Behalf Of Alan & Kim Zimmerman
Sent: 24 May 2017 22:52
To: ghc-devs at haskell.org
Subject: Trees that Grow in the hsSyn AST
You may be aware that Shayan Najd presented the paper "Trees that Grow" at HIW last year.
Based on the following mandate
> As in my previous email to Shayan (attached). Wiki page, describe goals, design,
> approach. Point to prototype implementation. Seek comments. You can say that
>I am supportive!
We have set up a Wiki page at  describing a prototype implementation of the first stage of this for the hsSyn AST, which is to change the polymorphic variable from one of RdrName / Name / Id to an index type. This is presented as a fabricator diff at .
Please take a look and provide feedback.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ghc-devs