Quasi quoting

Jason Dusek jason.dusek at gmail.com
Mon Feb 1 17:46:35 EST 2010


2010/02/01 Simon Peyton-Jones <simonpj at microsoft.com>:
> That might be quite convenient, but alas [|...|] has already
> been taken by Template Haskell quotes, meaning [e| ...|].  So
> you'd need something else.  [*|...|]  perhaps.

  Why is that a problem? Would TH and quasi-quoting be likely to
  be enabled at the same time? One could decide in favour of QQs
  if they are enabled (though yes, this is likely horrible on
  the inside).


> Or we could switch to different quotation brackets altogether
> for quasiquotation, the obvious possibility being
> <|...blah...|>, and <pads|...blah...|>. [...]

  It's true; but I suspect `<|' and `|>' are actually widely
  used. Wouldn't `(|' and `|)' be safer?

  In either case, it's easy to see how me evolve an
  indentational quasi-quote syntax: `[|]' or `(|)'. If the
  default quasi-quoter is simple string literals, then there's
  no need for a HEREDOC in the language.

--
Jason Dusek


More information about the Glasgow-haskell-users mailing list