ghc-exactprint-1.2.0: ExactPrint for GHC
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Haskell.GHC.ExactPrint

Description

ghc-exactprint is a library to manage manipulating Haskell source files. There are four components.

Synopsis

Types

data Comment Source #

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

Instances

Instances details
Show Comment Source # 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.Types

Outputable Comment Source # 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.Types

Methods

ppr :: Comment -> SDoc #

Eq Comment Source # 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.Types

Methods

(==) :: Comment -> Comment -> Bool #

(/=) :: Comment -> Comment -> Bool #

Ord Comment Source # 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.Types

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