Template Haskell allows you to do compile-time meta-programming in Haskell. The background to the main technical innovations is discussed in " Template Meta-programming for Haskell" (Proc Haskell Workshop 2002). There is a Wiki page about Template Haskell at http://www.haskell.org/th/, and that is the best place to look for further details. You may also consult the online Haskell library refere