Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- type Anns = Map AnnKey Annotation
- emptyAnns :: Anns
- data AnnKey = AnnKey RealSrcSpan AnnConName
- mkAnnKeyPrim :: Data a => Located a -> AnnKey
- mkAnnKeyPrimA :: Data a => LocatedA a -> AnnKey
- data AnnConName = CN {}
- annGetConstr :: Data a => a -> AnnConName
- mkAnnKey :: Data a => Located a -> AnnKey
- type Pos = (Int, Int)
- annNone :: Annotation
- data Annotation = Ann {
- annEntryDelta :: !DeltaPos
- annPriorComments :: ![(Comment, DeltaPos)]
- annFollowingComments :: ![(Comment, DeltaPos)]
- annsDP :: ![(KeywordId, DeltaPos)]
- annSortKey :: !(Maybe [RealSrcSpan])
- annCapturedSpan :: !(Maybe AnnKey)
- declFun :: (forall a. Data a => LocatedA a -> b) -> LHsDecl GhcPs -> b
- data Rigidity
- data Comment = Comment {
- commentContents :: !String
- commentAnchor :: !Anchor
- commentOrigin :: !(Maybe AnnKeywordId)
- data KeywordId
- newtype LayoutStartCol = LayoutStartCol {}
- showGhc :: Outputable a => a -> String
Documentation
type Anns = Map AnnKey Annotation Source #
This structure holds a complete set of annotations for an AST
For every Located a
, use the SrcSpan
and constructor name of
a as the key, to store the standard annotation.
These are used to maintain context in the AP and EP monads
Instances
Data AnnKey Source # | |
Defined in Language.Haskell.GHC.ExactPrint.Types gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AnnKey -> c AnnKey # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AnnKey # toConstr :: AnnKey -> Constr # dataTypeOf :: AnnKey -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AnnKey) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AnnKey) # gmapT :: (forall b. Data b => b -> b) -> AnnKey -> AnnKey # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AnnKey -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AnnKey -> r # gmapQ :: (forall d. Data d => d -> u) -> AnnKey -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AnnKey -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AnnKey -> m AnnKey # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnKey -> m AnnKey # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnKey -> m AnnKey # | |
Show AnnKey Source # | |
Eq AnnKey Source # | |
Ord AnnKey Source # | |
Monad m => MonadState (Anns, Int) (TransformT m) Source # | |
Defined in Language.Haskell.GHC.ExactPrint.Transform |
data AnnConName Source #
Instances
annGetConstr :: Data a => a -> AnnConName Source #
mkAnnKey :: Data a => Located a -> AnnKey Source #
Make an unwrapped AnnKey
for the LHsDecl
case, a normal one otherwise.
annNone :: Annotation Source #
data Annotation Source #
Ann | |
|
Instances
Eq Annotation Source # | |
Defined in Language.Haskell.GHC.ExactPrint.Types (==) :: Annotation -> Annotation -> Bool # (/=) :: Annotation -> Annotation -> Bool # | |
Monad m => MonadState (Anns, Int) (TransformT m) Source # | |
Defined in Language.Haskell.GHC.ExactPrint.Transform |
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
Comment | |
|
The different syntactic elements which are not represented in the AST.
G AnnKeywordId | A normal keyword |
AnnSemiSep | A separating comma |
AnnTypeApp | Visible type application annotation |
AnnComment Comment | |
AnnString String | Used to pass information from Delta to Print when we have to work out details from the original SrcSpan. |
newtype LayoutStartCol Source #
Marks the start column of a layout block.
Instances
Num LayoutStartCol Source # | |
Defined in Language.Haskell.GHC.ExactPrint.Types (+) :: LayoutStartCol -> LayoutStartCol -> LayoutStartCol # (-) :: LayoutStartCol -> LayoutStartCol -> LayoutStartCol # (*) :: LayoutStartCol -> LayoutStartCol -> LayoutStartCol # negate :: LayoutStartCol -> LayoutStartCol # abs :: LayoutStartCol -> LayoutStartCol # signum :: LayoutStartCol -> LayoutStartCol # fromInteger :: Integer -> LayoutStartCol # | |
Show LayoutStartCol Source # | |
Defined in Language.Haskell.GHC.ExactPrint.Types showsPrec :: Int -> LayoutStartCol -> ShowS # show :: LayoutStartCol -> String # showList :: [LayoutStartCol] -> ShowS # | |
Eq LayoutStartCol Source # | |
Defined in Language.Haskell.GHC.ExactPrint.Types (==) :: LayoutStartCol -> LayoutStartCol -> Bool # (/=) :: LayoutStartCol -> LayoutStartCol -> Bool # |
showGhc :: Outputable a => a -> String Source #