| Copyright | (c) Fumiaki Kinoshita 2018 |
|---|---|
| License | BSD3 |
| Maintainer | Fumiaki Kinoshita <fumiexcel@gmail.com> |
| Safe Haskell | Trustworthy |
| Language | Haskell2010 |
Data.Extensible.TH
Description
Documentation
mkFieldAs :: Name -> String -> DecsQ Source #
defines a field for "bar" as mkFieldAs (mkName "foo") "bar"foo.
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.