Skip to content

ghc --show-options lists invalid flags

While porting ghc-mod to GHC 8 I noticed that all -fwarn flags are missing from flagsForCompletion instead only -fwarn- and -fno-warn- appear. This also shows up in the front-end when running ghc --show-options.

Looking at the code this turned out to be because the old -fwarn flags were marked as hidden using hideFlag and hidden flags are explicitly filtered out in flagsForCompletion but for some reason the -fwarn- and -fno-warn- prefixes still show up in the list.

Trac metadata
Trac field Value
Version 8.0.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
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