tcalculus-1.0.0: A DSL prototype for structured realtime/reactive functional programing

Copyright(c) David Janin, 2016
Licensesee the LICENSE file in the distribution
Maintainerjanin@labri.fr
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Reactive.QState

Contents

Description

 

Synopsis

Documentation

myTrace :: [Char] -> a -> a Source #

color :: Int -> [Char] -> [Char] Source #

Qstate data

data QState d iv v Source #

Embedding of qlists into event function

Constructors

QState 

Fields

Instances

(Num d, Ord d, Ord iv, Show d, Show iv, Show v) => Show (QState d iv v) Source # 

Methods

showsPrec :: Int -> QState d iv v -> ShowS #

show :: QState d iv v -> String #

showList :: [QState d iv v] -> ShowS #

data DelayedEvents d v Source #

Delayed event bundles

Constructors

DelayedEvents !(TimeStamp d) [Event v] 

Instances

(Show d, Show v) => Show (DelayedEvents d v) Source # 

Initialization

initQState :: (Num d, Ord d, Ord iv, Ord v) => (Tile (RDuration d iv) iv iv -> Tile (RDuration d iv) iv v) -> QState d iv v Source #

Init a qstate from a function of tile turned into a function over QLists.

inputToQ :: (Lattice d, Num d) => InQList d iv -> QList d iv iv Source #

converts input lists to output lists

Transition loops

updateState :: forall d iv v. (Num d, Ord d, Ord iv, Ord v, Show d, Show v, Show iv) => QState d iv v -> DelayedEvents d iv -> (QState d iv v, [DelayedEvents d v], WakeUpOrder d) Source #

Updates states upon reception of list of a bundle of new events, possibly empty in case of wake up.

In updateState ts le, ts is the Qstate, le is the possibly empty list of timed stamped events (aka DelayedEvents)

updateStateOnEvent :: (Num d, Ord d, Ord iv, Ord v, Show d, Show v, Show iv) => QState d iv v -> DelayedEvents d iv -> Maybe (TimeStamp d) -> (QState d iv v, [DelayedEvents d v], WakeUpOrder d) Source #

The kernel update step upon reception of list of non empty bundle of new events