Safe Haskell | None |
---|---|
Language | Haskell2010 |
- withProxies :: Q [Dec] -> Q [Dec]
Documentation
withProxies :: Q [Dec] -> Q [Dec] Source #
Make Proxy
definitions for each of the type
synonyms in the given block of declarations. The proxies have the same names as the synonyms but with
the first letter lowercased.
For example:
withProxies [d| type FFoo = "foo" :-> Int |]
Is equivalent to:
type FFoo = "foo" :-> Int fFoo :: Proxy FFoo fFoo = Proxy
Note: the trailing |]
of the quasi quote bracket has to be indented or a parse error will occur.