classy-effects-th-0.1.0.0: Automatic compliance with the classy-effects protocols
Copyright(c) 2023 Yamada Ryo
(c) 2020 Michael Szvetits
LicenseMPL-2.0 (see the file LICENSE)
Maintainerymdfield@outlook.jp
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageGHC2021

Data.Effect.Class.TH

Description

This module provides TemplateHaskell functions to generate the effect data types (instructions and signatures) for effect type classes.

Synopsis

Documentation

makeEffectDataWith Source #

Arguments

:: 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.

makeSignature :: Name -> Q [Dec] Source #

Generate only a signature data type from the effect class of the given name.

makeLiftInsPatternSynonyms :: Name -> Name -> Q [Dec] Source #

Generate the pattern synonyms for instruction constructors: pattern Foobar x y = LiftIns (FoobarI x y) .