Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- makeCombinator :: Name -> Q [Dec]
Documentation
makeCombinator :: Name -> Q [Dec] Source #
Build a special combinator given a data type name. e.g.
-- List type data List a = Nil | List a (List a) makeCombinator ''List
This example will generate the following code:
makeCombinator ''ListF ======> listf f_acw7 f_acw8 Nil = f_acw7 () listf f_acw7 f_acw8 (Cons a_acw9 a_acwa) = f_acw8 (a_acw9, a_acwa)