Comparing Approaches to Generic Programming in Haskell
by Ralf Hinze, Johan Jeuring, and Andres Löh. 2006.
You just started implementing your third web shop in Haskell, and you realize
that a lot of the code you have to write is similar to the code for the previous web
shops. Only the data types have changed. Unfortunately, this implies that all
reporting, editing, storing and loading in the database functionality, and probably
a lot more, has to be changed. Youâ€™ve heard about generic programming,
a technique which can be used to automatically generate programs depending
on types. But searching on the web gives you almost ten approaches to solve
your problem: DrIFT, PolyP, Generic Haskell, Derivable Type Classes, Template
Haskell, Scrap Your Boilerplate, Generics for the Masses, Strafunski, etc.
How do you choose? And these are only the approaches to generic programming
in Haskell. If you are also flexible in the programming language you use, there is
a much larger variety of different approaches to generic programming to choose
[on edit: updated link to point to a more complete version of the paper]