| Copyright | (C) 2017 ATS Advanced Telematic Systems GmbH Li-yao Xia |
|---|---|
| License | BSD-style (see the file LICENSE) |
| Maintainer | Li-yao Xia <lysxia@gmail.com> |
| Stability | provisional |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | None |
| Language | Haskell2010 |
Test.StateMachine.Types.Generics.TH
Description
Template Haskell functions to derive some general-purpose functionalities.
- deriveShows :: Name -> Q [Dec]
- deriveShow :: Name -> Q [Dec]
- deriveShowUntyped :: Name -> Q [Dec]
- mkShrinker :: Name -> Q Exp
- deriveConstructors :: Name -> Q [Dec]
Documentation
deriveShows :: Name -> Q [Dec] Source #
Given a name ''Action,
derive Show for (Action v a) and (.
See Untyped Action)deriveShow and deriveShowUntyped.
deriveShow :: Name -> Q [Dec] Source #
deriveShow''Action ===> deriving instanceShow1v =>Show(Action v a)@.
deriveShowUntyped :: Name -> Q [Dec] Source #
deriveShowUntyped''Action ===> deriving instanceShow(UntypedAction)
mkShrinker :: Name -> Q Exp Source #
$(
creates a generic shrinker of type mkShrinker ''Action)(Action v a -> [Action v a])
which ignores Reference fields.
deriveConstructors :: Name -> Q [Dec] Source #
deriveConstructors''Action ===> instanceConstructorsAction where ...