#8190 closed feature request (fixed)

mention --show-options in --help

Reported by: carter Owned by: thoughtpolice
Priority: highest Milestone: 7.8.1
Component: Compiler Version: 7.7
Keywords: Cc: jan.stolarek@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: #7843 Differential Revisions:

Description

GHC head now has a --show-options flag, that lists all of the supported ghc options.

maybe --help should mention this flag, and that every option is specified in the ghc manual?

Change History (10)

comment:1 Changed 18 months ago by simonpj

  • Milestone set to _|_
  • Owner set to thoughtpolice
  • Priority changed from normal to highest

comment:2 Changed 18 months ago by simonpj

  • Milestone changed from _|_ to 7.8.1

comment:3 Changed 18 months ago by jstolarek

I'm not convinced that we should do this. --show-options currently displays 743 flags - will this enormous list be helpful for a person that's trying to get a flag right? Other than that, --show-options is documented in user manual.

But this brought my attention to another issue with the help message. We are mentioning -fglasgow-exts flag in the help message, but that flag actually is deprecated and generates a warning.

comment:4 Changed 18 months ago by jstolarek

  • Cc jan.stolarek@… added

comment:5 follow-up: Changed 18 months ago by carter

@jan, on one hand you're right.

On the other hand, most other compilers (eg clang and gcc) do have a way of listing all of the documented options, or at least most of them.

however, Theres definitely value in having a curated list of all the stable flags when someone does

ghc -h
or
ghc --help

which we currently only do i the barest minimal sense possible

Version 0, edited 18 months ago by carter (next)

comment:6 in reply to: ↑ 5 Changed 18 months ago by jstolarek

I have no strong reasons to object. I'm just not sure if this is the most important info that should be mentioned by --help, but I guess it won't do any harm.

Replying to carter:

listing all of the documented options

Just to be clear - --show-options lists all options, whether documented or not :) Do we have any options that we would like to keep hidden from users?

comment:7 Changed 18 months ago by nh2

As somebody who messes around with tools calling GHC, I would appreciate this option.

It would also make it much easier to find options that are not documented!

comment:8 Changed 18 months ago by carter

I also just learned today that ghc has a man page!

we should have that mentioned in the help text too probably!

comment:9 Changed 18 months ago by Austin Seipp <aseipp@…>

In 32ade417f7e82b6fbcb6f1c93871ba3141a8f5c8/ghc:

Add --show-options to --help (#8190)

Signed-off-by: Austin Seipp <[email protected]>

comment:10 Changed 18 months ago by thoughtpolice

  • Resolution set to fixed
  • Status changed from new to closed

The man page is auto-generated and already has --show-options.

Note: See TracTickets for help on using tickets.