happstack-state-6.1.4: Event-based distributed state.

Safe HaskellNone

Happstack.State.Types

Synopsis

Documentation

data Env Source

Constructors

Env 

Fields

evRandoms :: TVar StdGen
 
evContext :: TxContext
 

type TxId = Int64Source

type EpochMilli = Int64Source

data TxContext Source

Constructors

TxContext 

Fields

txId :: TxId
 
txRand :: Word64
 
txTime :: EpochMilli
 
txStdGen :: StdGen
 

type AnyEv a = forall t. (Monad (t STM), MonadTrans t) => Ev (t STM) aSource

ACID computations that work with any state and event types.

newtype Ev m t Source

Monad for ACID event handlers.

Constructors

Ev 

Fields

unEv :: Env -> m t
 

Instances

MonadState st (Update st) 
MonadReader st (Update st) 
MonadReader st (Query st) 
Monad m => Monad (Ev m) 
Monad m => Functor (Ev m) 
MonadPlus m => MonadPlus (Ev m) 
(Typeable state, Typeable t) => Typeable (Ev (StateT state STM) t) 
(Typeable state, Typeable t) => Typeable (Ev (ReaderT state STM) t) 

type Query state = Ev (ReaderT state STM)Source

type Update state = Ev (StateT state STM)Source

unsafeIOToSTM :: IO a -> STM aSource

newtype Shadow t a Source

Constructors

Shadow 

Fields

unShadow :: a
 

Instances

Typeable2 Shadow 

newtype UsingXml a Source

Constructors

UsingXml 

Fields

unXml :: a
 

Instances

Typeable1 UsingXml