Copyright | (C) 2019 Edsko de Vries |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Stevan Andjelkovic <stevan.andjelkovic@strath.ac.uk> |
Stability | provisional |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
This module exports helpers that are useful for labelling properties.
Synopsis
- data Predicate a b = Predicate {
- predApply :: a -> Either b (Predicate a b)
- predFinish :: Maybe b
- predicate :: (a -> Either b (Predicate a b)) -> Predicate a b
- maximum :: forall a b. Ord b => (a -> Maybe b) -> Predicate a b
- classify :: forall a b. [Predicate a b] -> [a] -> [b]
- data Event model cmd resp (r :: Type -> Type) = Event {
- eventBefore :: model r
- eventCmd :: cmd r
- eventAfter :: model r
- eventResp :: resp r
- execCmds :: forall model cmd m resp. StateMachine model cmd m resp -> Commands cmd resp -> [Event model cmd resp Symbolic]
- execHistory :: forall model cmd m resp. StateMachine model cmd m resp -> History cmd resp -> [Event model cmd resp Concrete]
Documentation
predicate :: (a -> Either b (Predicate a b)) -> Predicate a b Source #
Construct simply predicate that returns Nothing
on termination
classify :: forall a b. [Predicate a b] -> [a] -> [b] Source #
Do a linear scan over the list, returning all successful classifications
data Event model cmd resp (r :: Type -> Type) Source #
Event | |
|
execCmds :: forall model cmd m resp. StateMachine model cmd m resp -> Commands cmd resp -> [Event model cmd resp Symbolic] Source #
execCmds
is just the repeated form of execCmd
.
execHistory :: forall model cmd m resp. StateMachine model cmd m resp -> History cmd resp -> [Event model cmd resp Concrete] Source #