Separate AST from GhcPass
One of the end-goals of TTG is a Haskell AST that can be used by GHC and other projects alike.
An impediment of this that the the TTG instances are in the same module as the data types which use the families. This means there is no way to even try to get a Haskell AST type without it's GHC-phase-specific ornaments. It would be good to separate:
Separate TTG type families from
Pass, currently both are in
Separate AST data types from GHC-specific TTG type family instances, currently both are in the other
In the short term, I think this is best accomplished my baking more modules for just the AST types and families. Lots of helper functions are actually
GhcPass-specific, (perhaps more than they need to be), but I wouldn't bother trying to deal with that at first as it leads to more complicated types / more type classes, which is controversial.
(This came up in the discussion of !1957 (closed), and also the mailing list on reducing the modules depended on by