Copyright | (c) 2019-2024 Rudy Matela |
---|---|
License | 3-Clause BSD (see the file LICENSE) |
Maintainer | Rudy Matela <rudy@matela.com.br> |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Allows automatic derivation of Conjurable
typeclass instances.
Synopsis
- deriveConjurable :: Name -> DecsQ
- deriveConjurableCascading :: Name -> DecsQ
- deriveConjurableIfNeeded :: Name -> DecsQ
Documentation
deriveConjurable :: Name -> DecsQ Source #
Derives an Conjurable
instance for the given type Name
.
This function needs the TemplateHaskell
extension.
If -:
, ->:
, ->>:
, ->>>:
, ... are not in scope,
this will derive them as well.
For now,
this function only derives
conjureEquality
,
conjureTiers
and
conjureExpress
and does not derive
conjureSubTypes
,
conjureArgumentCases
and
conjureSize
.
These will be added in future versions.
If you plan to use features that depend on these functionalities,
please define your instances manually.
deriveConjurableCascading :: Name -> DecsQ Source #
Derives a Conjurable
instance for a given type Name
cascading derivation of type arguments as well.
For now,
this function only derives
conjureEquality
,
conjureTiers
and
conjureExpress
and does not derive
conjureSubTypes
,
conjureArgumentCases
and
conjureSize
.
These will be added in future versions.
If you plan to use features that depend on these functionalities,
please define your instances manually.
deriveConjurableIfNeeded :: Name -> DecsQ Source #
Same as deriveConjurable
but does not warn when instance already exists
(deriveConjurable
is preferable).
For now,
this function only derives
conjureEquality
,
conjureTiers
and
conjureExpress
and does not derive
conjureSubTypes
,
conjureArgumentCases
and
conjureSize
.
These will be added in future versions.
If you plan to use features that depend on these functionalities,
please define your instances manually.