| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Logic.SingleStep
Contents
Simple effects
class InterpretMod (mod :: Type) (m :: Type -> Type) (op :: Effect) where Source #
Explain how to interpret an atomic modification, applied an operation of a simple effect type (i.e. one that does not have any higher-order effects).
modis the type of atomic modificationsmis a domain into which the modified operation will be interpreted (a monad)opis the effect type.
Methods
interpretMod :: op (AST dummy) a -> ModInterp mod m a Source #
interpretMod takes the current operation, an atomic
modification and describes how they should interact.
There are the following possibilities, corresponding to the
constructors of LtlInterp:
- If you want to ignore the current operation, make it
Invisible. Invisible operations will be ignored by the modification process, but still executed. - If you want to try applying the modification, use
Visible. Depending on the current state reached so far, the application of the modification can fail. Hence, there are two options: - If the modification successfully applies, return some
computation that returns
Just. - If the modification fails to apply, return
Nothing.
The dummy type variable signifies that the "nesting" monad of
the effect type is irrelevant, since we're not dealing with
higher-order effects.
Instances
| MonadAccounts m => InterpretMod AccountsMod m MonadAccountsEffect Source # | |
Defined in Examples.Account.PaymentMod Methods interpretMod :: forall (dummy :: [Effect]) a. MonadAccountsEffect (AST dummy) a -> ModInterp AccountsMod m a Source # | |
| (MonadError KeyValueError m, MonadKeyValue m) => InterpretMod KeyValueMod m MonadKeyValueEffect Source # | |
Defined in Examples.Ltl.Simple Methods interpretMod :: forall (dummy :: [Effect]) a. MonadKeyValueEffect (AST dummy) a -> ModInterp KeyValueMod m a Source # | |