quickcheck-state-machine-0.3.0: Test monadic programs using state machine based models

Copyright(C) 2017 ATS Advanced Telematic Systems GmbH Li-yao Xia
LicenseBSD-style (see the file LICENSE)
MaintainerLi-yao Xia <lysxia@gmail.com>
Stabilityprovisional
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Test.StateMachine.TH

Contents

Description

Template Haskell functions to derive common type classes for testing with quickcheck-state-machine.

Synopsis

Special classes for Action types

Components

deriveHFunctor :: Name -> Q [Dec] Source #

deriveHFunctor ''Action
===>
instance HFunctor Action where ...

deriveHFoldable :: Name -> Q [Dec] Source #

deriveHFoldable ''Action
===>
instance HFoldable Action where ...

deriveHTraversable :: Name -> Q [Dec] Source #

deriveHTraversable ''Action
===>
instance HTraversable Action where ...

deriveConstructors :: Name -> Q [Dec] Source #

deriveConstructors ''Action
===>
instance Constructors Action where ...

Show

deriveShows :: Name -> Q [Dec] Source #

Given a name ''Action, derive Show for (Action v a) and (Untyped Action), and Show1 (Action Symbolic). See deriveShow, deriveShowUntyped, and deriveShow1.

deriveShow :: Name -> Q [Dec] Source #

deriveShow ''Action
===>
deriving instance Show1 v => Show (Action v a).

deriveShowUntyped :: Name -> Q [Dec] Source #

deriveShowUntyped ''Action
===>
deriving instance Show (Untyped Action)

Shrink

mkShrinker :: Name -> Q Exp Source #

$(mkShrinker ''Action) creates a generic shrinker of type (Action v a -> [Action v a]) which ignores Reference fields.