Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
-
data
InMemContractInstanceState
t =
InMemContractInstanceState
{
- _contractDef :: ContractActivationArgs ( ContractDef t)
- _contractState :: TVar ( State t)
- handleContractStore :: forall t effs. ( LastMember IO effs, Member ( Reader ( InMemInstances t)) effs, Member ( Error PABError ) effs) => ContractStore t ~> Eff effs
- data InMemInstances t
- initialInMemInstances :: forall t. IO ( InMemInstances t)
Documentation
data InMemContractInstanceState t Source #
The current state of a contract instance Considering InstanceState contractState as mutable to avoid bottleneck when updating InMemInstances especially when an instance already exists. Note also that PutState is adjusted so as to avoid full map update when instance already exists.
handleContractStore :: forall t effs. ( LastMember IO effs, Member ( Reader ( InMemInstances t)) effs, Member ( Error PABError ) effs) => ContractStore t ~> Eff effs Source #
Handle the
ContractStore
effect by writing the state to the
TVar in
SimulatorState
data InMemInstances t Source #
initialInMemInstances :: forall t. IO ( InMemInstances t) Source #