commonmark-0.2.6: Pure Haskell commonmark parser.
Safe HaskellSafe-Inferred
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 

Instances

Instances details
Monoid SourceMap Source # 
Instance details

Defined in Commonmark.SourceMap

Semigroup SourceMap Source # 
Instance details

Defined in Commonmark.SourceMap

Show SourceMap Source # 
Instance details

Defined in Commonmark.SourceMap

newtype WithSourceMap a Source #

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

Constructors

WithSourceMap 

Instances

Instances details
Applicative 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 #

Monad WithSourceMap Source # 
Instance details

Defined in Commonmark.SourceMap

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

Defined in Commonmark.SourceMap

HasAttributes (WithSourceMap a) Source # 
Instance details

Defined in Commonmark.SourceMap

(IsInline a, Semigroup a) => IsInline (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

ToPlainText a => ToPlainText (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.