Safe Haskell | None |
---|---|
Language | Haskell2010 |
Grower - grows the types to hold a syntax tree
- syntaxTrees :: Name -> [Name] -> Seq (Rule t) -> DecsQ
- branchConstructor :: Branch t -> ConQ
- ruleToType :: Name -> [Name] -> Rule t -> Q Dec
Documentation
:: Name | Name of terminal type. Typically you will get this from the
Template Haskell quoting mechanism, e.g. |
-> [Name] | What to derive, e.g. |
-> Seq (Rule t) | |
-> DecsQ |
Makes the top-level declarations for each given Rule
and for
all ancestors of the given Rule
s. Since ancestors are
included, you can get the entire tree of types that you need by
applying this function to a single start symbol. Example:
Pinchot.Examples.SyntaxTrees.
branchConstructor :: Branch t -> ConQ Source