Skip to content

REGRESSION: --supported-languages lies about supported languages, again

To make it short, recent version of GHC broke the very thing we fixed in #11102 (closed) for GHC 8.0. This is utterly frustrating to me. ;-(

Basically, if GHC advertises an extension, it's supposed to work without jumping through hoops if you enable it via {-# LANGUAGE ... #-} or -X-flags. Otherwise this breaks the whole idea of other-extensions and related cabal spec features which use --supported-languages to infer whether e.g. GHC when invoked with -XTemplateHaskell will succeed.

However, consider the Main.hs below

{-# LANGUAGE TemplateHaskell #-}

main = $undefined

Unfortuantely now GHC lies unconditionally about supporting TH, thereby undermining the infrastructure we setup in and for #11102 (closed):

$ ghc --supported-languages | grep ^TemplateHaskell$
TemplateHaskell

$ ghc --make Foo.hs 
[1 of 1] Compiling Main             ( Foo.hs, Foo.o )
ghc-stage2: this operation requires -fexternal-interpreter
Trac metadata
Trac field Value
Version 8.6.3
Type Bug
TypeOfFailure OtherFailure
Priority highest
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information