Copyright | (c) 2019-2025 Rudy Matela |
---|---|
License | 3-Clause BSD (see the file LICENSE) |
Maintainer | Rudy Matela <rudy@matela.com.br> |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Conjure.Conjurable.Derive
Description
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 the Data.Express' type binding operators
(-:
,
->:
or
->>:
)
are not in scope,
this derives them as well.
deriveConjurableCascading :: Name -> DecsQ Source #
Derives a Conjurable
instance for a given type Name
cascading derivation of type arguments as well.
deriveConjurableIfNeeded :: Name -> DecsQ Source #
Same as deriveConjurable
but does not warn when instance already exists
(deriveConjurable
is preferable).