Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data TypeclassOptions
- checkRegistry :: Name -> Q Exp
- makeTypeclass :: Name -> DecsQ
- makeTypeclassWith :: TypeclassOptions -> Name -> DecsQ
- unsafeCoerceRegistry :: Registry ins out -> Registry ins1 out1
Documentation
data TypeclassOptions Source #
These generation options can be used to tweak the generated names
checkRegistry :: Name -> Q Exp Source #
Check that all the input values of a registry can be built This will check that all the input values can be built out of the registry and also return a normalized registry where the types have been de-duplicated
Usage:
initialRegistry :: Registry _ _ initialRegistry = val x +: fun y +: ... +: end
- - Put the definition in another module! (see: https://gitlab.haskell.org/ghc/ghc/issues/9813)
checkedRegistry :: Registry _ _ checkedRegistry = $(checkRegistry initialRegistry)
makeTypeclass :: Name -> DecsQ Source #
Create the haskell code presented in the module description
makeTypeclassWith :: TypeclassOptions -> Name -> DecsQ Source #
Make a typeclass using some specific generation options
unsafeCoerceRegistry :: Registry ins out -> Registry ins1 out1 Source #
This is unsafe and is only used in the context of the checkRegistry function