commonmark-0.2.6.1: Pure Haskell commonmark parser.

Safe Haskell | Safe-Inferred
Language | Haskell2010

Commonmark.Types

Contents

- Re-exports

Synopsis

- newtype Format = Format Text
- data ListSpacing
  - = TightList
  - | LooseList
- data ListType
  - = BulletList !Char
  - | OrderedList !Int !EnumeratorType !DelimiterType
- data DelimiterType
  - = Period
  - | OneParen
  - | TwoParens
- data EnumeratorType
  - = Decimal
  - | UpperAlpha
  - | LowerAlpha
  - | UpperRoman
  - | LowerRoman
- class (Monoid a, Show a, Rangeable a, HasAttributes a) => IsInline a where
  - lineBreak :: a
  - softBreak :: a
  - str :: Text -> a
  - entity :: Text -> a
  - escapedChar :: Char -> a
  - emph :: a -> a
  - strong :: a -> a
  - link :: Text -> Text -> a -> a
  - image :: Text -> Text -> a -> a
  - code :: Text -> a
  - rawInline :: Format -> Text -> a
- class (Monoid b, Show b, Rangeable b, IsInline il, HasAttributes b) => IsBlock il b | b -> il where
  - paragraph :: il -> b
  - plain :: il -> b
  - thematicBreak :: b
  - blockQuote :: b -> b
  - codeBlock :: Text -> Text -> b
  - heading :: Int -> il -> b
  - rawBlock :: Format -> Text -> b
  - referenceLinkDefinition :: Text -> (Text, Text) -> b
  - list :: ListType -> ListSpacing -> [b] -> b
- newtype SourceRange = SourceRange {
  - unSourceRange :: [(SourcePos, SourcePos)]
  }
- class Rangeable a where
  - ranged :: SourceRange -> a -> a
- type Attribute = (Text, Text)
- type Attributes = [Attribute]
- class HasAttributes a where
  - addAttributes :: Attributes -> a -> a
- class ToPlainText a where
  - toPlainText :: a -> Text
- data SourcePos
- sourceLine :: SourcePos -> Line
- sourceColumn :: SourcePos -> Column
- sourceName :: SourcePos -> SourceName

# Documentation

newtype Format Source #

Constructors

Format Text |

#### Instances

Instances details

Data Format Source # |

Instance details

Defined in Commonmark.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Format -> c Format Source #

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

toConstr :: Format -> Constr Source #

dataTypeOf :: Format -> DataType Source #

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

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

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

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

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

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

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

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

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

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

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

data ListSpacing Source #

Constructors

TightList |
LooseList |

#### Instances

Instances details

Data ListSpacing Source # |

Instance details

Defined in Commonmark.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ListSpacing -> c ListSpacing Source #

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

toConstr :: ListSpacing -> Constr Source #

dataTypeOf :: ListSpacing -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show ListSpacing Source # |
Instance details Defined in Commonmark.Types Methods showsPrec :: Int -> ListSpacing -> ShowS Source # show :: ListSpacing -> String Source # showList :: [ListSpacing] -> ShowS Source #
Eq ListSpacing Source # |
Instance details Defined in Commonmark.Types Methods (==) :: ListSpacing -> ListSpacing -> Bool Source # (/=) :: ListSpacing -> ListSpacing -> Bool Source #
Ord ListSpacing Source # |

Instance details

Defined in Commonmark.Types

Methods

compare :: ListSpacing -> ListSpacing -> Ordering Source #

(<) :: ListSpacing -> ListSpacing -> Bool Source #

(<=) :: ListSpacing -> ListSpacing -> Bool Source #

(>) :: ListSpacing -> ListSpacing -> Bool Source #

(>=) :: ListSpacing -> ListSpacing -> Bool Source #

max :: ListSpacing -> ListSpacing -> ListSpacing Source #

min :: ListSpacing -> ListSpacing -> ListSpacing Source #

data ListType Source #

Constructors

BulletList !Char |
OrderedList !Int !EnumeratorType !DelimiterType |

#### Instances

Instances details

Data ListType Source # |

Instance details

Defined in Commonmark.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ListType -> c ListType Source #

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

toConstr :: ListType -> Constr Source #

dataTypeOf :: ListType -> DataType Source #

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

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

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

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

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

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

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

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

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

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

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

data DelimiterType Source #

Constructors

Period |
OneParen |
TwoParens |

#### Instances

Instances details

Data DelimiterType Source # |

Instance details

Defined in Commonmark.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DelimiterType -> c DelimiterType Source #

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

toConstr :: DelimiterType -> Constr Source #

dataTypeOf :: DelimiterType -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show DelimiterType Source # |
Instance details Defined in Commonmark.Types Methods showsPrec :: Int -> DelimiterType -> ShowS Source # show :: DelimiterType -> String Source # showList :: [DelimiterType] -> ShowS Source #
Eq DelimiterType Source # |
Instance details Defined in Commonmark.Types Methods (==) :: DelimiterType -> DelimiterType -> Bool Source # (/=) :: DelimiterType -> DelimiterType -> Bool Source #
Ord DelimiterType Source # |

Instance details

Defined in Commonmark.Types

Methods

compare :: DelimiterType -> DelimiterType -> Ordering Source #

(<) :: DelimiterType -> DelimiterType -> Bool Source #

(<=) :: DelimiterType -> DelimiterType -> Bool Source #

(>) :: DelimiterType -> DelimiterType -> Bool Source #

(>=) :: DelimiterType -> DelimiterType -> Bool Source #

max :: DelimiterType -> DelimiterType -> DelimiterType Source #

min :: DelimiterType -> DelimiterType -> DelimiterType Source #

data EnumeratorType Source #

Constructors

Decimal |
UpperAlpha |
LowerAlpha |
UpperRoman |
LowerRoman |

#### Instances

Instances details

Data EnumeratorType Source # |

Instance details

Defined in Commonmark.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> EnumeratorType -> c EnumeratorType Source #

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

toConstr :: EnumeratorType -> Constr Source #

dataTypeOf :: EnumeratorType -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show EnumeratorType Source # |
Instance details Defined in Commonmark.Types Methods showsPrec :: Int -> EnumeratorType -> ShowS Source # show :: EnumeratorType -> String Source # showList :: [EnumeratorType] -> ShowS Source #
Eq EnumeratorType Source # |
Instance details Defined in Commonmark.Types Methods (==) :: EnumeratorType -> EnumeratorType -> Bool Source # (/=) :: EnumeratorType -> EnumeratorType -> Bool Source #
Ord EnumeratorType Source # |

Instance details

Defined in Commonmark.Types

Methods

compare :: EnumeratorType -> EnumeratorType -> Ordering Source #

(<) :: EnumeratorType -> EnumeratorType -> Bool Source #

(<=) :: EnumeratorType -> EnumeratorType -> Bool Source #

(>) :: EnumeratorType -> EnumeratorType -> Bool Source #

(>=) :: EnumeratorType -> EnumeratorType -> Bool Source #

max :: EnumeratorType -> EnumeratorType -> EnumeratorType Source #

min :: EnumeratorType -> EnumeratorType -> EnumeratorType Source #

class (Monoid a, Show a, Rangeable a, HasAttributes a) => IsInline a where Source #

Methods

lineBreak :: a Source #

softBreak :: a Source #

str :: Text -> a Source #

entity :: Text -> a Source #

escapedChar :: Char -> a Source #

emph :: a -> a Source #

strong :: a -> a Source #

link Source #

Arguments

:: Text | Destination
-> Text | Title
-> a | Link description
-> a |

image Source #

Arguments

:: Text | Source
-> Text | Title
-> a | Description
-> a |

code :: Text -> a Source #

rawInline :: Format -> Text -> a Source #

#### Instances

Instances details

Rangeable (Html a) => IsInline (Html a) Source # |

Instance details

Defined in Commonmark.Html

Methods

lineBreak :: Html a Source #

softBreak :: Html a Source #

str :: Text -> Html a Source #

entity :: Text -> Html a Source #

escapedChar :: Char -> Html a Source #

emph :: Html a -> Html a Source #

strong :: Html a -> Html a Source #

link :: Text -> Text -> Html a -> Html a Source #

image :: Text -> Text -> Html a -> Html a Source #

code :: Text -> Html a Source #

rawInline :: Format -> Text -> Html a Source #

(IsInline a, Semigroup a) => IsInline (WithSourceMap a) Source # |

Instance details

Defined in Commonmark.SourceMap

Methods

lineBreak :: WithSourceMap a Source #

softBreak :: WithSourceMap a Source #

str :: Text -> WithSourceMap a Source #

entity :: Text -> WithSourceMap a Source #

escapedChar :: Char -> WithSourceMap a Source #

emph :: WithSourceMap a -> WithSourceMap a Source #

strong :: WithSourceMap a -> WithSourceMap a Source #

link :: Text -> Text -> WithSourceMap a -> WithSourceMap a Source #

image :: Text -> Text -> WithSourceMap a -> WithSourceMap a Source #

code :: Text -> WithSourceMap a Source #

rawInline :: Format -> Text -> WithSourceMap a Source #

class (Monoid b, Show b, Rangeable b, IsInline il, HasAttributes b) => IsBlock il b | b -> il where Source #

Methods

paragraph :: il -> b Source #

plain :: il -> b Source #

thematicBreak :: b Source #

blockQuote :: b -> b Source #

codeBlock :: Text -> Text -> b Source #

heading Source #

Arguments

:: Int | Level
-> il | text
-> b |

rawBlock :: Format -> Text -> b Source #

referenceLinkDefinition Source #

Arguments

:: Text | Label
-> (Text, Text) | Destination, title
-> b |

list :: ListType -> ListSpacing -> [b] -> b Source #

#### Instances

Instances details

IsInline (Html a) => IsBlock (Html a) (Html a) Source # |

Instance details

Defined in Commonmark.Html

Methods

paragraph :: Html a -> Html a Source #

plain :: Html a -> Html a Source #

thematicBreak :: Html a Source #

blockQuote :: Html a -> Html a Source #

codeBlock :: Text -> Text -> Html a Source #

heading :: Int -> Html a -> Html a Source #

rawBlock :: Format -> Text -> Html a Source #

referenceLinkDefinition :: Text -> (Text, Text) -> Html a Source #

list :: ListType -> ListSpacing -> [Html a] -> Html a Source #

(IsBlock b a, IsInline b, IsInline (WithSourceMap b), Semigroup a) => IsBlock (WithSourceMap b) (WithSourceMap a) Source # |

Instance details

Defined in Commonmark.SourceMap

Methods

paragraph :: WithSourceMap b -> WithSourceMap a Source #

plain :: WithSourceMap b -> WithSourceMap a Source #

thematicBreak :: WithSourceMap a Source #

blockQuote :: WithSourceMap a -> WithSourceMap a Source #

codeBlock :: Text -> Text -> WithSourceMap a Source #

heading :: Int -> WithSourceMap b -> WithSourceMap a Source #

rawBlock :: Format -> Text -> WithSourceMap a Source #

referenceLinkDefinition :: Text -> (Text, Text) -> WithSourceMap a Source #

list :: ListType -> ListSpacing -> [WithSourceMap a] -> WithSourceMap a Source #

newtype SourceRange Source #

Constructors

SourceRange |

Fields

- unSourceRange :: [(SourcePos, SourcePos)]

#### Instances

Instances details

Data SourceRange Source # |

Instance details

Defined in Commonmark.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SourceRange -> c SourceRange Source #

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

toConstr :: SourceRange -> Constr Source #

dataTypeOf :: SourceRange -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Monoid SourceRange Source # |
Instance details Defined in Commonmark.Types Methods mempty :: SourceRange Source # mappend :: SourceRange -> SourceRange -> SourceRange Source # mconcat :: [SourceRange] -> SourceRange Source #
Semigroup SourceRange Source # |
Instance details Defined in Commonmark.Types Methods (<>) :: SourceRange -> SourceRange -> SourceRange Source # sconcat :: NonEmpty SourceRange -> SourceRange Source # stimes :: Integral b => b -> SourceRange -> SourceRange Source #
Show SourceRange Source # |
Instance details Defined in Commonmark.Types Methods showsPrec :: Int -> SourceRange -> ShowS Source # show :: SourceRange -> String Source # showList :: [SourceRange] -> ShowS Source #
Eq SourceRange Source # |
Instance details Defined in Commonmark.Types Methods (==) :: SourceRange -> SourceRange -> Bool Source # (/=) :: SourceRange -> SourceRange -> Bool Source #
Ord SourceRange Source # |

Instance details

Defined in Commonmark.Types

Methods

compare :: SourceRange -> SourceRange -> Ordering Source #

(<) :: SourceRange -> SourceRange -> Bool Source #

(<=) :: SourceRange -> SourceRange -> Bool Source #

(>) :: SourceRange -> SourceRange -> Bool Source #

(>=) :: SourceRange -> SourceRange -> Bool Source #

max :: SourceRange -> SourceRange -> SourceRange Source #

min :: SourceRange -> SourceRange -> SourceRange Source #

Rangeable (Html SourceRange) Source # |
Instance details Defined in Commonmark.Html Methods ranged :: SourceRange -> Html SourceRange -> Html SourceRange Source #

class Rangeable a where Source #

Methods

ranged :: SourceRange -> a -> a Source #

#### Instances

Instances details

Rangeable (Html SourceRange) Source # |
Instance details Defined in Commonmark.Html Methods ranged :: SourceRange -> Html SourceRange -> Html SourceRange Source #
Rangeable (Html ()) Source # |
Instance details Defined in Commonmark.Html Methods ranged :: SourceRange -> Html () -> Html () Source #
(Rangeable a, Monoid a, Show a) => Rangeable (WithSourceMap a) Source # |
Instance details Defined in Commonmark.SourceMap Methods ranged :: SourceRange -> WithSourceMap a -> WithSourceMap a Source #

type Attribute = (Text, Text) Source #

type Attributes = [Attribute] Source #

class HasAttributes a where Source #

Methods

addAttributes :: Attributes -> a -> a Source #

#### Instances

Instances details

HasAttributes (Html a) Source # |
Instance details Defined in Commonmark.Html Methods addAttributes :: Attributes -> Html a -> Html a Source #
HasAttributes (WithSourceMap a) Source # |
Instance details Defined in Commonmark.SourceMap Methods addAttributes :: Attributes -> WithSourceMap a -> WithSourceMap a Source #

class ToPlainText a where Source #

Methods

toPlainText :: a -> Text Source #

#### Instances

Instances details

ToPlainText (Html a) Source # |
Instance details Defined in Commonmark.Html Methods toPlainText :: Html a -> Text Source #
ToPlainText a => ToPlainText (WithSourceMap a) Source # |
Instance details Defined in Commonmark.SourceMap Methods toPlainText :: WithSourceMap a -> Text Source #

# Re-exports

data SourcePos Source #

The abstract data type `SourcePos` represents source positions. It contains the name of the source (i.e. file name), a line number and a column number. `SourcePos` is an instance of the `Show`, `Eq` and `Ord` class.

#### Instances

Instances details

Data SourcePos |

Instance details

Defined in Text.Parsec.Pos

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SourcePos -> c SourcePos Source #

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

toConstr :: SourcePos -> Constr Source #

dataTypeOf :: SourcePos -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show SourcePos |
Instance details Defined in Text.Parsec.Pos Methods showsPrec :: Int -> SourcePos -> ShowS Source # show :: SourcePos -> String Source # showList :: [SourcePos] -> ShowS Source #
Eq SourcePos |
Instance details Defined in Text.Parsec.Pos Methods (==) :: SourcePos -> SourcePos -> Bool Source # (/=) :: SourcePos -> SourcePos -> Bool Source #
Ord SourcePos |
Instance details Defined in Text.Parsec.Pos Methods compare :: SourcePos -> SourcePos -> Ordering Source # (<) :: SourcePos -> SourcePos -> Bool Source # (<=) :: SourcePos -> SourcePos -> Bool Source # (>) :: SourcePos -> SourcePos -> Bool Source # (>=) :: SourcePos -> SourcePos -> Bool Source # max :: SourcePos -> SourcePos -> SourcePos Source # min :: SourcePos -> SourcePos -> SourcePos Source #

sourceLine :: SourcePos -> Line Source #

Extracts the line number from a source position.

sourceColumn :: SourcePos -> Column Source #

Extracts the column number from a source position.

sourceName :: SourcePos -> SourceName Source #

Extracts the name of the source from a source position.