[Haskell] ANNOUNCE: string-qq-0.0.2
gale at sefer.org
Thu Jun 30 15:35:58 CEST 2011
Ben Millwood wrote:
> I once spent some time and energy making [foo| bar baz |\] quux |] do
> the right thing for a quasiquoter I implemented, only to discover that
> GHC already supports [foo| bar baz \|] quux |]. So yes, you can escape
Wow, that actually works.
That is very surprising, counter-intuitive, and undocumented.
Quasi-quotation is supposed to be a mechanism by which you can
define your own compile-time syntax. One would expect GHC to
stay out of the way as much as possible. People who need
some way to quote "|]" can define their own syntax for that.
And if that really is intended to be a supported feature, you
would certainly think it important enough to warrant a mention
in the GHC docs.
So even if this works, I wouldn't rely on it until we get confirmation
from the GHC team that it is indeed a supported a feature and won't
go away in some future version of GHC.
More information about the Haskell