Skip to content

Bad error message for flags with required but missing arguments

$ ghc -I
ghc: unrecognised flag: -I
did you mean one of:
  -I
  -F
  -v

Usage: For basic information, try the `--help' option.

Which is confusing (Unrecognized -I. Did you mean -I?), and not informative (No mention of the missing argument)

I expect something like "missing argument for -I", or a basic usage info on -I instead.

It looks similar to #9776 (closed) to me.

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