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

Safe HaskellNone

Derive.Call.Make

Contents

Description

This is like Derive.Call, but higher level. It has templates for creating calls.

Synopsis

Documentation

type Calls d = (Generator d, Transformer d) Source #

Bundle a generator and transformer together, so I can define them together. The rationale is described in CallMaps.

attributed_note :: Module.Module -> Attrs.Attributes -> Calls Note Source #

This is a specialization of transform_notes that adds Attributes.

environ_note :: (Typecheck.Typecheck a, Typecheck.ToVal a) => Module.Module -> CallName -> Tags.Tags -> Doc.Doc -> BaseTypes.Key -> a -> Calls Note Source #

This is a specialization of transform_notes that sets an environ value.

control_note :: Module.Module -> CallName -> Control -> Signal.Y -> Calls Note Source #

This is a specialization of transform_notes that sets a control.

transform_notes :: Module.Module -> CallName -> Tags.Tags -> Doc.Doc -> Sig.Parser a -> (a -> NoteDeriver -> NoteDeriver) -> Calls Note Source #

The generator either derives subs or derives a new Call.note if there are no subs, and then applies the transform. The transformer call just applies the transform.

environ :: (Typecheck.Typecheck val, Typecheck.ToVal val, Taggable d) => Module.Module -> BaseTypes.Key -> Doc.Doc -> Sig.Parser a -> (a -> val) -> Transformer d Source #

Create a transformer that just sets an environ value. This is higher level and more concise than using the = transformer.

environ_val :: (ShowVal.ShowVal a, Typecheck.Typecheck a, Typecheck.ToVal a, Taggable d) => Module.Module -> CallName -> BaseTypes.Key -> a -> Doc.Doc -> Transformer d Source #

Make a call that sets an environ key to a specific value.

add_flag :: Module.Module -> CallName -> Doc.Doc -> Flags.Flags -> Transformer Score.Event Source #

Make a call that adds a flag.

val calls

modify_vcall :: ValCall -> Module.Module -> CallName -> Doc.Doc -> (BaseTypes.Val -> BaseTypes.Val) -> ValCall Source #

Make a new ValCall from an existing one, by mapping over its output.