Skip to content

Add Annotations to the AST to simplify source to source conversions

Add Annotations to HsSyn to explicitly track the locations of all non-blank source code elements to allow tools to parse a Haskell file, modify the AST and then produce an updated version of the source preserving the layout for unchanged parts.

Discussion of the feature is at GhcAstAnnotations

Note: an early effort was at D246, but this was abandoned as unworkable.

Edited by Alan Zimmerman
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information