summaryrefslogtreecommitdiff
path: root/compiler/main/DynFlags.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/main/DynFlags.hs')
-rw-r--r--compiler/main/DynFlags.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 95a7122a57..539132653e 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -4084,6 +4084,14 @@ supportedExtensions :: [String]
supportedExtensions = concatMap toFlagSpecNamePair xFlags
where
toFlagSpecNamePair flg
+#if !defined(GHCI)
+ -- IMPORTANT! Make sure that `ghc --supported-extensions` omits
+ -- "TemplateHaskell"/"QuasiQuotes" when it's known not to work out of the
+ -- box. See also GHC #11102 and #16331 for more details about
+ -- the rationale
+ | flagSpecFlag flg == LangExt.TemplateHaskell = [noName]
+ | flagSpecFlag flg == LangExt.QuasiQuotes = [noName]
+#endif
| otherwise = [name, noName]
where
noName = "No" ++ name