Karya, built on 2018-02-23T20:23:55 (patch cf8565b7ac832266878af99a942555d139065f12)

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 # 
Show Builtins # 
Show Library # 
Semigroup NoteDeriver # 
Monoid NoteDeriver # 
Log.LogMonad Deriver # 

Methods

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

MonadError err (Deriver st err) # 

Methods

throwError :: err -> Deriver st err a #

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

Callable (Transformer Pitch) # 
Callable (Transformer Control) # 
Callable (Transformer Note) # 
ToLibrary (Transformer Pitch) # 
ToLibrary (Transformer Control) # 
ToLibrary (Transformer Note) # 
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 (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 #