reaction-logic-2010.11.17: pluggable pure logic serializable reactor

Data.Reactor.Operational

Description

Operational values wrap reactions with some historical tag. Index is taken from Data.Reactor.MinimalGraph and is a key to an happened External event.

Synopsis

Documentation

data Operational m Source

Reaction contextualized with its history.

Constructors

Operational 

Fields

borned :: Maybe Index

Nothing if the reaction is a base reaction or just an index to the contextualized event which borned it

alive :: Either Index (Reaction m)

an index to the event that killed the reaction or the alive reaction

type OperationalLayer m = ReaderT (Index, Internal) (WriterT [Internal] m)Source

The operational transformer. For reactions to react we store the index to external event and the actual internal event in the reader and store the new events produced by reactions in the writer

mkOperationalPrunedSource

Arguments

:: (Functor m, Monad m) 
=> Operational m

the Operational for the base

-> Pruned (OperationalLayer m) (Maybe Serial, [Index])

the fresh pruned object

Pruned object builder for Operational values