This is an overview of the paper:
Jeremy Gibbons and Nicolas Wu. 2014. Folding domain-specific languages: deep and shallow embeddings (functional Pearl). SIGPLAN Not. 49, 9 (September 2014), 339–347. DOI:https://doi.org/10.1145/2692915.2628138
The techniques described in the paper are applied to a simple parser combinator DSL.