Module

WAGS.Graph.Decorators

Package
purescript-wags
Repository
mikesol/purescript-wags

#Decorating Source

newtype Decorating f

A newtype for a decorator, isomorphic to Exists f where f is a type constructor of type Type -> Type. We use decorating instead of Exists because Exists does not (yet) have an API to work with raw type constructors.

Constructors

Instances

#Decorating' Source

type Decorating' f = forall a. a -> f a

The internal type of decorator.

#dk Source

dk :: forall f. Decorating f -> Decorating' f

Retrieves the type constructor from decorating.

#Decorate Source

class Decorate (a :: Row Type) (b :: Row Type) (c :: Row Type) | a -> b c where

A class for the automatic generation of cursors Given an input row a of decorators, outputs a row b of Identity decorators as well as a Row c of Focus decorators for each key in a. For example:

decorators ::
  Tuple
    { d0: Decorating Identity, d1: Decorating Identity }
    { d0: { d0: Decorating Focus, d1: Decorating Identity }
    , d1: { d0: Decorating Identity, d1: Decorating Focus }
    }
decorators = decorate \{d0, d1} ->
  Speaker (dk d0 SinOsc 440.0 /\ dk d1 SinOsc 880.0 /\ unit)

Check out test/Ops.purs for an example of decorators in use.

Members

Instances

#Focus Source

data Focus a

Used to focus on a specific audio unit when creating a cursor.

Constructors

Instances

#This Source

data This

Used as a placeholder for a spcific audio unit when creating a cursor.

Constructors

Instances

#IgnoreMe Source

data IgnoreMe

Used to tell the cursor traversal to ignore an element.

Constructors

Instances

#IsMultiAudio Source

class IsMultiAudio (audio :: Type) 

Class to determine if a type is audio or multiple audios.

Instances

#IsAudioOrF Source

class IsAudioOrF (audioOrF :: Type) 

Class to determine if a type is audio or a closure producing audio.

Instances

#IsMultiAudioOrF Source

class IsMultiAudioOrF (audioOrF :: Type) 

Class to determine if a type is audio, multiple audios, or a closure producing audio or multiple audios.

Instances

#IsOversample Source

class IsOversample oversample  where

Class to determine if a type is an oversample directive.

Members

Instances

#MakeDecorators Source

class MakeDecorators (rl :: RowList Type) b | rl -> b where

Internal helper class to construct decorators.

Members

Instances

#MakeFocusing Source

class MakeFocusing (rl :: RowList Type) (b :: Row Type) (c :: Row Type) | rl b -> c where

Internal helper class to construct focusing decorators.

Members

Instances