Copyright | (c) Nathaniel Symer, 2015 |
---|---|
License | MIT |
Maintainer | nate@symer.io |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
NiagraT
monad transformer; based on WriterT
. Stores a state
with type [
.Either
Declaration
Block
]
- newtype NiagraT m a = NiagraT (WriterT [Either Declaration Block] m a)
- writeBlocks :: Monad m => [Block] -> NiagraT m ()
- writeDeclarations :: Monad m => [Declaration] -> NiagraT m ()
- niagraBlocks :: Monad m => NiagraT m () -> m [Block]
- niagraDeclarations :: Monad m => NiagraT m () -> m [Declaration]
- niagraState :: Monad m => NiagraT m () -> m ([Declaration], [Block])
Documentation
NiagraT monad transformer.
NiagraT (WriterT [Either Declaration Block] m a) |
writeDeclarations :: Monad m => [Declaration] -> NiagraT m () Source
Append Declaration
s to the NiagraT
state.
niagraDeclarations :: Monad m => NiagraT m () -> m [Declaration] Source
Retrieve Declaration
s from a NiagraT
action.
niagraState :: Monad m => NiagraT m () -> m ([Declaration], [Block]) Source
Retrieve both Declaration
s and Block
s from a NiagraT
action.