Global Information Lookup Global Information

Template Haskell information


Template Haskell is an experimental language extension to the Haskell programming language implemented in the Glasgow Haskell Compiler (version 6 and later).[1] In early incarnations it was also known as Template Meta-Haskell.

It allows compile-time metaprogramming and generative programming by means of manipulating abstract syntax trees and 'splicing' results back into a program. The abstract syntax is represented using ordinary Haskell data types and the manipulations are performed using ordinary Haskell functions.

'Quasi-quote' brackets [| and |] are used to get the abstract syntax tree for the enclosed expression and 'splice' brackets $( and ) are used to convert from abstract syntax tree into code.

As of GHC-6.10, Template Haskell provides support for user-defined quasi-quoters, which allows users to write parsers which can generate Haskell code from an arbitrary syntax. This syntax is also enforced at compile time. For example, using a custom quasi-quoter for regular expressions could look like this:

 digitsFollowedByLetters = [$re| \d+ \s+ |]
  1. ^ Sheard, Tim; Jones, Simon Peyton (3 October 2002). "Template meta-programming for Haskell". Proceedings of the 2002 ACM SIGPLAN workshop on Haskell. Association for Computing Machinery. pp. 1–16. doi:10.1145/581690.581691. ISBN 1581136056. S2CID 6096655.

and 20 Related for: Template Haskell information

Request time (Page generated in 0.7992 seconds.)

Template Haskell

Last Update:

Template Haskell is an experimental language extension to the Haskell programming language implemented in the Glasgow Haskell Compiler (version 6 and...

Word Count : 232

Template metaprogramming

Last Update:

original on 2009-03-04. "Template Haskell". (type-safe metaprogramming in Haskell) Bright, Walter. "Templates Revisited". (template metaprogramming in the...

Word Count : 3113

Generic programming

Last Update:

They are known as parametric polymorphism in ML, Scala, Julia, and Haskell. (Haskell terminology also uses the term "generic" for a related but somewhat...

Word Count : 7708

Glasgow Haskell Compiler

Last Update:

provided in standard Haskell. A significantly more powerful system of types and typeclasses, described below. Template Haskell, a system for compile-time...

Word Count : 1871

Metaprogramming

Last Update:

dialects Clojure Common Lisp Racket Scheme hygienic macros MacroML Template Haskell Scala Nim Rust Haxe Julia Elixir The IBM/360 and derivatives had powerful...

Word Count : 1435

Haskell Indian Nations University

Last Update:

Haskell Indian Nations University is a public tribal land-grant university in Lawrence, Kansas, United States. Founded in 1884 as a residential boarding...

Word Count : 4097

List of functional programming topics

Last Update:

collection Clean Clojure Elixir Erlang FP F# Haskell Glasgow Haskell Compiler Gofer Hugs Template Haskell ISWIM JavaScript Kent Recursive Calculator Lisp...

Word Count : 205

Lee Grant

Last Update:

Lee Grant (born Lyova Haskell Rosenthal; October 31, during the mid-1920s) is an American actress, documentarian, and director. For her film debut in...

Word Count : 4610

Haskell Wexler

Last Update:

Haskell Wexler ASC (February 6, 1922 – December 27, 2015) was an American cinematographer, film producer, and director. Wexler was judged to be one of...

Word Count : 2413

David Haskell

Last Update:

David Michael Haskell (June 4, 1948 – August 30, 2000) was an American film, stage and television actor and singer best known for his performance in the...

Word Count : 385

Haskell features

Last Update:

This article describes the features in the programming language Haskell. A simple example that is often used to demonstrate the syntax of functional languages...

Word Count : 3537

Template Toolkit

Last Update:

software portal Template Toolkit Web Site Template Toolkit on the CPAN GitHub repository Andy Wardley's Template Toolkit Web page Haskell version "TT3 Development...

Word Count : 241

Concurrent Haskell

Last Update:

Concurrent Haskell extends Haskell 98 with explicit concurrency. Its two main underlying concepts are: A primitive type MVar α implementing a bounded/single-place...

Word Count : 1106

David Hackworth

Last Update:

Colonel David Haskell Hackworth (November 11, 1930 – May 4, 2005) was a United States Army officer and journalist, who was decorated in both the Korean...

Word Count : 4068

Kahlil Gibran

Last Update:

Miss Haskell," but Haskell called it off, making it "clear to him that she preferred his friendship to any burdensome tie of marriage." Haskell would...

Word Count : 9362

Neil Haskell

Last Update:

Neil David Haskell (born April 16, 1987) is an American contemporary dancer and actor. He is best known as a contestant on So You Think You Can Dance...

Word Count : 890

Type class

Last Update:

(C++). As an illustration, the above mentioned Haskell example of typeclass Eq would be written as template <typename T> concept Equal = requires (T a, T...

Word Count : 2353

List comprehension

Last Update:

produce the entirety of the list thus allowing, for example, the previous Haskell definition of the members of an infinite list. The existence of related...

Word Count : 2556

List of compilers

Last Update:

improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages) (Learn how and when to remove this message)...

Word Count : 1983

Functional programming

Last Update:

(PDF) on 2011-10-08. Retrieved 2009-08-26. "Haskell in industry". Haskell Wiki. Retrieved 2009-08-26. Haskell has a diverse range of use commercially, from...

Word Count : 8548

PDF Search Engine © AllGlobal.net