Template Haskell

Template Haskell is an extension to HaskellLanguage that allows you to do type-safe compile-time meta-programming, with Haskell both as the manipulating language and the language being manipulated.

From http://www.haskell.org/th/ BrokenLink 16 February 2010. Available through WaybackMachine at http://web.archive.org/web/20080504113632/www.haskell.org/th/. -- MarnenLaibowKoser

See also http://www.haskell.org/haskellwiki/Template_Haskell

It is included in the GlasgowHaskellCompiler.

Template Haskell is a dangerous tool; it can generate unexpected side-effects even at complication time. It can also be used to break the encapsulation offered by module boundaries, to gain access to protected type constructors and thus to break the module's invariants, causing previously safe code to fail. For these reasons, Template Haskell is disabled in SafeHaskell.

See also HygienicMacros DataAndCodeAreTheSameThing

CategoryProgrammingLanguage FunctionalProgrammingLanguage CategoryHaskell

EditText of this page (last edited November 14, 2013) or FindPage with title or text search