compdata-dags-0.2: Compositional Data Types on DAGs

Copyright(c) 2014 Patrick Bahr, Emil Axelsson
LicenseBSD3
MaintainerPatrick Bahr <paba@di.ku.dk>
Stabilityexperimental
Portabilitynon-portable (GHC Extensions)
Safe HaskellNone
LanguageHaskell98

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).

Synopsis

Documentation

runPAG Source

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.