incremental-computing-0.0.1.0: Incremental computing

Safe HaskellNone
LanguageHaskell2010

Data.Incremental

Contents

Synopsis

Changes

class Change p where Source #

Minimal complete definition

($$)

Associated Types

type Value p :: * Source #

Methods

($$) :: p -> Value p -> Value p infixr 0 Source #

Instances

Change (PrimitiveChange a) Source # 

Associated Types

type Value (PrimitiveChange a) :: * Source #

Change p => Change (MultiChange p) Source # 

Associated Types

type Value (MultiChange p) :: * Source #

Changeable a => Change (AtomicChange a) Source # 

Associated Types

type Value (AtomicChange a) :: * Source #

(Changeable a, Changeable b) => Change (AtomicChange a b) Source # 

Associated Types

type Value (AtomicChange a b) :: * Source #

Methods

($$) :: AtomicChange a b -> Value (AtomicChange a b) -> Value (AtomicChange a b) Source #

Transformations

data Trans p q Source #

Instances

Category * Trans Source # 

Methods

id :: cat a a #

(.) :: cat b c -> cat a b -> cat a c #

type TransProc m p q = Value p -> m (Value q, p -> m q) Source #

Construction

simpleTrans :: (Value p -> Value q) -> (p -> q) -> Trans p q Source #

stateTrans :: (Value p -> (Value q, s)) -> (p -> s -> (q, s)) -> Trans p q Source #

stateTrans' :: (Value p -> (Value q, s)) -> (p -> s -> (q, s)) -> Trans p q Source #

stTrans :: (forall s. TransProc (ST s) p q) -> Trans p q Source #

trans :: (forall r. (forall m. Monad m => TransProc m p q -> m r) -> r) -> Trans p q Source #

Deconstruction

runTrans :: Trans p q -> (Value p, [p]) -> (Value q, [q]) Source #

toFunction :: Trans p q -> Value p -> Value q Source #

toSTProc :: Trans p q -> TransProc (ST s) p q Source #

Utilities

const :: Monoid q => Value q -> Trans p q Source #

Changeables

class (Monoid (DefaultChange a), Change (DefaultChange a), Value (DefaultChange a) ~ a) => Changeable a Source #

Associated Types

type DefaultChange a :: * Source #

Instances

Changeable Bool Source # 

Associated Types

type DefaultChange Bool :: * Source #

Changeable Int Source # 

Associated Types

type DefaultChange Int :: * Source #

type (->>) a b = Trans (DefaultChange a) (DefaultChange b) infixr 0 Source #