Display more information about why an extension is enabled/disabled
To take one example, we sometimes produce an explanatory message suggesting a user use Type
from Data.Kind
instead of *
, because of -XNoStarIsType
. But it would be nice to also explain to the user why -XNoStarIsType
is in effect in the first place, as there might be many causes as @rae points out:
- Chosen by a language selection (
Haskell98
,Haskell2010
, orGHC2021
). In which case we could recursively say how that language selection was made. -
LANGUAGE
pragma in this file. - Chosen on the command line.
- Set in a cabal file.
- Set in a
ghci.conf
file. - Set by
:set
in a GHCi session. - Maybe others?
This observation is not limited to -XNoStarIsType
, but I don't have other examples to hand at the moment.