| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Commonmark.Types
Contents
Synopsis
- newtype Format = Format Text
- data ListSpacing
- data ListType
- data DelimiterType
- data EnumeratorType
- class (Monoid a, Show a, Rangeable a, HasAttributes a) => IsInline a where
- 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
- sourceColumn :: SourcePos -> Column
- sourceLine :: SourcePos -> Line
- data SourcePos
- sourceName :: SourcePos -> SourceName
Documentation
Instances
| Data Format # | |
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 # | |
| Eq Format # | |
data ListSpacing #
Instances
| Data ListSpacing # | |
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 # | |
| Show ListSpacing # | |
Defined in Commonmark.Types Methods showsPrec :: Int -> ListSpacing -> ShowS # show :: ListSpacing -> String # showList :: [ListSpacing] -> ShowS # | |
| Eq ListSpacing # | |
Defined in Commonmark.Types | |
| Ord ListSpacing # | |
Defined in Commonmark.Types Methods compare :: ListSpacing -> ListSpacing -> Ordering # (<) :: ListSpacing -> ListSpacing -> Bool # (<=) :: ListSpacing -> ListSpacing -> Bool # (>) :: ListSpacing -> ListSpacing -> Bool # (>=) :: ListSpacing -> ListSpacing -> Bool # max :: ListSpacing -> ListSpacing -> ListSpacing # min :: ListSpacing -> ListSpacing -> ListSpacing # | |
Constructors
| BulletList !Char | |
| OrderedList !Int !EnumeratorType !DelimiterType |
Instances
| Data ListType # | |
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 # | |
| Show ListType # | |
| Eq ListType # | |
| Ord ListType # | |
Defined in Commonmark.Types | |
data DelimiterType #
Instances
data EnumeratorType #
Constructors
| Decimal | |
| UpperAlpha | |
| LowerAlpha | |
| UpperRoman | |
| LowerRoman |
Instances
class (Monoid a, Show a, Rangeable a, HasAttributes a) => IsInline a where #
Methods
escapedChar :: Char -> a #
Instances
| Rangeable (Html a) => IsInline (Html a) # | |
| (IsInline a, Semigroup a) => IsInline (WithSourceMap a) # | |
Defined in Commonmark.SourceMap Methods lineBreak :: WithSourceMap a # softBreak :: WithSourceMap a # str :: Text -> WithSourceMap a # entity :: Text -> WithSourceMap a # escapedChar :: Char -> WithSourceMap a # emph :: WithSourceMap a -> WithSourceMap a # strong :: WithSourceMap a -> WithSourceMap a # link :: Text -> Text -> WithSourceMap a -> WithSourceMap a # image :: Text -> Text -> WithSourceMap a -> WithSourceMap a # code :: Text -> WithSourceMap a # rawInline :: Format -> Text -> WithSourceMap a # | |
class (Monoid b, Show b, Rangeable b, IsInline il, HasAttributes b) => IsBlock il b | b -> il where #
Methods
thematicBreak :: b #
blockQuote :: b -> b #
codeBlock :: Text -> Text -> b #
Arguments
| :: Int | Level |
| -> il | text |
| -> b |
rawBlock :: Format -> Text -> b #
list :: ListType -> ListSpacing -> [b] -> b #
Instances
| IsInline (Html a) => IsBlock (Html a) (Html a) # | |
| (IsBlock b a, IsInline b, IsInline (WithSourceMap b), Semigroup a) => IsBlock (WithSourceMap b) (WithSourceMap a) # | |
Defined in Commonmark.SourceMap Methods paragraph :: WithSourceMap b -> WithSourceMap a # plain :: WithSourceMap b -> WithSourceMap a # thematicBreak :: WithSourceMap a # blockQuote :: WithSourceMap a -> WithSourceMap a # codeBlock :: Text -> Text -> WithSourceMap a # heading :: Int -> WithSourceMap b -> WithSourceMap a # rawBlock :: Format -> Text -> WithSourceMap a # referenceLinkDefinition :: Text -> (Text, Text) -> WithSourceMap a # list :: ListType -> ListSpacing -> [WithSourceMap a] -> WithSourceMap a # | |
newtype SourceRange #
Constructors
| SourceRange | |
Fields
| |
Instances
Methods
ranged :: SourceRange -> a -> a #
Instances
| Rangeable (Html SourceRange) # | |
Defined in Commonmark.Html Methods ranged :: SourceRange -> Html SourceRange -> Html SourceRange # | |
| Rangeable (Html ()) # | |
Defined in Commonmark.Html Methods ranged :: SourceRange -> Html () -> Html () # | |
| (Rangeable a, Monoid a, Show a) => Rangeable (WithSourceMap a) # | |
Defined in Commonmark.SourceMap Methods ranged :: SourceRange -> WithSourceMap a -> WithSourceMap a # | |
type Attributes = [Attribute] #
class HasAttributes a where #
Methods
addAttributes :: Attributes -> a -> a #
Instances
| HasAttributes (Html a) # | |
Defined in Commonmark.Html Methods addAttributes :: Attributes -> Html a -> Html a # | |
| HasAttributes (WithSourceMap a) # | |
Defined in Commonmark.SourceMap Methods addAttributes :: Attributes -> WithSourceMap a -> WithSourceMap a # | |
class ToPlainText a where #
Methods
toPlainText :: a -> Text #
Instances
| ToPlainText (Html a) # | |
Defined in Commonmark.Html Methods toPlainText :: Html a -> Text # | |
| ToPlainText a => ToPlainText (WithSourceMap a) # | |
Defined in Commonmark.SourceMap Methods toPlainText :: WithSourceMap a -> Text # | |
Re-exports
sourceColumn :: SourcePos -> Column #
Extracts the column number from a source position.
sourceLine :: SourcePos -> Line #
Extracts the line number from a source position.
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
| Data SourcePos | |
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 # | |
| Show SourcePos | |
| Eq SourcePos | |
| Ord SourcePos | |
sourceName :: SourcePos -> SourceName #
Extracts the name of the source from a source position.