Copyright | (c) 2023 Yamada Ryo (c) 2020 Michael Szvetits |
---|---|
License | MPL-2.0 (see the file LICENSE) |
Maintainer | ymdfield@outlook.jp |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
This module provides TemplateHaskell
functions to generate the effect data types
(instructions and signatures) for effect type classes.
Synopsis
- makeEffectDataWith :: EffectOrder -> String -> Name -> Q [Dec]
- makeInstructionWith :: String -> Name -> Q [Dec]
- makeSignatureWith :: String -> Name -> Q [Dec]
- makeEffectData :: EffectOrder -> Name -> Q [Dec]
- makeInstruction :: Name -> Q [Dec]
- makeSignature :: Name -> Q [Dec]
- makeLiftInsPatternSynonyms :: Name -> Name -> Q [Dec]
Documentation
:: EffectOrder | An effect order of an effect data type to generate. |
-> String | A name of an effect data type to generate. |
-> Name | The name of the effect class. |
-> Q [Dec] |
Generate instruction and signature data types from the effect class of the given name.
makeInstructionWith :: String -> Name -> Q [Dec] Source #
Generate only an instruction data type from the effect class of the given name.
makeSignatureWith :: String -> Name -> Q [Dec] Source #
Generate only a signature data type from the effect class of the given name.
makeEffectData :: EffectOrder -> Name -> Q [Dec] Source #
Generate instruction and signature data types from the effect class of the given name.
makeInstruction :: Name -> Q [Dec] Source #
Generate only an instruction data type from the effect class of the given name.