| 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 |
Test.StateMachine.Labelling
Description
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 :: [Predicate a b] -> [a] -> [b]
- data Event (model :: (Type -> Type) -> Type) (cmd :: (Type -> Type) -> Type) (resp :: (Type -> Type) -> Type) (r :: Type -> Type) = Event {
- eventBefore :: model r
- eventCmd :: cmd r
- eventAfter :: model r
- eventResp :: resp r
- execCmds :: forall (model :: (Type -> Type) -> Type) (cmd :: (Type -> Type) -> Type) (m :: Type -> Type) (resp :: (Type -> Type) -> Type). StateMachine model cmd m resp -> Commands cmd resp -> [Event model cmd resp Symbolic]
- execHistory :: forall (model :: (Type -> Type) -> Type) (cmd :: (Type -> Type) -> Type) (m :: Type -> Type) (resp :: (Type -> Type) -> Type). 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 :: [Predicate a b] -> [a] -> [b] Source #
Do a linear scan over the list, returning all successful classifications
data Event (model :: (Type -> Type) -> Type) (cmd :: (Type -> Type) -> Type) (resp :: (Type -> Type) -> Type) (r :: Type -> Type) Source #
Constructors
| Event | |
Fields
| |