Karya, built on 2020-11-26T21:03:17 (patch 23b5be2d53a9e8e7d6136cda5aae2849abe5cded)
Safe HaskellNone

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
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

ShowVal PitchDeriver # 
Instance details

Defined in Derive.Deriver.Monad

ShowVal ControlDeriver # 
Instance details

Defined in Derive.Deriver.Monad

ShowVal NoteDeriver #

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

Log.LogMonad Deriver # 
Instance details

Defined in Derive.Deriver.Monad

Methods

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

Typecheck PitchDeriver # 
Instance details

Defined in Derive.Sig

Typecheck ControlDeriver # 
Instance details

Defined in Derive.Sig

Typecheck NoteDeriver # 
Instance details

Defined in Derive.Sig

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 #

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 #

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

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