Template Haskell

“Template Haskell” is the name of both Haskell’s entire metaprogramming infrastructure as well as a specific GHC extension that enables a number of language features that support it.

Most notably, enabling the TemplateHaskell extension allows you to write splices, that allow you to inject generated code into your code. Common uses of splicing include:

A related extension is QuasiQuotes, which provides a slightly different alternative to splicing.

Type Classes offers courses and projects to get you started and make you an expert in FP with Haskell. For $29/month, you get access to the complete archive and all the latest content.