Karya, built on 2022-03-21T01:30:44 (patch 89d1651424c35e564138d93424a157ff87457245)
Safe HaskellSafe-Inferred

Derive.Deriver.DeriveM

Description

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

Synopsis

Documentation

data Deriver st err a Source #

Instances

Instances details
Monoid NoteDeriver Source # 
Instance details

Defined in Derive.Deriver.Monad

Semigroup NoteDeriver Source # 
Instance details

Defined in Derive.Deriver.Monad

Show Builtins Source # 
Instance details

Defined in Derive.Deriver.Monad

Show InstrumentCalls Source # 
Instance details

Defined in Derive.Deriver.Monad

Show Library Source # 
Instance details

Defined in Derive.Library

ShowVal ControlDeriver Source # 
Instance details

Defined in Derive.Deriver.Monad

ShowVal NoteDeriver Source #

This is an invalid instance, because a deriver has no literal syntax. But this lets me put a deriver in a defaulted argument, and get documentation for it.

Instance details

Defined in Derive.Deriver.Monad

ShowVal PitchDeriver Source # 
Instance details

Defined in Derive.Deriver.Monad

Typecheck ControlDeriver Source # 
Instance details

Defined in Derive.Sig

Typecheck NoteDeriver Source # 
Instance details

Defined in Derive.Sig

Typecheck PitchDeriver Source # 
Instance details

Defined in Derive.Sig

Log.LogMonad Deriver Source # 
Instance details

Defined in Derive.Deriver.Monad

Methods

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

MonadError err (Deriver st err) Source # 
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 Control) Source # 
Instance details

Defined in Derive.Deriver.Monad

Callable (Transformer Note) Source # 
Instance details

Defined in Derive.Deriver.Monad

Callable (Transformer Pitch) Source # 
Instance details

Defined in Derive.Deriver.Monad

ToLibrary (Transformer Control) Source # 
Instance details

Defined in Derive.Library

ToLibrary (Transformer Note) Source # 
Instance details

Defined in Derive.Library

ToLibrary (Transformer Pitch) Source # 
Instance details

Defined in Derive.Library

Applicative (Deriver st err) Source # 
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 #

Functor (Deriver st err) Source # 
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 #

Monad (Deriver st err) Source # 
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 #

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 #

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

Catch and rethrow an error, presumably to annotate it with more information.