DynFlags: Don't list TemplateHaskell as supported if it's not
authorBen Gamari <bgamari.foss@gmail.com>
Wed, 18 Nov 2015 06:56:30 +0000 (07:56 +0100)
committerHerbert Valerio Riedel <hvr@gnu.org>
Wed, 18 Nov 2015 07:02:16 +0000 (08:02 +0100)
commit98a4fa5fb740ce43a1787eb5730e35b463a2de79
treee3aeedca520a0351723ad22a59cf097951121378
parent233d1312bf15940fca5feca6884f965e7944b555
DynFlags: Don't list TemplateHaskell as supported if it's not

`-XTemplateHaskell` requires GHCi; don't show it in
`--supported-extensions` if it's not supported.

Together with https://github.com/haskell/cabal/issues/2644
this allows to finally fix a long-standing annoyance in cabal
of not being able to detect availability of TH in build-plans.

Fixes #11102

See also https://github.com/haskell/cabal/pull/2930 which provides
emulation of this feature for older GHCs.

Reviewed By: bgamari

Differential Revision: https://phabricator.haskell.org/D1484
compiler/main/DynFlags.hs