Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type family MockState t :: Type
- data family Cmd t :: (Type -> Type) -> [Type] -> Type
- data family Resp t :: (Type -> Type) -> [Type] -> Type
- type family RealHandles t :: [Type]
- data family MockHandle t a :: Type
- type family RealMonad t :: Type -> Type
- type family Test (f :: (Type -> Type) -> [Type] -> Type) :: Type where ...
- data StateMachineTest t = (Monad (RealMonad t), All Typeable (RealHandles t), All Eq (RealHandles t), All (And Show (Compose Show (MockHandle t))) (RealHandles t), All (And ToExpr (Compose ToExpr (MockHandle t))) (RealHandles t), NTraversable (Resp t), Eq (Resp t (MockHandle t) (RealHandles t)), Show (Resp t (MockHandle t) (RealHandles t)), Show (Resp t (FlipRef Symbolic) (RealHandles t)), Show (Resp t (FlipRef Concrete) (RealHandles t)), NTraversable (Cmd t), Show (Cmd t (FlipRef Symbolic) (RealHandles t)), Show (Cmd t (FlipRef Concrete) (RealHandles t)), Show (MockState t), ToExpr (MockState t)) => StateMachineTest {
- runMock :: Cmd t (MockHandle t) (RealHandles t) -> MockState t -> (Resp t (MockHandle t) (RealHandles t), MockState t)
- runReal :: Cmd t I (RealHandles t) -> RealMonad t (Resp t I (RealHandles t))
- initMock :: MockState t
- newHandles :: forall f. Resp t f (RealHandles t) -> NP ([] :.: f) (RealHandles t)
- generator :: Model t Symbolic -> Maybe (Gen (Cmd t :@ Symbolic))
- shrinker :: Model t Symbolic -> (Cmd t :@ Symbolic) -> [Cmd t :@ Symbolic]
- cleanup :: Model t Concrete -> RealMonad t ()
- newtype At f r = At {
- unAt :: f (FlipRef r) (RealHandles (Test f))
- type (:@) f r = At f r
- data Model t r = Model {
- modelState :: MockState t
- modelRefss :: Refss t r
- newtype Refs t r a = Refs {
- unRefs :: [(Reference a r, MockHandle t a)]
- newtype Refss t r = Refss {
- unRefss :: NP (Refs t r) (RealHandles t)
- newtype FlipRef r h = FlipRef {}
- prop_sequential :: RealMonad t ~ IO => StateMachineTest t -> Maybe Int -> Property
- prop_parallel :: RealMonad t ~ IO => StateMachineTest t -> Maybe Int -> Property
Test type-level parameters
data family Cmd t :: (Type -> Type) -> [Type] -> Type Source #
Instances
(NTraversable (Cmd t), SListI (RealHandles t)) => Traversable (At (Cmd t) :: (Type -> Type) -> Type) Source # | |
Defined in Test.StateMachine.Lockstep.NAry | |
(NTraversable (Cmd t), SListI (RealHandles t)) => Foldable (At (Cmd t) :: (Type -> Type) -> Type) Source # | |
(NTraversable (Cmd t), SListI (RealHandles t)) => Functor (At (Cmd t) :: (Type -> Type) -> Type) Source # | |
data family Resp t :: (Type -> Type) -> [Type] -> Type Source #
Instances
(NTraversable (Resp t), SListI (RealHandles t)) => Traversable (At (Resp t) :: (Type -> Type) -> Type) Source # | |
Defined in Test.StateMachine.Lockstep.NAry | |
(NTraversable (Resp t), SListI (RealHandles t)) => Foldable (At (Resp t) :: (Type -> Type) -> Type) Source # | |
(NTraversable (Resp t), SListI (RealHandles t)) => Functor (At (Resp t) :: (Type -> Type) -> Type) Source # | |
type family RealHandles t :: [Type] Source #
data family MockHandle t a :: Type Source #
Test term-level parameters
data StateMachineTest t Source #
Handle instantiation
At | |
|
Instances
(NTraversable (Resp t), SListI (RealHandles t)) => Traversable (At (Resp t) :: (Type -> Type) -> Type) Source # | |
Defined in Test.StateMachine.Lockstep.NAry | |
(NTraversable (Cmd t), SListI (RealHandles t)) => Traversable (At (Cmd t) :: (Type -> Type) -> Type) Source # | |
Defined in Test.StateMachine.Lockstep.NAry | |
(NTraversable (Resp t), SListI (RealHandles t)) => Foldable (At (Resp t) :: (Type -> Type) -> Type) Source # | |
(NTraversable (Cmd t), SListI (RealHandles t)) => Foldable (At (Cmd t) :: (Type -> Type) -> Type) Source # | |
(NTraversable (Resp t), SListI (RealHandles t)) => Functor (At (Resp t) :: (Type -> Type) -> Type) Source # | |
(NTraversable (Cmd t), SListI (RealHandles t)) => Functor (At (Cmd t) :: (Type -> Type) -> Type) Source # | |
Show (f (FlipRef r) (RealHandles (Test f))) => Show (At f r) Source # | |
Model state
Model | |
|
Instances
(Show1 r, Show (MockState t), All (And Show (Compose Show (MockHandle t))) (RealHandles t)) => Show (Model t r) Source # | |
Generic (Model t r) Source # | |
(ToExpr (MockState t), All (And ToExpr (Compose ToExpr (MockHandle t))) (RealHandles t)) => ToExpr (Model t Concrete) Source # | |
type Rep (Model t r) Source # | |
Defined in Test.StateMachine.Lockstep.NAry type Rep (Model t r) = D1 (MetaData "Model" "Test.StateMachine.Lockstep.NAry" "quickcheck-state-machine-0.7.0-BWWTJ8RJVPk3Dmgg7XSpMH" False) (C1 (MetaCons "Model" PrefixI True) (S1 (MetaSel (Just "modelState") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (MockState t)) :*: S1 (MetaSel (Just "modelRefss") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Refss t r)))) |
Relation between real and mock references for single handle type a
Refs | |
|
Instances
(Show1 r, Show a, Show (MockHandle t a)) => Show (Refs t r a) Source # | |
Generic (Refs t r a) Source # | |
Semigroup (Refs t r a) Source # | |
Monoid (Refs t r a) Source # | |
(ToExpr a, ToExpr (MockHandle t a)) => ToExpr (Refs t Concrete a) Source # | |
type Rep (Refs t r a) Source # | |
Defined in Test.StateMachine.Lockstep.NAry |
Relation between real and mock references for all handle types
Refss | |
|
Instances
(Show1 r, All (And Show (Compose Show (MockHandle t))) (RealHandles t)) => Show (Refss t r) Source # | |
SListI (RealHandles t) => Semigroup (Refss t r) Source # | |
SListI (RealHandles t) => Monoid (Refss t r) Source # | |
All (And ToExpr (Compose ToExpr (MockHandle t))) (RealHandles t) => ToExpr (Refss t Concrete) Source # | |