cmark-patterns-0.1.0.0: Pattern synonyms for cmark

Safe HaskellNone
LanguageHaskell2010

CMark.Patterns

Contents

Description

Pattern synonyms for working with the cmark AST. You can construct and deconstruct the AST with them as if they were ordinary constructors.

Each pattern comes in two versions; if you don't care about position info, use the one with the underscore. (If you try to use it for construction, it will use Nothing as position info.)

Since list items can only contain ITEM, we provide additional patterns for lists – ListItems and ListItems_ – which automatically unwrap them.

Synopsis

DOCUMENT

pattern Document :: Maybe PosInfo -> [Node] -> Node Source #

pattern Document_ :: [Node] -> Node Source #

THEMATIC_BREAK (has no children)

PARAGRAPH

pattern Paragraph :: Maybe PosInfo -> [Node] -> Node Source #

pattern Paragraph_ :: [Node] -> Node Source #

BLOCK_QUOTE

pattern BlockQuote :: Maybe PosInfo -> [Node] -> Node Source #

pattern BlockQuote_ :: [Node] -> Node Source #

HTML_BLOCK (has no children)

pattern HtmlBlock_ :: Text -> Node Source #

CUSTOM_BLOCK

pattern CustomBlock :: Maybe PosInfo -> OnEnter -> OnExit -> [Node] -> Node Source #

pattern CustomBlock_ :: OnEnter -> OnExit -> [Node] -> Node Source #

CODE_BLOCK (has no children)

pattern CodeBlock :: Maybe PosInfo -> Info -> Text -> Node Source #

pattern CodeBlock_ :: Info -> Text -> Node Source #

HEADING

pattern Heading :: Maybe PosInfo -> Level -> [Node] -> Node Source #

pattern Heading_ :: Level -> [Node] -> Node Source #

LIST

pattern List_ :: ListAttributes -> [Node] -> Node Source #

pattern ListItems_ :: ListAttributes -> [[Node]] -> Node Source #

ITEM

pattern Item :: Maybe PosInfo -> [Node] -> Node Source #

pattern Item_ :: [Node] -> Node Source #

TEXT (has no children)

pattern Text :: Maybe PosInfo -> Text -> Node Source #

pattern Text_ :: Text -> Node Source #

SOFTBREAK (has no children)

pattern Softbreak_ :: Node Source #

LINEBREAK (has no children)

pattern Linebreak_ :: Node Source #

HTML_INLINE (has no children)

pattern HtmlInline_ :: Text -> Node Source #

CUSTOM_INLINE

pattern CustomInline :: Maybe PosInfo -> OnEnter -> OnExit -> [Node] -> Node Source #

pattern CustomInline_ :: OnEnter -> OnExit -> [Node] -> Node Source #

CODE (has no children)

pattern Code :: Maybe PosInfo -> Text -> Node Source #

pattern Code_ :: Text -> Node Source #

EMPH

pattern Emph :: Maybe PosInfo -> [Node] -> Node Source #

pattern Emph_ :: [Node] -> Node Source #

STRONG

pattern Strong :: Maybe PosInfo -> [Node] -> Node Source #

pattern Strong_ :: [Node] -> Node Source #

LINK

pattern Link :: Maybe PosInfo -> Url -> Title -> [Node] -> Node Source #

pattern Link_ :: Url -> Title -> [Node] -> Node Source #

IMAGE

pattern Image :: Maybe PosInfo -> Url -> Title -> [Node] -> Node Source #

pattern Image_ :: Url -> Title -> [Node] -> Node Source #