Title: Attribute Grammars Fly First-Class: How to do aspect oriented programming in Haskell
Attribute grammar programs are factored along two axes: the function
axis and the data axis. As a consequence they can be easily adapted
and extended. The question arises whether the attribute grammar
approach to programming can be made available as an embedded domain
specific language (EDSL) in Haskell. In this paper we show how this
can be achieved by making extensive use of the type class mechanism.
The paper identifies the characteristic properties of attribute
grammars, shows how to emulate them, and shows how to overcome some
problems associated with earlier attempts to do so. Finally we show
how common patterns found in attribute gammar programming can be made
explicit, leading to extensions of our EDSL.