ghc-exactprint-1.10.0.0: ExactPrint for GHC

Safe Haskell | None
Language | Haskell2010

Language.Haskell.GHC.ExactPrint.Types

Synopsis

- type Pos = (Int, Int)
- 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) Source #

data Comment Source #

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

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 Source #

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

toConstr :: Comment -> Constr Source #

dataTypeOf :: Comment -> DataType Source #

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

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

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

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

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

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

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

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

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

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

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

newtype LayoutStartCol Source #

Marks the start column of a layout block.

Constructors

LayoutStartCol |

Fields

- getLayoutStartCol :: Int

#### Instances

Instances details

Num LayoutStartCol Source # |

Instance details

Defined in Language.Haskell.GHC.ExactPrint.Types

Methods

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

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

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

negate :: LayoutStartCol -> LayoutStartCol Source #

abs :: LayoutStartCol -> LayoutStartCol Source #

signum :: LayoutStartCol -> LayoutStartCol Source #

fromInteger :: Integer -> LayoutStartCol Source #

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

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