ghc-exactprint-1.9.0.0: ExactPrint for GHC

Safe Haskell | None
Language | Haskell2010

Language.Haskell.GHC.ExactPrint.Types

Synopsis

- type Pos = (Int, Int)
- data Rigidity
  - = NormalLayout
  - | RigidLayout
- data Comment = Comment {
  - commentContents :: !String
  - commentLoc :: !NoCommentsLocation
  - commentPriorTok :: !RealSrcSpan
  - commentOrigin :: !(Maybe AnnKeywordId)
  }
- newtype LayoutStartCol = LayoutStartCol {
  - getLayoutStartCol :: Int
  }
- showGhc :: Outputable a => a -> String

# Documentation

type Pos = (Int, Int) #

data Rigidity #

Constructors

NormalLayout |
RigidLayout |

#### Instances

Instances details

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

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

- commentLoc :: !NoCommentsLocation
- commentPriorTok :: !RealSrcSpan
- commentOrigin :: !(Maybe AnnKeywordId)

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

#### Instances

Instances details

Outputable Comment # |
Instance details Defined in Language.Haskell.GHC.ExactPrint.Types Methods ppr :: Comment -> SDoc #
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 #
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 #

newtype LayoutStartCol #

Marks the start column of a layout block.

Constructors

LayoutStartCol |

Fields

- getLayoutStartCol :: Int

#### Instances

Instances details

Num LayoutStartCol # |

Instance details

Defined in Language.Haskell.GHC.ExactPrint.Types

Methods

(+) :: LayoutStartCol -> LayoutStartCol -> LayoutStartCol #

(-) :: LayoutStartCol -> LayoutStartCol -> LayoutStartCol #

(*) :: LayoutStartCol -> LayoutStartCol -> LayoutStartCol #

negate :: LayoutStartCol -> LayoutStartCol #

abs :: LayoutStartCol -> LayoutStartCol #

signum :: LayoutStartCol -> LayoutStartCol #

fromInteger :: Integer -> LayoutStartCol #

Show LayoutStartCol # |
Instance details Defined in Language.Haskell.GHC.ExactPrint.Types Methods showsPrec :: Int -> LayoutStartCol -> ShowS # show :: LayoutStartCol -> String # showList :: [LayoutStartCol] -> ShowS #
Eq LayoutStartCol # |
Instance details Defined in Language.Haskell.GHC.ExactPrint.Types Methods (==) :: LayoutStartCol -> LayoutStartCol -> Bool # (/=) :: LayoutStartCol -> LayoutStartCol -> Bool #

showGhc :: Outputable a => a -> String #