ndmitchell / hoogle

Haskell API search engine
http://hoogle.haskell.org/
Other
731 stars 131 forks source link

Action/Generate: Best effort warnings when flags are ignored #396

Closed Profpatsch closed 1 year ago

Profpatsch commented 1 year ago

The command line parser accepts any flags in generate, but no warning is shown if user instructions are ignored.

This is a best-effort way of warning if a flag would be ignored, making it more user-friendly.

Ideally, this would be done before starting work, but I don’t see a good way to patch it into the command line parser; maybe by having an intermediate parsing step that parses into an ADT first and throws warnings for ignored arguments.

Another case I saw is that “--haskell” and “--frege” can both be set, but “--haskell” will always be ignored.

ndmitchell commented 1 year ago

I think parsing into an ADT would be better, but this seems a step in the right direction.