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

Commonmark.Types

Documentation

newtype Format Source #

Constructors

Format Text 

Instances

Instances details
Eq Format Source # 
Instance details

Defined in Commonmark.Types

Methods

(==) :: Format -> Format -> Bool

(/=) :: Format -> Format -> Bool

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

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

toConstr :: Format -> Constr

dataTypeOf :: Format -> DataType

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

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

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

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

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

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

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

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

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

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

Show Format Source # 
Instance details

Defined in Commonmark.Types

Methods

showsPrec :: Int -> Format -> ShowS

show :: Format -> String

showList :: [Format] -> ShowS

data ListSpacing Source #

Constructors

TightList 
LooseList 

Instances

Instances details
Eq ListSpacing Source # 
Instance details

Defined in Commonmark.Types

Methods

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

(/=) :: ListSpacing -> ListSpacing -> Bool

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

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

toConstr :: ListSpacing -> Constr

dataTypeOf :: ListSpacing -> DataType

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

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

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

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

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

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

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

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

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

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

Ord ListSpacing Source # 
Instance details

Defined in Commonmark.Types

Show ListSpacing Source # 
Instance details

Defined in Commonmark.Types

Methods

showsPrec :: Int -> ListSpacing -> ShowS

show :: ListSpacing -> String

showList :: [ListSpacing] -> ShowS

data ListType Source #

Instances

Instances details
Eq ListType Source # 
Instance details

Defined in Commonmark.Types

Methods

(==) :: ListType -> ListType -> Bool

(/=) :: ListType -> ListType -> Bool

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

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

toConstr :: ListType -> Constr

dataTypeOf :: ListType -> DataType

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

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

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

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

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

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

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

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

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

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

Ord ListType Source # 
Instance details

Defined in Commonmark.Types

Methods

compare :: ListType -> ListType -> Ordering

(<) :: ListType -> ListType -> Bool

(<=) :: ListType -> ListType -> Bool

(>) :: ListType -> ListType -> Bool

(>=) :: ListType -> ListType -> Bool

max :: ListType -> ListType -> ListType

min :: ListType -> ListType -> ListType

Show ListType Source # 
Instance details

Defined in Commonmark.Types

Methods

showsPrec :: Int -> ListType -> ShowS

show :: ListType -> String

showList :: [ListType] -> ShowS

data DelimiterType Source #

Constructors

Period 
OneParen 
TwoParens 

Instances

Instances details
Eq DelimiterType Source # 
Instance details

Defined in Commonmark.Types

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

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

toConstr :: DelimiterType -> Constr

dataTypeOf :: DelimiterType -> DataType

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

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

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

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

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

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

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

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

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

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

Ord DelimiterType Source # 
Instance details

Defined in Commonmark.Types

Show DelimiterType Source # 
Instance details

Defined in Commonmark.Types

Methods

showsPrec :: Int -> DelimiterType -> ShowS

show :: DelimiterType -> String

showList :: [DelimiterType] -> ShowS

data EnumeratorType Source #

Instances

Instances details
Eq EnumeratorType Source # 
Instance details

Defined in Commonmark.Types

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

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

toConstr :: EnumeratorType -> Constr

dataTypeOf :: EnumeratorType -> DataType

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

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

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

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

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

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

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

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

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

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

Ord EnumeratorType Source # 
Instance details

Defined in Commonmark.Types

Show EnumeratorType Source # 
Instance details

Defined in Commonmark.Types

Methods

showsPrec :: Int -> EnumeratorType -> ShowS

show :: EnumeratorType -> String

showList :: [EnumeratorType] -> ShowS

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
(IsInline a, Semigroup a) => IsInline (WithSourceMap a) Source # 
Instance details

Defined in Commonmark.SourceMap

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 #

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
(IsBlock b a, IsInline b, IsInline (WithSourceMap b), Semigroup a) => IsBlock (WithSourceMap b) (WithSourceMap a) Source # 
Instance details

Defined in Commonmark.SourceMap

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 #

newtype SourceRange Source #

Constructors

SourceRange 

Instances

Instances details
Eq SourceRange Source # 
Instance details

Defined in Commonmark.Types

Methods

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

(/=) :: SourceRange -> SourceRange -> Bool

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

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

toConstr :: SourceRange -> Constr

dataTypeOf :: SourceRange -> DataType

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

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

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

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

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

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

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

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

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

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

Ord SourceRange Source # 
Instance details

Defined in Commonmark.Types

Show SourceRange Source # 
Instance details

Defined in Commonmark.Types

Methods

showsPrec :: Int -> SourceRange -> ShowS

show :: SourceRange -> String

showList :: [SourceRange] -> ShowS

Semigroup SourceRange Source # 
Instance details

Defined in Commonmark.Types

Methods

(<>) :: SourceRange -> SourceRange -> SourceRange

sconcat :: NonEmpty SourceRange -> SourceRange

stimes :: Integral b => b -> SourceRange -> SourceRange

Monoid SourceRange Source # 
Instance details

Defined in Commonmark.Types

Rangeable (Html SourceRange) Source # 
Instance details

Defined in Commonmark.Html

data SourcePos #

Instances

Instances details
Eq SourcePos 
Instance details

Defined in Text.Parsec.Pos

Methods

(==) :: SourcePos -> SourcePos -> Bool

(/=) :: SourcePos -> SourcePos -> Bool

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

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

toConstr :: SourcePos -> Constr

dataTypeOf :: SourcePos -> DataType

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

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

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

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

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

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

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

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

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

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

Ord SourcePos 
Instance details

Defined in Text.Parsec.Pos

Methods

compare :: SourcePos -> SourcePos -> Ordering

(<) :: SourcePos -> SourcePos -> Bool

(<=) :: SourcePos -> SourcePos -> Bool

(>) :: SourcePos -> SourcePos -> Bool

(>=) :: SourcePos -> SourcePos -> Bool

max :: SourcePos -> SourcePos -> SourcePos

min :: SourcePos -> SourcePos -> SourcePos

Show SourcePos 
Instance details

Defined in Text.Parsec.Pos

Methods

showsPrec :: Int -> SourcePos -> ShowS

show :: SourcePos -> String

showList :: [SourcePos] -> ShowS

class Rangeable a where Source #

Methods

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

Instances

Instances details
(Rangeable a, Monoid a, Show a) => Rangeable (WithSourceMap a) Source # 
Instance details

Defined in Commonmark.SourceMap

Rangeable (Html ()) Source # 
Instance details

Defined in Commonmark.Html

Methods

ranged :: SourceRange -> Html () -> Html () Source #

Rangeable (Html SourceRange) Source # 
Instance details

Defined in Commonmark.Html

type Attribute = (Text, Text) Source #

class HasAttributes a where Source #

Methods

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

Instances

Instances details
HasAttributes (WithSourceMap a) Source # 
Instance details

Defined in Commonmark.SourceMap

HasAttributes (Html a) Source # 
Instance details

Defined in Commonmark.Html

class ToPlainText a where Source #

Methods

toPlainText :: a -> Text Source #

Instances

Instances details
ToPlainText a => ToPlainText (WithSourceMap a) Source # 
Instance details

Defined in Commonmark.SourceMap

Methods

toPlainText :: WithSourceMap a -> Text Source #

ToPlainText (Html a) Source # 
Instance details

Defined in Commonmark.Html

Methods

toPlainText :: Html a -> Text Source #