Copyright | (c) 2023 Yamada Ryo |
---|---|
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 generates automatically various data types and
instances that constitute the effect system supplied by the classy-effects
framework.
Synopsis
- makeEffect :: String -> Name -> Name -> Q [Dec]
- makeEffectF :: Name -> Q [Dec]
- makeEffectH :: Name -> Q [Dec]
- makeEffectWith :: String -> String -> Name -> Name -> Name -> Name -> Q [Dec]
- makeEffectFWith :: String -> Name -> Q [Dec]
- makeEffectHWith :: String -> Name -> Q [Dec]
- makeEmptyEffect :: Name -> Q [Dec]
- makeOrderUnifiedEffectClass :: Name -> Name -> String -> Q [Dec]
Documentation
:: String | A name of order-unified empty effect class generated newly |
-> Name | The name of first-order effect class |
-> Name | The name of higher-order effect class |
-> Q [Dec] |
In addition to makeEffectF
and makeEffectH
,
generate the order-unified empty effect class:
class (FoobarF ... f, FoobarH ... f) => Foobar ... f
, and generate the order-unified effect data type synonym:
type Foobar ... = FoobarS ... :+: LiftIns (FoobarI ...)
makeEffectF :: Name -> Q [Dec] Source #
Generate an instruction data type and type and pattern synonyms for abbreviating
LiftIns
.
:: String | A name of order-unified empty effect class generated newly |
-> String | A name of type synonym of order-unified effect data type generated newly |
-> Name | The name of first-order effect class |
-> Name | The name of instruction data type corresponding to the first-order effect class |
-> Name | The name of higher-order effect class |
-> Name | The name of signature data type corresponding to the higher-order effect class |
-> Q [Dec] |
In addition to makeEffectF
and makeEffectH
,
generate the order-unified empty effect class:
class (FoobarF ... f, FoobarH ... f) => Foobar ... f
, and generate the order-unified effect data type synonym:
type Foobar ... = FoobarS ... :+: LiftIns (FoobarI ...)
makeEffectFWith :: String -> Name -> Q [Dec] Source #
Generate an instruction data type and type and pattern synonyms for abbreviating
LiftIns
.
makeEffectHWith :: String -> Name -> Q [Dec] Source #
Generate a signature data type and a HFunctor
instance.