commonmark-0.1.0.1: Pure Haskell commonmark parser.

Safe HaskellNone
LanguageHaskell2010

Commonmark.SourceMap

Synopsis

Documentation

newtype SourceMap Source #

A map from source positions to a pair of sequences: first, elements that start at that position; then, elements that end at that position.

Constructors

SourceMap 

newtype WithSourceMap a Source #

Use this when you want to extract a source map as well as the parsed content.

Constructors

WithSourceMap 
Instances
Monad WithSourceMap Source # 
Instance details

Defined in Commonmark.SourceMap

Functor WithSourceMap Source # 
Instance details

Defined in Commonmark.SourceMap

Methods

fmap :: (a -> b) -> WithSourceMap a -> WithSourceMap b #

(<$) :: a -> WithSourceMap b -> WithSourceMap a #

Applicative WithSourceMap Source # 
Instance details

Defined in Commonmark.SourceMap

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

Defined in Commonmark.SourceMap

(Show a, Semigroup a) => Semigroup (WithSourceMap a) Source # 
Instance details

Defined in Commonmark.SourceMap

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

Defined in Commonmark.SourceMap

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

Defined in Commonmark.SourceMap

HasAttributes (WithSourceMap a) Source # 
Instance details

Defined in Commonmark.SourceMap

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

Defined in Commonmark.SourceMap

(IsInline a, Semigroup a) => IsInline (WithSourceMap a) Source # 
Instance details

Defined in Commonmark.SourceMap

(IsBlock b a, IsInline b, IsInline (WithSourceMap b), Semigroup a) => IsBlock (WithSourceMap b) (WithSourceMap a) Source # 
Instance details

Defined in Commonmark.SourceMap

runWithSourceMap :: (Show a, Monoid a) => WithSourceMap a -> (a, SourceMap) Source #

Extract a parsed value and a source map from a WithSourceMap.