Using the API Annotations available from GHC 7.10.2, this library provides a
means to round trip any code that can be compiled by GHC, currently excluding
It does this with a phased approach
- Delta - converts GHC API Annotations into relative offsets, indexed by
- Transform - functions to facilitate changes to the AST, adjusting the
annotations generated in the Delta phase to suit the changes.
- Print - converts an AST and its annotations to properly formatted source
- Pretty - adds annotations to an AST (fragment) so that the output can be
parsed back to the same AST.
Note: requires GHC 7.10.2 or later.