Copyright | (c) 2005-2011 AT&T Kathleen Fisher <kfisher@research.att.com> |
---|---|
License | MIT |
Maintainer | Karl Cronburg <karl@cs.tufts.edu> |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- pads :: QuasiQuoter
- padsDerivation :: Derivation -> QuasiQuoter
- pparseDecl :: Derivation -> String -> Q ([Dec], [PadsDecl])
- make_pads_declarations :: [PadsDecl] -> Q [Dec]
- padsE :: ([PadsDecl] -> Q [Dec]) -> QuasiQuoter
Documentation
pads :: QuasiQuoter Source #
The PADS quasiquoter which can be invoked by e.g.:
[pads| type MyType = (Int, Int) |]
padsDerivation :: Derivation -> QuasiQuoter Source #
Same as pads, but parametrized by a higher order function which constructs a list of Haskell decls to splice into scope for each PADS metadata and data declaration. Namely the type, newtype, and data PADS constructs get passed into derivation as a template haskell declaration.
PADS only supports quasiquotes in place of a Haskell declaration (expressions, patterns, and types produce errors).
pparseDecl :: Derivation -> String -> Q ([Dec], [PadsDecl]) Source #
Just the declaration parser for a PADS quasiquotation. Glues together
parsePadsDecls
and make_pads_declarations
, the parser and code
generator.