The haskell-token-utils package

This package provides a set of data structures to
manage the tie-up between a Haskell AST and the
underlying tokens, such that it explicitly
captures the Haskell layout rules and original
formatting. As a result changes can be made to
the AST and the tokens will be updated so that
the source file can be recreated with only the
updated parts changed. This makes it easier to
write Haskell source code modification
programmes.