ghc-exactprint-1.7.0.1: ExactPrint for GHC

Safe Haskell | Safe-Inferred
Language | Haskell2010

Language.Haskell.GHC.ExactPrint.Lookup

Synopsis

- keywordToString :: AnnKeywordId -> String
- data AnnKeywordId
  - = AnnAnyclass
  - | AnnAs
  - | AnnBang
  - | AnnBackquote
  - | AnnBy
  - | AnnCase
  - | AnnCases
  - | AnnClass
  - | AnnClose
  - | AnnCloseB
  - | AnnCloseBU
  - | AnnCloseC
  - | AnnCloseQ
  - | AnnCloseQU
  - | AnnCloseP
  - | AnnClosePH
  - | 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
  - | AnnLollyU
  - | AnnMdo
  - | AnnMinus
  - | AnnModule
  - | AnnNewtype
  - | AnnName
  - | AnnOf
  - | AnnOpen
  - | AnnOpenB
  - | AnnOpenBU
  - | AnnOpenC
  - | AnnOpenE
  - | AnnOpenEQ
  - | AnnOpenEQU
  - | AnnOpenP
  - | AnnOpenS
  - | AnnOpenPH
  - | AnnDollar
  - | AnnDollarDollar
  - | AnnPackageName
  - | AnnPattern
  - | AnnPercent
  - | AnnPercentOne
  - | AnnProc
  - | AnnQualified
  - | AnnRarrow
  - | AnnRarrowU
  - | AnnRec
  - | AnnRole
  - | AnnSafe
  - | AnnSemi
  - | AnnSimpleQuote
  - | AnnSignature
  - | AnnStatic
  - | AnnStock
  - | AnnThen
  - | AnnThTyQuote
  - | AnnTilde
  - | AnnType
  - | AnnUnit
  - | AnnUsing
  - | AnnVal
  - | AnnValStr
  - | AnnVbar
  - | AnnVia
  - | AnnWhere
  - | Annlarrowtail
  - | AnnlarrowtailU
  - | Annrarrowtail
  - | AnnrarrowtailU
  - | AnnLarrowtail
  - | AnnLarrowtailU
  - | AnnRarrowtail
  - | AnnRarrowtailU
- data Comment = Comment {
  - commentContents :: !String
  - commentAnchor :: !Anchor
  - commentPriorTok :: !RealSrcSpan
  - commentOrigin :: !(Maybe AnnKeywordId)
  }

# Documentation

keywordToString :: AnnKeywordId -> String #

Maps `AnnKeywordId` to the corresponding String representation. There is no specific mapping for the following constructors. `AnnOpen`, `AnnClose`, `AnnVal`, `AnnPackageName`, `AnnHeader`, `AnnFunId`, `AnnInfix`

data AnnKeywordId #

Constructors

AnnAnyclass |
AnnAs |
AnnBang |
AnnBackquote |
AnnBy |
AnnCase |
AnnCases |
AnnClass |
AnnClose |
AnnCloseB |
AnnCloseBU |
AnnCloseC |
AnnCloseQ |
AnnCloseQU |
AnnCloseP |
AnnClosePH |
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 |
AnnLollyU |
AnnMdo |
AnnMinus |
AnnModule |
AnnNewtype |
AnnName |
AnnOf |
AnnOpen |
AnnOpenB |
AnnOpenBU |
AnnOpenC |
AnnOpenE |
AnnOpenEQ |
AnnOpenEQU |
AnnOpenP |
AnnOpenS |
AnnOpenPH |
AnnDollar |
AnnDollarDollar |
AnnPackageName |
AnnPattern |
AnnPercent |
AnnPercentOne |
AnnProc |
AnnQualified |
AnnRarrow |
AnnRarrowU |
AnnRec |
AnnRole |
AnnSafe |
AnnSemi |
AnnSimpleQuote |
AnnSignature |
AnnStatic |
AnnStock |
AnnThen |
AnnThTyQuote |
AnnTilde |
AnnType |
AnnUnit |
AnnUsing |
AnnVal |
AnnValStr |
AnnVbar |
AnnVia |
AnnWhere |
Annlarrowtail |
AnnlarrowtailU |
Annrarrowtail |
AnnrarrowtailU |
AnnLarrowtail |
AnnLarrowtailU |
AnnRarrowtail |
AnnRarrowtailU |

#### Instances

Instances details

Data AnnKeywordId |

Instance details

Defined in GHC.Parser.Annotation

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AnnKeywordId -> c AnnKeywordId

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AnnKeywordId

toConstr :: AnnKeywordId -> Constr

dataTypeOf :: AnnKeywordId -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AnnKeywordId)

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AnnKeywordId)

gmapT :: (forall b. Data b => b -> b) -> AnnKeywordId -> AnnKeywordId

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AnnKeywordId -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AnnKeywordId -> r

gmapQ :: (forall d. Data d => d -> u) -> AnnKeywordId -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> AnnKeywordId -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> AnnKeywordId -> m AnnKeywordId

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnKeywordId -> m AnnKeywordId

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnKeywordId -> m AnnKeywordId

Show AnnKeywordId |
Instance details Defined in GHC.Parser.Annotation Methods showsPrec :: Int -> AnnKeywordId -> ShowS show :: AnnKeywordId -> String showList :: [AnnKeywordId] -> ShowS
Default AnnKeywordId # |
Instance details Defined in Language.Haskell.GHC.ExactPrint.Orphans Methods def :: AnnKeywordId #
Outputable AnnKeywordId |
Instance details Defined in GHC.Parser.Annotation Methods ppr :: AnnKeywordId -> SDoc
Eq AnnKeywordId |
Instance details Defined in GHC.Parser.Annotation Methods (==) :: AnnKeywordId -> AnnKeywordId -> Bool (/=) :: AnnKeywordId -> AnnKeywordId -> Bool
Ord AnnKeywordId |
Instance details Defined in GHC.Parser.Annotation Methods compare :: AnnKeywordId -> AnnKeywordId -> Ordering (<) :: AnnKeywordId -> AnnKeywordId -> Bool (<=) :: AnnKeywordId -> AnnKeywordId -> Bool (>) :: AnnKeywordId -> AnnKeywordId -> Bool (>=) :: AnnKeywordId -> AnnKeywordId -> Bool max :: AnnKeywordId -> AnnKeywordId -> AnnKeywordId min :: AnnKeywordId -> AnnKeywordId -> AnnKeywordId

data Comment #

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

Constructors

Comment |

Fields

- commentContents :: !String

  The contents of the comment including separators

- commentAnchor :: !Anchor
- commentPriorTok :: !RealSrcSpan
- commentOrigin :: !(Maybe AnnKeywordId)

  We sometimes turn syntax into comments in order to process them properly.

#### Instances

Instances details

Data Comment # |

Instance details

Defined in Language.Haskell.GHC.ExactPrint.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Comment -> c Comment

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Comment

toConstr :: Comment -> Constr

dataTypeOf :: Comment -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Comment)

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Comment)

gmapT :: (forall b. Data b => b -> b) -> Comment -> Comment

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Comment -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Comment -> r

gmapQ :: (forall d. Data d => d -> u) -> Comment -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> Comment -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Comment -> m Comment

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Comment -> m Comment

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Comment -> m Comment

Show Comment # |
Instance details Defined in Language.Haskell.GHC.ExactPrint.Types Methods showsPrec :: Int -> Comment -> ShowS show :: Comment -> String showList :: [Comment] -> ShowS
Outputable Comment # |
Instance details Defined in Language.Haskell.GHC.ExactPrint.Types Methods ppr :: Comment -> SDoc
Eq Comment # |
Instance details Defined in Language.Haskell.GHC.ExactPrint.Types Methods (==) :: Comment -> Comment -> Bool (/=) :: Comment -> Comment -> Bool
Ord Comment # |
Instance details Defined in Language.Haskell.GHC.ExactPrint.Types Methods compare :: Comment -> Comment -> Ordering (<) :: Comment -> Comment -> Bool (<=) :: Comment -> Comment -> Bool (>) :: Comment -> Comment -> Bool (>=) :: Comment -> Comment -> Bool max :: Comment -> Comment -> Comment min :: Comment -> Comment -> Comment