Template meta-programming for Haskell

Tim Sheard, Simon Peyton Jones
2002 SIGPLAN notices  
We propose a new extension to the purely functional programming language Haskell that supports compile-time meta-programming. The purpose of the system is to support the algorithmic construction of programs at compile-time. The ability to generate code at compile time allows the programmer to implement such features as polytypic programs, macro-like expansion, user directed optimization (such as inlining), and the generation of supporting data structures and functions from existing data
more » ... es and functions. Our design is being implemented in the Glasgow Haskell Compiler, ghc. This version is very slightly modified from the Haskell Workshop 2002 publication; a couple of typographical errors are fixed in Figure 2.
doi:10.1145/636517.636528 fatcat:euqngdkb2nfyhfjut6xewzenwi