ghc-exactprint- ExactPrint for GHC
Safe HaskellNone



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



exactPrint :: 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 using one of the parsers in Language.Haskell.GHC.ExactPrint.Parsers.

exactPrintWithOptions :: (Annotate ast, Monoid b, Monad m) => PrintOptions m b -> Located ast -> Anns -> m b Source #

The additional option to specify the rigidity and printing configuration.


stringOptions :: PrintOptions Identity String Source #

Options which can be used to print as a normal String.

printOptions :: (forall ast. (Data ast, HasSrcSpan ast) => ast -> a -> m a) -> (String -> m a) -> (String -> m a) -> Rigidity -> PrintOptions m a Source #

Helper to create a PrintOptions