ghc-exactprint-0.3: ExactPrint for GHC

Safe HaskellNone
LanguageHaskell2010

Language.Haskell.GHC.ExactPrint.Print

Description

This module inverts the process performed by Delta. Given Anns and a corresponding AST we produce a source file based on this information.

Synopsis

Documentation

exactPrintWithAnns :: Annotate ast => Located ast -> Anns -> String Source

Print an AST with a map of potential modified Anns. The usual way to generate such a map is by calling relativiseApiAnns.

exactPrint :: Annotate ast => Located ast -> ApiAnns -> String Source

Print an AST exactly as specified by the annotations on the nodes in the tree. The output of this function should exactly match the source file.