niagra-0.0.2: CSS EDSL for Haskell

Copyright(c) Nathaniel Symer, 2015
LicenseMIT
Maintainernate@symer.io
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Data.Niagra.Monad

Description

NiagraT monad transformer; based on WriterT. Stores a state with type [Either Declaration Block].

Synopsis

Documentation

newtype NiagraT m a Source

NiagraT monad transformer.

Constructors

NiagraT (WriterT [Either Declaration Block] m a) 

writeBlocks :: Monad m => [Block] -> NiagraT m () Source

Append Blocks to the NiagraT state.

writeDeclarations :: Monad m => [Declaration] -> NiagraT m () Source

Append Declarations to the NiagraT state.

niagraBlocks :: Monad m => NiagraT m () -> m [Block] Source

Retrieve Blocks from a NiagraT action.

niagraDeclarations :: Monad m => NiagraT m () -> m [Declaration] Source

Retrieve Declarations from a NiagraT action.

niagraState :: Monad m => NiagraT m () -> m ([Declaration], [Block]) Source

Retrieve both Declarations and Blocks from a NiagraT action.