Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
ghc-exactprint
is a library to manage manipulating Haskell
source files. There are four components.
Synopsis
- data Comment
- parseModule :: LibDir -> FilePath -> IO (ParseResult ParsedSource)
- module Language.Haskell.GHC.ExactPrint.Transform
- exactPrint :: ExactPrint ast => Located ast -> String
Types
A Haskell comment. The AnnKeywordId
is present if it has been converted
from an AnnKeywordId
because the annotation must be interleaved into the
stream and does not have a well-defined position
Parsing
parseModule :: LibDir -> FilePath -> IO (ParseResult ParsedSource) Source #
This entry point will also work out which language extensions are required and perform CPP processing if necessary.
parseModule = parseModuleWithCpp defaultCppOptions
Note: ParsedSource
is a synonym for Located
(HsModule
GhcPs
)
Transformation
Printing
exactPrint :: ExactPrint ast => Located ast -> String Source #