summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorRyanGlScott <ryan.gl.scott@ku.edu>2015-07-17 00:05:14 +0200
committerBen Gamari <ben@smart-cactus.org>2015-07-17 00:08:10 +0200
commit2c9de9c9a3df8e855c883139b0cb2fd41801bd67 (patch)
tree537691587672cacd63f077ec38d36094e7e5fb59 /docs
parent2c5c29722c78e089eda0baa7ff89154b58f23165 (diff)
downloadhaskell-2c9de9c9a3df8e855c883139b0cb2fd41801bd67.tar.gz
Handle Char#, Addr# in TH quasiquoter (fixes #10620)
DsMeta does not attempt to handle quasiquoted Char# or Addr# values, which causes expressions like `$([| 'a'# |])` or `$([| "abc"# |])` to fail with an `Exotic literal not (yet) handled by Template Haskell` error. To fix this, the API of `template-haskell` had to be changed so that `Lit` now has an extra constructor `CharPrimL` (a `StringPrimL` constructor already existed, but it wasn't used). In addition, `DsMeta` has to manipulate `CoreExpr`s directly that involve `Word8`s. In order to do this, `Word8` had to be added as a wired-in type to `TysWiredIn`. Actually converting from `HsCharPrim` and `HsStringPrim` to `CharPrimL` and `StringPrimL`, respectively, is pretty straightforward after that, since both `HsCharPrim` and `CharPrimL` use `Char` internally, and `HsStringPrim` uses a `ByteString` internally, which can easily be converted to `[Word8]`, which is what `StringPrimL` uses. Reviewers: goldfire, austin, simonpj, bgamari Reviewed By: simonpj, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1054 GHC Trac Issues: #10620
Diffstat (limited to 'docs')
-rw-r--r--docs/users_guide/glasgow_exts.xml38
1 files changed, 37 insertions, 1 deletions
diff --git a/docs/users_guide/glasgow_exts.xml b/docs/users_guide/glasgow_exts.xml
index 22934fa94c..a9a85fa5ea 100644
--- a/docs/users_guide/glasgow_exts.xml
+++ b/docs/users_guide/glasgow_exts.xml
@@ -9822,7 +9822,43 @@ module M where
</orderedlist>
</para>
</listitem>
-
+ <listitem>
+ <para>
+ Expression quotations accept most Haskell language constructs.
+ However, there are some GHC-specific extensions which expression
+ quotations currently do not support, including
+ <itemizedlist>
+ <listitem>
+ <para>
+ Recursive <literal>do</literal>-statements (see
+ <ulink url="https://ghc.haskell.org/trac/ghc/ticket/1262">
+ Trac #1262</ulink>)
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Pattern synonyms (see
+ <ulink url="https://ghc.haskell.org/trac/ghc/ticket/8761">
+ Trac #8761</ulink>)
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Typed holes (see
+ <ulink url="https://ghc.haskell.org/trac/ghc/ticket/10267">
+ Trac #10267</ulink>)
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Partial type signatures (see
+ <ulink url="https://ghc.haskell.org/trac/ghc/ticket/10548">
+ Trac #10548</ulink>)
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </listitem>
</itemizedlist>
(Compared to the original paper, there are many differences of detail.