summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2011-08-03 16:44:00 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2011-08-03 16:44:00 +0100
commit617edd7799da3d5b524385584585e56f25915e5f (patch)
tree7be5712ffc20501bc0523896ab5fcc4126652c55
parent9d251f5ec83be41fdc3a7f1104ea8968fa9e5ebe (diff)
downloadhaskell-617edd7799da3d5b524385584585e56f25915e5f.tar.gz
Document the (lack of) escape conventions in quasiquotes
See Trac #5348
-rw-r--r--docs/users_guide/glasgow_exts.xml12
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/users_guide/glasgow_exts.xml b/docs/users_guide/glasgow_exts.xml
index 32581875d8..3a06019842 100644
--- a/docs/users_guide/glasgow_exts.xml
+++ b/docs/users_guide/glasgow_exts.xml
@@ -6750,6 +6750,18 @@ There must be no spaces in the token
The quoted <replaceable>string</replaceable>
can be arbitrary, and may contain newlines.
</para></listitem>
+<listitem><para>
+The quoted <replaceable>string</replaceable>
+finishes at the first occurrence of the two-character sequence <literal>"|]"</literal>.
+Absolutely no escaping is performed. If you want to embed that character
+sequence in the string, you must invent your own escape convention (such
+as, say, using the string <literal>"|~]"</literal> instead), and make your
+quoter function interpret <literal>"|~]"</literal> as <literal>"|]"</literal>.
+One way to implement this is to compose your quoter with a pre-processing pass to
+perform your escape conversion. See the
+<ulink url="http://hackage.haskell.org/trac/ghc/ticket/5348">
+discussion in Trac</ulink> for details.
+</para></listitem>
</itemizedlist>
</para></listitem>