Sep 20, 2011

Epiphany about quasiquotes

Quasiquotes do not have to conform to the syntax rules of the host language. In fact, they can be written in arbitrary style, as long as this style somehow exposes antiquotation facilities.

With such quasiquotes one can, say, concisely implement type-safe regexes or easily express peephole optimizations. Read more on that in "Why It’s Nice to be Quoted: Quasiquoting for Haskell".

No comments:

Post a Comment