... | ... | @@ -3,8 +3,28 @@ |
|
|
|
|
|
In this page, we discuss the overall plan and details of implementing [ Tress that Grow](http://www.jucs.org/jucs_23_1/trees_that_grow/jucs_23_01_0042_0062_najd.pdf) in GHC.
|
|
|
The motivation and some background information can be found at the [ report](https://ghc.haskell.org/trac/ghc/wiki/NativeMetaprogramming) of a related Summer of Haskell project.
|
|
|
I (Shayan), with Simon Peyton Jones and Alan Zimmerman on board, plan to do as described below.
|
|
|
This work partly overlaps and subsumes Alan's work on [ Api Annotations](https://ghc.haskell.org/trac/ghc/wiki/ApiAnnotations).
|
|
|
|
|
|
|
|
|
The long term goal is to use a single data type for
|
|
|
|
|
|
- GHC itself (currently `HsSyn`)
|
|
|
- Template Haskell (currently the types in the `template-haskell` library)
|
|
|
- `hs-src-exts`, a popular library for processing Haskell
|
|
|
|
|
|
|
|
|
The shorter term plan is to validate the idea by applying it to GHC. That is, re-engineer `HsSyn` along the lines of Trees That Grow.
|
|
|
|
|
|
|
|
|
A major benefit is that we believe that this re-engineering will
|
|
|
|
|
|
- Completely subsume Alan Zimmerman's [ Api Annotations](https://ghc.haskell.org/trac/ghc/wiki/ApiAnnotations), making them much easier to use.
|
|
|
- Allow us to get rid of the annoying alternation between `t` and `Located t`, which pervades `HsSyn`
|
|
|
|
|
|
|
|
|
Re-engineering `HsSyn` is a major exercise that touches a lot of code, so we need to move carefully. This page outlines the plan.
|
|
|
|
|
|
|
|
|
Main protagonists: Shayan Najd and Alan Zimmerman.
|
|
|
|
|
|
### General Plan
|
|
|
|
... | ... | |