Safe Haskell | None |
---|---|
Language | Haskell2010 |
Parser compaibility module.
Synopsis
- initParserOpts :: DynFlags -> ParserOpts
- initParserState :: ParserOpts -> StringBuffer -> RealSrcLoc -> PState
- type ApiAnns = ApiAnns
- data HsParsedModule = HsParsedModule {}
- data ParsedModule = ParsedModule {}
- mkApiAnns :: PState -> ApiAnns
- data AnnKeywordId
- = AnnAnyclass
- | AnnAs
- | AnnAt
- | AnnBang
- | AnnBackquote
- | AnnBy
- | AnnCase
- | AnnClass
- | AnnClose
- | AnnCloseB
- | AnnCloseBU
- | AnnCloseC
- | AnnCloseQ
- | AnnCloseQU
- | AnnCloseP
- | AnnCloseS
- | AnnColon
- | AnnComma
- | AnnCommaTuple
- | AnnDarrow
- | AnnDarrowU
- | AnnData
- | AnnDcolon
- | AnnDcolonU
- | AnnDefault
- | AnnDeriving
- | AnnDo
- | AnnDot
- | AnnDotdot
- | AnnElse
- | AnnEqual
- | AnnExport
- | AnnFamily
- | AnnForall
- | AnnForallU
- | AnnForeign
- | AnnFunId
- | AnnGroup
- | AnnHeader
- | AnnHiding
- | AnnIf
- | AnnImport
- | AnnIn
- | AnnInfix
- | AnnInstance
- | AnnLam
- | AnnLarrow
- | AnnLarrowU
- | AnnLet
- | AnnMdo
- | AnnMinus
- | AnnModule
- | AnnNewtype
- | AnnName
- | AnnOf
- | AnnOpen
- | AnnOpenB
- | AnnOpenBU
- | AnnOpenC
- | AnnOpenE
- | AnnOpenEQ
- | AnnOpenEQU
- | AnnOpenP
- | AnnOpenPE
- | AnnOpenPTE
- | AnnOpenS
- | AnnPackageName
- | AnnPattern
- | AnnProc
- | AnnQualified
- | AnnRarrow
- | AnnRarrowU
- | AnnRec
- | AnnRole
- | AnnSafe
- | AnnSemi
- | AnnSimpleQuote
- | AnnSignature
- | AnnStatic
- | AnnStock
- | AnnThen
- | AnnThIdSplice
- | AnnThIdTySplice
- | AnnThTyQuote
- | AnnTilde
- | AnnType
- | AnnUnit
- | AnnUsing
- | AnnVal
- | AnnValStr
- | AnnVbar
- | AnnVia
- | AnnWhere
- | Annlarrowtail
- | AnnlarrowtailU
- | Annrarrowtail
- | AnnrarrowtailU
- | AnnLarrowtail
- | AnnLarrowtailU
- | AnnRarrowtail
- | AnnRarrowtailU
- | AnnEofPos
- data AnnotationComment
- pattern EpaLineComment :: String -> AnnotationComment
- pattern EpaBlockComment :: String -> AnnotationComment
Documentation
initParserOpts :: DynFlags -> ParserOpts Source #
initParserState :: ParserOpts -> StringBuffer -> RealSrcLoc -> PState Source #
data HsParsedModule #
data ParsedModule #
The result of successful parsing.
Instances
Show ParsedModule Source # | |
Defined in Development.IDE.GHC.Orphans showsPrec :: Int -> ParsedModule -> ShowS # show :: ParsedModule -> String # showList :: [ParsedModule] -> ShowS # | |
NFData ParsedModule Source # | |
Defined in Development.IDE.GHC.Orphans rnf :: ParsedModule -> () # | |
ParsedMod ParsedModule | |
Defined in GHC |
API Annotations
data AnnKeywordId #
API Annotations exist so that tools can perform source to source conversions of Haskell code. They are used to keep track of the various syntactic keywords that are not captured in the existing AST.
The annotations, together with original source comments are made
available in the
field of pm_annotations
.
Comments are only retained if ParsedModule
is set in
Opt_KeepRawTokenStream
before parsing.DynFlags
The wiki page describing this feature is https://gitlab.haskell.org/ghc/ghc/wikis/api-annotations
Note: in general the names of these are taken from the corresponding token, unless otherwise noted See note [Api annotations] above for details of the usage
Instances
data AnnotationComment #
AnnDocCommentNext String | something beginning '-- |' |
AnnDocCommentPrev String | something beginning '-- ^' |
AnnDocCommentNamed String | something beginning '-- $' |
AnnDocSection Int String | a section heading |
AnnDocOptions String | doc options (prune, ignore-exports, etc) |
AnnLineComment String | comment starting by "--" |
AnnBlockComment String | comment in {- -} |
Instances
pattern EpaLineComment :: String -> AnnotationComment Source #
pattern EpaBlockComment :: String -> AnnotationComment Source #