commonmark-0.2.2: Pure Haskell commonmark parser.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Commonmark.Types

Synopsis

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

Eq Format Source # 
Instance details

Defined in Commonmark.Types

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

Eq ListSpacing Source # 
Instance details

Defined in Commonmark.Types

Ord ListSpacing Source # 
Instance details

Defined in Commonmark.Types

data ListType Source #

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

Eq ListType Source # 
Instance details

Defined in Commonmark.Types

Ord ListType Source # 
Instance details

Defined in Commonmark.Types

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

Eq DelimiterType Source # 
Instance details

Defined in Commonmark.Types

Ord DelimiterType Source # 
Instance details

Defined in Commonmark.Types

data EnumeratorType Source #

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

Eq EnumeratorType Source # 
Instance details

Defined in Commonmark.Types

Ord EnumeratorType Source # 
Instance details

Defined in Commonmark.Types

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 #

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 #

newtype SourceRange Source #

Constructors

SourceRange 

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

Semigroup SourceRange Source # 
Instance details

Defined in Commonmark.Types

Show SourceRange Source # 
Instance details

Defined in Commonmark.Types

Eq SourceRange Source # 
Instance details

Defined in Commonmark.Types

Ord SourceRange Source # 
Instance details

Defined in Commonmark.Types

Rangeable (Html SourceRange) Source # 
Instance details

Defined in Commonmark.Html

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

Eq SourcePos 
Instance details

Defined in Text.Parsec.Pos

Ord SourcePos 
Instance details

Defined in Text.Parsec.Pos

class Rangeable a where Source #

Methods

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

Instances

Instances details
Rangeable (Html SourceRange) Source # 
Instance details

Defined in Commonmark.Html

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

class HasAttributes a where Source #

Methods

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

Instances

Instances details
HasAttributes (Html a) Source # 
Instance details

Defined in Commonmark.Html

HasAttributes (WithSourceMap a) Source # 
Instance details

Defined in Commonmark.SourceMap

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