Safe Haskell | None |
---|---|
Language | Haskell2010 |
- getAnnotation :: ApiAnns -> SrcSpan -> AnnKeywordId -> [SrcSpan]
- getAnnotationComments :: ApiAnns -> SrcSpan -> [Located AnnotationComment]
- type ApiAnns = (Map ApiAnnKey [SrcSpan], Map SrcSpan [Located AnnotationComment])
- type ApiAnnKey = (SrcSpan, AnnKeywordId)
- data AnnKeywordId
- = AnnAs
- | AnnAt
- | AnnBang
- | AnnBy
- | AnnCase
- | AnnClass
- | AnnClose
- | AnnColon
- | AnnComma
- | AnnDarrow
- | AnnData
- | AnnDcolon
- | AnnDefault
- | AnnDeriving
- | AnnDo
- | AnnDot
- | AnnDotdot
- | AnnElse
- | AnnEqual
- | AnnExport
- | AnnFamily
- | AnnForall
- | AnnForeign
- | AnnFunId
- | AnnGroup
- | AnnHeader
- | AnnHiding
- | AnnIf
- | AnnImport
- | AnnIn
- | AnnInfix
- | AnnInstance
- | AnnLam
- | AnnLarrow
- | AnnLet
- | AnnMdo
- | AnnMinus
- | AnnModule
- | AnnNewtype
- | AnnOf
- | AnnOpen
- | AnnPackageName
- | AnnPattern
- | AnnProc
- | AnnQualified
- | AnnRarrow
- | AnnRec
- | AnnRole
- | AnnSafe
- | AnnSemi
- | AnnThen
- | AnnTilde
- | AnnTildehsh
- | AnnType
- | AnnUsing
- | AnnVal
- | AnnVbar
- | AnnWhere
- | Annlarrowtail
- | Annrarrowtail
- | AnnLarrowtail
- | AnnRarrowtail
- | AnnEofPos
- data AnnotationComment
- type LRdrName = Located RdrName
Documentation
getAnnotation :: ApiAnns -> SrcSpan -> AnnKeywordId -> [SrcSpan] Source
getAnnotationComments :: ApiAnns -> SrcSpan -> [Located AnnotationComment] Source
Retrieve the comments allocated to the current SrcSpan
type ApiAnnKey = (SrcSpan, AnnKeywordId) Source
data AnnKeywordId Source
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
AnnAs | |
AnnAt | |
AnnBang |
|
AnnBy | |
AnnCase | case or lambda case |
AnnClass | |
AnnClose | '}' or ']' or ')' or '#)' etc |
AnnColon | |
AnnComma | |
AnnDarrow | '=>' |
AnnData | |
AnnDcolon | '::' |
AnnDefault | |
AnnDeriving | |
AnnDo | |
AnnDot | |
AnnDotdot | '..' |
AnnElse | |
AnnEqual | |
AnnExport | |
AnnFamily | |
AnnForall | |
AnnForeign | |
AnnFunId | for function name in matches where there are multiple equations for the function. |
AnnGroup | |
AnnHeader | for CType |
AnnHiding | |
AnnIf | |
AnnImport | |
AnnIn | |
AnnInfix | 'infix' or 'infixl' or 'infixr' |
AnnInstance | |
AnnLam | |
AnnLarrow | '<-' |
AnnLet | |
AnnMdo | |
AnnMinus | |
AnnModule | |
AnnNewtype | |
AnnOf | |
AnnOpen | '{' or '[' or '(' or '(#' etc |
AnnPackageName | |
AnnPattern | |
AnnProc | |
AnnQualified | |
AnnRarrow | '->' |
AnnRec | |
AnnRole | |
AnnSafe | |
AnnSemi | ';' |
AnnThen | |
AnnTilde | '~' |
AnnTildehsh |
|
AnnType | |
AnnUsing | |
AnnVal | e.g. INTEGER |
AnnVbar | '|' |
AnnWhere | |
Annlarrowtail |
|
Annrarrowtail | '->' |
AnnLarrowtail |
|
AnnRarrowtail |
|
AnnEofPos |
data AnnotationComment Source
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) |
AnnDocOptionsOld String | doc options declared "-- # ..."-style |
AnnLineComment String | comment starting by "--" |
AnnBlockComment String | comment in {- -} |