pandoc-2.5: Conversion between markup formats

Copyright | Copyright (C) 2017-2018 John MacFarlane
License | GNU GPL, version 2 or above
Maintainer | John MacFarlane <jgm@berkeley.edu>
Stability | alpha
Portability | portable
Safe Haskell | Safe
Language | Haskell2010

Text.Pandoc.Readers.LaTeX.Types

Description

Types for LaTeX tokens and macros.

Synopsis

- data Tok = Tok SourcePos TokType Text
- data TokType
  - = CtrlSeq Text
  - | Spaces
  - | Newline
  - | Symbol
  - | Word
  - | Comment
  - | Esc1
  - | Esc2
  - | Arg Int
- data Macro = Macro ExpansionPoint [ArgSpec] (Maybe [Tok]) [Tok]
- data ArgSpec
  - = ArgNum Int
  - | Pattern [Tok]
- data ExpansionPoint
  - = ExpandWhenDefined
  - | ExpandWhenUsed
- data SourcePos

# Documentation

data Tok Source #

Constructors

Tok SourcePos TokType Text |

Instances

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

data TokType Source #

Constructors

CtrlSeq Text |
Spaces |
Newline |
Symbol |
Word |
Comment |
Esc1 |
Esc2 |
Arg Int |

Instances

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

data Macro Source #

Constructors

Macro ExpansionPoint [ArgSpec] (Maybe [Tok]) [Tok] |

Instances

Show Macro Source # |
Instance details Defined in Text.Pandoc.Readers.LaTeX.Types Methods showsPrec :: Int -> Macro -> ShowS Source # show :: Macro -> String Source # showList :: [Macro] -> ShowS Source #

data ArgSpec Source #

Constructors

ArgNum Int |
Pattern [Tok] |

Instances

Show ArgSpec Source # |
Instance details Defined in Text.Pandoc.Readers.LaTeX.Types Methods showsPrec :: Int -> ArgSpec -> ShowS Source # show :: ArgSpec -> String Source # showList :: [ArgSpec] -> ShowS Source #

data ExpansionPoint Source #

Constructors

ExpandWhenDefined |
ExpandWhenUsed |

Instances

Eq ExpansionPoint Source # |
Instance details Defined in Text.Pandoc.Readers.LaTeX.Types Methods (==) :: ExpansionPoint -> ExpansionPoint -> Bool Source # (/=) :: ExpansionPoint -> ExpansionPoint -> Bool Source #
Ord ExpansionPoint Source # |

Instance details

Defined in Text.Pandoc.Readers.LaTeX.Types

Methods

compare :: ExpansionPoint -> ExpansionPoint -> Ordering Source #

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

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

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

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

max :: ExpansionPoint -> ExpansionPoint -> ExpansionPoint Source #

min :: ExpansionPoint -> ExpansionPoint -> ExpansionPoint Source #

Show ExpansionPoint Source # |
Instance details Defined in Text.Pandoc.Readers.LaTeX.Types Methods showsPrec :: Int -> ExpansionPoint -> ShowS Source # show :: ExpansionPoint -> String Source # showList :: [ExpansionPoint] -> ShowS Source #

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

Eq SourcePos |
Instance details Defined in Text.Parsec.Pos Methods (==) :: SourcePos -> SourcePos -> Bool Source # (/=) :: SourcePos -> SourcePos -> Bool Source #
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 :: (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 #

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 #
Show SourcePos |
Instance details Defined in Text.Parsec.Pos Methods showsPrec :: Int -> SourcePos -> ShowS Source # show :: SourcePos -> String Source # showList :: [SourcePos] -> ShowS Source #