Module

WAGS.Universe.Skolems

Package
purescript-wags
Repository
mikesol/purescript-wags

This module is used internally to create and use skolem variables in an audio graph. To learn more about skolemnization, check out the Skolem normal form wiki.

#SkolemPair Source

data SkolemPair

A skolem variable that is unified with a pointer.

#SkolemPairC Source

data SkolemPairC :: Type -> Ptr -> SkolemPair

The unique constructor for a SkolemPair, accepting a skolem variable and a pointer in the audio graph.

Instances

#SkolemList Source

data SkolemList

A list of known skolem variables in the audio graph.

#SkolemListCons Source

data SkolemListCons :: SkolemPair -> SkolemList -> SkolemList

Cons for a SkolemList

Instances

#SkolemListNil Source

data SkolemListNil :: SkolemList

Nil for a SkolemList

Instances

#DiscardableSkolem Source

data DiscardableSkolem

A skolem variable that is trivial and can be discarded, meaning it will never be used.

Instances

#LookupSkolem' Source

class LookupSkolem' (accumulator :: PtrList) (skolem :: Type) (skolemList :: SkolemList) (ptr :: PtrList) | accumulator skolem skolemList -> ptr

Tail-recursive algorithm to look up a skolem variable in the substitution map.

Instances

#LookupSkolem Source

class LookupSkolem (skolem :: Type) (skolemList :: SkolemList) (ptr :: Ptr) | skolem skolemList -> ptr

Class to look up a skolem variable in the substitution map.

Instances

#SkolemNotYetPresent Source

class SkolemNotYetPresent (skolem :: Type) (skolemList :: SkolemList) 

Assertion that a skolem is not yet present in a skolem lists. Makes sure each skolem variable is fresh/unique.

Instances

#SkolemNotYetPresentOrDiscardable Source

class SkolemNotYetPresentOrDiscardable (skolem :: Type) (skolemList :: SkolemList) 

Assertion that a skolem is not yet present in a skolem lists or that it is discardable.

Instances

#MakeInternalSkolemStack Source

class MakeInternalSkolemStack (skolem :: Type) (ptr :: Ptr) (skolems :: SkolemList) (skolemsInternal :: SkolemList) | skolem ptr skolems -> skolemsInternal

Appends skolem and ptr to skolems, creating skolemsInternal. The DiscardableSkolem is discarded in this append operation.

Instances

#GetSkolemFromRecursiveArgument Source

class GetSkolemFromRecursiveArgument (a :: Type) (skolem :: Type) | a -> skolem

Gets a skolem variable from a function with a single proxy argument, treating the proxied type as the skolem variable.

Instances

#ToSkolemizedFunction Source

class ToSkolemizedFunction (a :: Type) (skolem :: Type) (b :: Type) | a skolem -> b where

Coerces a term to a skolemized function. It is either already a skolemized function or a constant, in which case it is coerced to a skolemized function that uses the DiscardableSkolem.

Members

Instances

#GetSkolemizedFunctionFromAU Source

class GetSkolemizedFunctionFromAU (a :: Type) (skolem :: Type) (b :: Type) | a skolem -> b where

Gets a skolem variable from a specific audio unit a.

Members

Instances