Commonmark.Syntax

commonmark-0.2.6.1: Pure Haskell commonmark parser.

Safe Haskell | None
Language | Haskell2010

Commonmark.Syntax

Synopsis

- data SyntaxSpec (m :: Type -> Type) il bl = SyntaxSpec {
  - syntaxBlockSpecs :: [BlockSpec m il bl]
  - syntaxBracketedSpecs :: [BracketedSpec il]
  - syntaxFormattingSpecs :: [FormattingSpec il]
  - syntaxInlineParsers :: [InlineParser m il]
  - syntaxFinalParsers :: [BlockParser m il bl bl]
  - syntaxAttributeParsers :: forall u (m1 :: Type -> Type). Monad m1 => [ParsecT [Tok] u m1 Attributes]
  }
- defaultSyntaxSpec :: forall (m :: Type -> Type) il bl. (Monad m, IsBlock il bl, IsInline il) => SyntaxSpec m il bl

# Documentation

data SyntaxSpec (m :: Type -> Type) il bl #

A `SyntaxSpec` defines a basic collection of syntax elements or an extension. `SyntaxSpec`s can be composed using monoidal `mappend`.

Constructors

SyntaxSpec |
Fields syntaxBlockSpecs :: [BlockSpec m il bl] Defines block structure syntaxBracketedSpecs :: [BracketedSpec il] Defines bracketed inline containers (inli, image) syntaxFormattingSpecs :: [FormattingSpec il] Defines formatted inline containers (strong, emph) syntaxInlineParsers :: [InlineParser m il] Defines inline elements that don't contain inlines syntaxFinalParsers :: [BlockParser m il bl bl] Run at the end of document, e.g. to collect footnotes syntaxAttributeParsers :: forall u (m1 :: Type -> Type). Monad m1 => [ParsecT [Tok] u m1 Attributes] Parse attributes

#### Instances

Instances details

Monoid (SyntaxSpec m il bl) # |
Instance details Defined in Commonmark.Syntax Methods mempty :: SyntaxSpec m il bl # mappend :: SyntaxSpec m il bl -> SyntaxSpec m il bl -> SyntaxSpec m il bl # mconcat :: [SyntaxSpec m il bl] -> SyntaxSpec m il bl #
Semigroup (SyntaxSpec m il bl) # |
Instance details Defined in Commonmark.Syntax Methods (<>) :: SyntaxSpec m il bl -> SyntaxSpec m il bl -> SyntaxSpec m il bl # sconcat :: NonEmpty (SyntaxSpec m il bl) -> SyntaxSpec m il bl # stimes :: Integral b => b -> SyntaxSpec m il bl -> SyntaxSpec m il bl #

defaultSyntaxSpec :: forall (m :: Type -> Type) il bl. (Monad m, IsBlock il bl, IsInline il) => SyntaxSpec m il bl #

Standard commonmark syntax.