Implement new -XTemplateHaskellQuotes pragma
authorHerbert Valerio Riedel <hvr@gnu.org>
Fri, 27 Nov 2015 12:39:18 +0000 (13:39 +0100)
committerBen Gamari <ben@smart-cactus.org>
Sun, 29 Nov 2015 12:22:14 +0000 (13:22 +0100)
commit85fcd035f73679927a0539d5f6c9b919517365e1
treea7876675987aba3fa0262b003852599b79daaf05
parent583867b907ddac8c2777e96a5ad8d600ba559569
Implement new -XTemplateHaskellQuotes pragma

Since f16ddcee0c64a92ab911a7841a8cf64e3ac671fd / D876, `ghc-stage1`
supports a subset of `-XTemplateHaskell`, but since we need Cabal to be
able detect (so `.cabal` files can be specified accordingly, see also
GHC #11102 which omits `TemplateHaskell` from `--supported-extensions`)
whether GHC provides full or only partial `-XTemplateHaskell` support,
the proper way to accomplish this is to split off the
quotation/non-splicing `TemplateHaskell` feature-subset into a new
language pragma `TemplateHaskellQuotes`.

Moreover, `-XTemplateHaskellQuotes` is considered safe under SafeHaskell

This addresses #11121

Reviewers: goldfire, ezyang, dterei, austin, bgamari

Reviewed By: bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D1511

GHC Trac Issues: #11121
compiler/main/DynFlags.hs
compiler/parser/Lexer.x
compiler/rename/RnSplice.hs
docs/users_guide/7.12.1-notes.rst
docs/users_guide/glasgow_exts.rst
testsuite/tests/driver/T4437.hs
testsuite/tests/quotes/T10384.hs
testsuite/tests/quotes/all.T
testsuite/tests/safeHaskell/safeLanguage/SafeLang12.stderr
utils/mkUserGuidePart/Options/Language.hs