pandoc-builder-monadic-1.1.1: A monadic DSL for building pandoc documents
Safe HaskellSafe-Inferred
LanguageHaskell2010

Text.Pandoc.Builder.Monadic.Internal

Description

Internal module, exposing the Builder(..) type, you should prefer using mapBuilder, or adding something to Utils.

Synopsis

Documentation

newtype BuilderM el a Source #

The pandoc element builder type. It wraps a writer monad. Chances are, you only need Builder (a 'BuilderM el ()'). All builders in this library have an el type in the set {Inline, Block}.

Constructors

Builder 

Fields

Instances

Instances details
IsString (Builder Block) Source # 
Instance details

Defined in Text.Pandoc.Builder.Monadic.Verbatim

IsString (Builder Inline) Source # 
Instance details

Defined in Text.Pandoc.Builder.Monadic.Verbatim

Applicative (BuilderM el) Source # 
Instance details

Defined in Text.Pandoc.Builder.Monadic.Internal

Methods

pure :: a -> BuilderM el a #

(<*>) :: BuilderM el (a -> b) -> BuilderM el a -> BuilderM el b #

liftA2 :: (a -> b -> c) -> BuilderM el a -> BuilderM el b -> BuilderM el c #

(*>) :: BuilderM el a -> BuilderM el b -> BuilderM el b #

(<*) :: BuilderM el a -> BuilderM el b -> BuilderM el a #

Functor (BuilderM el) Source # 
Instance details

Defined in Text.Pandoc.Builder.Monadic.Internal

Methods

fmap :: (a -> b) -> BuilderM el a -> BuilderM el b #

(<$) :: a -> BuilderM el b -> BuilderM el a #

Monad (BuilderM el) Source # 
Instance details

Defined in Text.Pandoc.Builder.Monadic.Internal

Methods

(>>=) :: BuilderM el a -> (a -> BuilderM el b) -> BuilderM el b #

(>>) :: BuilderM el a -> BuilderM el b -> BuilderM el b #

return :: a -> BuilderM el a #

ToMetaValue (Builder (Builder Inline)) Source #

Useful for setting authors

Instance details

Defined in Text.Pandoc.Builder.Monadic.Internal

ToMetaValue (Builder Inline) Source # 
Instance details

Defined in Text.Pandoc.Builder.Monadic.Internal

Monoid a => Monoid (BuilderM el a) Source # 
Instance details

Defined in Text.Pandoc.Builder.Monadic.Internal

Methods

mempty :: BuilderM el a #

mappend :: BuilderM el a -> BuilderM el a -> BuilderM el a #

mconcat :: [BuilderM el a] -> BuilderM el a #

Semigroup (BuilderM el a) Source # 
Instance details

Defined in Text.Pandoc.Builder.Monadic.Internal

Methods

(<>) :: BuilderM el a -> BuilderM el a -> BuilderM el a #

sconcat :: NonEmpty (BuilderM el a) -> BuilderM el a #

stimes :: Integral b => b -> BuilderM el a -> BuilderM el a #

type Builder el = BuilderM el () Source #

Pandoc element builder. Stores written pandoc elements.

buildMany :: Many a -> Builder a Source #

Get pandoc-types' Many as a Builder.

runToList :: Builder el -> [el] Source #

Get elements written in the Builder as a list

runToDList :: Builder el -> DList el Source #

Get elements written in the Builder as a difference list

runToMany :: Builder a -> Many a Source #

Get elements written in a Builder as a Many. This might be useful if you need to interact with pandoc-types.

tellOne :: a -> Builder a Source #

Write a single element to a Builder.

tellAll :: DList a -> Builder a Source #

Write multiple element to a Builder.