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 |
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 (
, and Untyped
Action)Show1
(Action Symbolic)
. See deriveShow
,
deriveShowUntyped
, and deriveShow1
.
deriveShow :: Name -> Q [Dec] Source #
deriveShow
''Action ===> deriving instanceShow1
v =>Show
(Action v a).
deriveShowUntyped :: Name -> Q [Dec] Source #
deriveShowUntyped
''Action ===> deriving instanceShow
(Untyped
Action)
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 ===> instanceConstructors
Action where ...