[Haskell-cafe] "Standardising" Haskell AST for tooling
Alan & Kim Zimmerman
alan.zimm at gmail.com
Sun Aug 3 19:27:05 UTC 2014
Hi all
I am looking at updating HaRe for GHC 7.8.3, and I am fighting my way
through the AST changes.
One of the things I have had at the back of my mind for a while is to use
something like Kure universes or more generally lens to provide a set of
isomorphisms from the various flavours of AST into some kind of
standardised internal representation, allowing easier tool manipulation.
This could potentially decouple the tools from the specific
compiler/analyzer, so they could work across GHC 7.6.x, GHC 7.8.x,
haskell-src-exts, haste, etc..
Obviously there would be limitations to this where an advance in the
language brings in new features, but a lot of useful tool work can be done
that does not touch the new stuff.
I don't know if anything similar is planned in either ghc-server or another
toolchain.
My haskell-token-utils is a first limited attempt to bring source code
round tripping to a variety of backends, but a more general solution to the
AST phase would help tooling in general
So, is this worth doing? Is it being done already, or planned?
Regards
Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140803/2037a775/attachment.html>
More information about the Haskell-Cafe
mailing list