Why it's nice to be quoted: quasiquoting for haskell

13 years 8 months ago
Why it's nice to be quoted: quasiquoting for haskell
Quasiquoting allows programmers to use domain specific syntax to construct program fragments. By providing concrete syntax for complex data types, programs become easier to read, easier to write, and easier to reason about and maintain. Haskell is an excellent host language for embedded domain specific languages, and quasiquoting ideally complements the language features that make Haskell perform so well in this area. Unfortunately, until now no Haskell compiler has provided support for quasiquoting. We present an implementation in GHC and demonstrate that by leveraging existing compiler capabilities, building a full quasiquoter requires little more work than writing a parser. Furthermore, we provide a compile-time guarantee that all quasiquoted data is typecorrect. Categories and Subject Descriptors D.3.3 [Software]: Programming Languages General Terms Languages, Design Keywords Meta programming, quasiquoting
Geoffrey Mainland
Added 16 Aug 2010
Updated 16 Aug 2010
Type Conference
Year 2007
Authors Geoffrey Mainland
Comments (0)