ghc-exactprint-0.6.3.4: 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

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.

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