Safe Haskell | None |
---|---|

Language | Haskell2010 |

# Documentation

class (forall a. Show (Action state a), Monad (ActionMonad state), Show state, Typeable state) => StateModel state where Source #

actionName :: Action state a -> String Source #

arbitraryAction :: state -> Gen (Any (Action state)) Source #

shrinkAction :: (Typeable a, Show a) => state -> Action state a -> [Any (Action state)] Source #

initialState :: state Source #

nextState :: state -> Action state a -> Var a -> state Source #

precondition :: state -> Action state a -> Bool Source #

perform :: state -> Action state a -> LookUp -> ActionMonad state a Source #

postcondition :: state -> Action state a -> LookUp -> a -> Bool Source #

monitoring :: (state, state) -> Action state a -> LookUp -> a -> Property -> Property Source #

data Step state where Source #

(:=) :: (Show a, Typeable a, Eq (Action state a), Typeable (Action state a), Show (Action state a)) => Var a -> Action state a -> Step state infix 5 |

#### Instances

Eq (Var a) Source # | |

Data a => Data (Var a) Source # | |

Defined in Test.QuickCheck.StateModel gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Var a -> c (Var a) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Var a) Source # toConstr :: Var a -> Constr Source # dataTypeOf :: Var a -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Var a)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Var a)) Source # gmapT :: (forall b. Data b => b -> b) -> Var a -> Var a Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Var a -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Var a -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Var a -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Var a -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Var a -> m (Var a) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Var a -> m (Var a) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Var a -> m (Var a) Source # | |

Ord (Var a) Source # | |

Defined in Test.QuickCheck.StateModel | |

Show (Var a) Source # | |

stateAfter :: StateModel state => Actions state -> state Source #

runActions :: StateModel state => Actions state -> PropertyM (ActionMonad state) (state, Env) Source #

runActionsInState :: StateModel state => state -> Actions state -> PropertyM (ActionMonad state) (state, Env) Source #