diff options
author | Edward Z. Yang <ezyang@cs.stanford.edu> | 2015-05-04 16:10:05 -0700 |
---|---|---|
committer | Edward Z. Yang <ezyang@cs.stanford.edu> | 2015-05-11 09:09:22 -0700 |
commit | f16ddcee0c64a92ab911a7841a8cf64e3ac671fd (patch) | |
tree | 3427379f02f5cd3cd53704b5fa35695fd9b5e3aa /docs | |
parent | ecc3d6be218b1c7a36ee3f2f36c4f3ac4f45c34f (diff) | |
download | haskell-f16ddcee0c64a92ab911a7841a8cf64e3ac671fd.tar.gz |
Support stage 1 Template Haskell (non-quasi) quotes, fixes #10382.
Summary:
This commit adds stage 1 support for Template Haskell
quoting, e.g. [| ... expr ... |], which is useful
for authors of quasiquoter libraries that do not actually
need splices. The TemplateHaskell extension now does not
unconditionally fail; it only fails if the renamer encounters
a splice that it can't run.
In order to make sure the referenced data structures
are consistent, template-haskell is now a boot library.
There are some minor BC changes to template-haskell to make it boot
on GHC 7.8.
Note for reviewer: big diff changes are simply code
being moved out of an ifdef; there was no other substantive
change to that code.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: simonpj, austin, goldfire
Subscribers: bgamari, thomie
Differential Revision: https://phabricator.haskell.org/D876
GHC Trac Issues: #10382
Diffstat (limited to 'docs')
-rw-r--r-- | docs/users_guide/7.12.1-notes.xml | 7 | ||||
-rw-r--r-- | docs/users_guide/glasgow_exts.xml | 4 |
2 files changed, 8 insertions, 3 deletions
diff --git a/docs/users_guide/7.12.1-notes.xml b/docs/users_guide/7.12.1-notes.xml index 4dbb0b20cd..9a87588858 100644 --- a/docs/users_guide/7.12.1-notes.xml +++ b/docs/users_guide/7.12.1-notes.xml @@ -105,7 +105,12 @@ <itemizedlist> <listitem> <para> - TODO FIXME. + The <literal>TemplateHaskell</literal> now no longer automatically + errors when used with a stage 1 compiler (i.e. GHC without + interpreter support); in particular, plain + Haskell quotes (not quasi-quotes) can now be compiled without erroring. + Splices and quasi-quotes continue to only be supported by a + stage 2 compiler. </para> </listitem> </itemizedlist> diff --git a/docs/users_guide/glasgow_exts.xml b/docs/users_guide/glasgow_exts.xml index 20204ca164..303833a291 100644 --- a/docs/users_guide/glasgow_exts.xml +++ b/docs/users_guide/glasgow_exts.xml @@ -9571,8 +9571,8 @@ Typed expression splices and quotations are supported.) <listitem><para> If you are building GHC from source, you need at least a stage-2 bootstrap compiler to - run Template Haskell. A stage-1 compiler will reject the TH constructs. Reason: TH - compiles and runs a program, and then looks at the result. So it's important that + run Template Haskell splices and quasi-quotes. A stage-1 compiler will only accept regular quotes of Haskell. Reason: TH splices and quasi-quotes + compile and run a program, and then looks at the result. So it's important that the program it compiles produces results whose representations are identical to those of the compiler itself. </para></listitem> |