summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorHerbert Valerio Riedel <hvr@gnu.org>2015-11-27 13:39:18 +0100
committerBen Gamari <ben@smart-cactus.org>2015-11-29 13:22:14 +0100
commit85fcd035f73679927a0539d5f6c9b919517365e1 (patch)
treea7876675987aba3fa0262b003852599b79daaf05 /utils
parent583867b907ddac8c2777e96a5ad8d600ba559569 (diff)
downloadhaskell-85fcd035f73679927a0539d5f6c9b919517365e1.tar.gz
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
Diffstat (limited to 'utils')
-rw-r--r--utils/mkUserGuidePart/Options/Language.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/utils/mkUserGuidePart/Options/Language.hs b/utils/mkUserGuidePart/Options/Language.hs
index 17416ffbf1..ab3e20f40c 100644
--- a/utils/mkUserGuidePart/Options/Language.hs
+++ b/utils/mkUserGuidePart/Options/Language.hs
@@ -642,6 +642,13 @@ languageOptions =
, flagReverse = "-XNoTemplateHaskell"
, flagSince = "6.8.1"
}
+ , flag { flagName = "-XTemplateHaskellQuotes"
+ , flagDescription = "Enable quotation subset of "++
+ ":ref:`Template Haskell <template-haskell>`."
+ , flagType = DynamicFlag
+ , flagReverse = "-XNoTemplateHaskellQuotes"
+ , flagSince = "8.0.1"
+ }
, flag { flagName = "-XNoTraditionalRecordSyntax"
, flagDescription =
"Disable support for traditional record syntax "++