Copyright | (c) 2014 Patrick Bahr, Emil Axelsson |
---|---|
License | BSD3 |
Maintainer | Patrick Bahr <paba@di.ku.dk> |
Stability | experimental |
Portability | non-portable (GHC Extensions) |
Safe Haskell | None |
Language | Haskell98 |
Data.Comp.PAG
Description
This module implements recursion schemes derived from attribute grammars. The variant implemented in this module, called parametric attribute grammars, generalises both attribute grammars and attribute grammars with rewrite function (as implemented in Data.Comp.AG).
Documentation
Arguments
:: (Traversable f, Functor g, Functor d, Functor u) | |
=> Syn' f (u :*: d) u g | semantic function of synthesised attributes |
-> Inh' f (u :*: d) d g | semantic function of inherited attributes |
-> (forall a. u a -> d (Context g a)) | initialisation of inherited attributes |
-> Term f | input term |
-> u (Term g) |
This function runs a parametric attribute grammar on a term. The result is the (combined) synthesised attribute at the root of the term.