Karya, built on Mon Jul 24 11:39:07 PDT 2017 (patch 33511aca01257b76b88de7c7a2763b7a965c084e)

Safe HaskellNone

Derive.Deriver.DeriveM

Description

This is the core of the Deriver monad, instantiated in detail in Derive.Deriver.Monad.

Documentation

data Deriver st err a Source #

Instances

Show InstrumentCalls # 
Monoid NoteDeriver # 
Log.LogMonad Deriver # 

Methods

write :: Log.Msg -> Deriver () Source #

Show (CallMaps d) # 

Methods

showsPrec :: Int -> CallMaps d -> ShowS #

show :: CallMaps d -> String #

showList :: [CallMaps d] -> ShowS #

Monad (Deriver st err) # 

Methods

(>>=) :: Deriver st err a -> (a -> Deriver st err b) -> Deriver st err b #

(>>) :: Deriver st err a -> Deriver st err b -> Deriver st err b #

return :: a -> Deriver st err a #

fail :: String -> Deriver st err a #

Functor (Deriver st err) # 

Methods

fmap :: (a -> b) -> Deriver st err a -> Deriver st err b #

(<$) :: a -> Deriver st err b -> Deriver st err a #

Applicative.Applicative (Deriver st err) # 

Methods

pure :: a -> Deriver st err a #

(<*>) :: Deriver st err (a -> b) -> Deriver st err a -> Deriver st err b #

(*>) :: Deriver st err a -> Deriver st err b -> Deriver st err b #

(<*) :: Deriver st err a -> Deriver st err b -> Deriver st err a #

type RunResult st err a = (Either err a, st, [Log.Msg]) Source #

run :: st -> Deriver st err a -> RunResult st err a Source #

write :: Log.Msg -> Deriver st err () Source #

throw :: err -> Deriver st err a Source #

modify :: (st -> st) -> Deriver st err () Source #

get :: Deriver st err st Source #

gets :: (st -> a) -> Deriver st err a Source #

put :: st -> Deriver st err () Source #