Extensible and Modular Generics for the Masses (EMGM) applies concepts of datatype-generic programming to define generic functions for supported datatypes using type classes.
for 6.10 We show how to build a quasiquoter for a simple mathematical expression language. Although the example is small, it demonstrates all aspects of building a quasiquoter. We do not mean to suggest that one gains much from a quasiquoter for such a small language relative to using abstract syntax directly except from a pedagogical point of view---this is just a tutorial!