Ticket #1348 (closed bug: fixed)

Opened 6 years ago

Last modified 5 years ago

inconsistent 'ghc --help" message

Reported by: guest Owned by: igloo
Priority: normal Milestone: 6.10 branch
Component: Compiler Version: 6.6.1
Keywords: Cc:
Operating System: Windows Architecture: x86
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

"ghc --help" produces the following output:

Usage:

ghci [command-line-options-and-input-files]

The kinds of input files that can be given on the command-line

....

Platform: Windows XP SP2 Version: official distribution of 6.6 and 6.6.1 (6.4.2 was ok)

Change History

Changed 6 years ago by igloo

  • owner set to igloo
  • priority changed from normal to high
  • milestone set to 6.8

Good spot, thanks!

Changed 6 years ago by igloo

The logic for printing the ghc and ghci usage messages was inverted; I've fixed that.

However, the ghci case will never actually happen with the current code, as we print a usage message when cli_mode == ShowUsage? and choose the ghci usage message if cli_mode == DoInteractive?.

We should overhaul the option handling, probably using the standard library, so that the same code handles static and dynamic options, and also generates the documentation; the above issue should be fixed at the same time.

Changed 6 years ago by igloo

  • milestone changed from 6.8 to 6.1

Option handling overhaul probably won't happen until 6.10.

Changed 5 years ago by simonmar

  • priority changed from high to normal

dependent on #1880, which has normal prio, so dropping this one.

Changed 5 years ago by igloo

  • status changed from new to closed
  • resolution set to fixed

Now fixed:

Fri Sep 26 15:05:39 BST 2008  Ian Lynagh <igloo@earth.li>
  * Split ShowVersion etc off into a different type to DoInteractive etc
  This fixes trac #1348 (ghci --help gave ghc's help), and also tidies
  things up a bit. Things would be even tidier if the usage.txt files were
  put into a .hs file, so that ShowUsage wouldn't need to be able to find
  the libdir.
Note: See TracTickets for help on using tickets.