Copyright | (c) Fumiaki Kinoshita 2019 |
---|---|
License | BSD3 |
Maintainer | Fumiaki Kinoshita <fumiexcel@gmail.com> |
Safe Haskell | Trustworthy |
Language | Haskell2010 |
Synopsis
- decEffects :: DecsQ -> DecsQ
- decEffectSet :: DecsQ -> DecsQ
- decEffectSuite :: DecsQ -> DecsQ
- customDecEffects :: Bool -> Bool -> DecsQ -> DecsQ
Documentation
decEffects :: DecsQ -> DecsQ Source #
Generate named effects from a GADT declaration.
decEffects [d| data Blah a b x where Blah :: Int -> a -> Blah a b b |]
generates
type Blah a b = "Blah" >: Action '[Int, a] b blah :: forall xs a b . Associate "Blah" (Action '[Int, a] b) xs => Int -> a -> Eff xs b blah a0 a1 = liftEff (Data.Proxy.Proxy :: Data.Proxy.Proxy "Blah") (AArgument a0 (AArgument a1 AResult))
decEffectSet :: DecsQ -> DecsQ Source #
Instead of making a type synonym for individual actions, it defines a list of actions.
decEffectSuite :: DecsQ -> DecsQ Source #
Generates type synonyms for the set of actions and also individual actions.