Karya, built on 2018-05-31T02:46:59 (patch 0a1a35479c514820d77330ae8a978975ba22a47a)

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 # 
Instance details

Defined in Derive.Deriver.Monad

Show Builtins # 
Instance details

Defined in Derive.Deriver.Monad

Show Library # 
Instance details

Defined in Derive.Library

Semigroup NoteDeriver # 
Instance details

Defined in Derive.Deriver.Monad

Monoid NoteDeriver # 
Instance details

Defined in Derive.Deriver.Monad

Log.LogMonad Deriver # 
Instance details

Defined in Derive.Deriver.Monad

Methods

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

MonadError err (Deriver st err) # 
Instance details

Defined in Derive.Deriver.DeriveM

Methods

throwError :: err -> Deriver st err a #

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

Callable (Transformer Pitch) # 
Instance details

Defined in Derive.Deriver.Monad

Callable (Transformer Control) # 
Instance details

Defined in Derive.Deriver.Monad

Callable (Transformer Note) # 
Instance details

Defined in Derive.Deriver.Monad

ToLibrary (Transformer Pitch) # 
Instance details

Defined in Derive.Library

ToLibrary (Transformer Control) # 
Instance details

Defined in Derive.Library

ToLibrary (Transformer Note) # 
Instance details

Defined in Derive.Library

Monad (Deriver st err) # 
Instance details

Defined in Derive.Deriver.DeriveM

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) # 
Instance details

Defined in Derive.Deriver.DeriveM

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) # 
Instance details

Defined in Derive.Deriver.DeriveM

Methods

pure :: a -> Deriver st err a #

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

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

(*>) :: 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 #