[GHC] #7843: GHC should be able to list all possible command line options

GHC ghc-devs at haskell.org
Fri Jun 7 09:33:49 CEST 2013


#7843: GHC should be able to list all possible command line options
---------------------------------+------------------------------------------
    Reporter:  jstolarek         |       Owner:  jstolarek       
        Type:  feature request   |      Status:  patch           
    Priority:  normal            |   Milestone:                  
   Component:  Driver            |     Version:  7.6.2           
    Keywords:                    |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown    
  Difficulty:  Unknown           |    Testcase:                  
   Blockedby:                    |    Blocking:                  
     Related:                    |  
---------------------------------+------------------------------------------

Comment(by jstolarek):

 Whops, I didn't think about that. I'm attaching two patches. First of them
 updates user documentation.

 After playing a bit with autocompletion I think that the decision to
 exclude short options was wrong. Consider this example of autocmpletion
 without filtering out short options:

 {{{
 [killy at xerxes : ~] ghc -c
 -c        -caf-all  -cpp
 }}}

 If the `filter` is used then the user will be hinted with only two last
 flags, which indeed might lead her to believe that there is no `-c` flag.
 Therefore I think that `filter` should be removed - my  second patch
 updates the user documentation and removes the filter.

 Also, without the `filter` the `-O` option is listed twice. I believe this
 is because `-O` can be used by itself and also with a parameter (e.g.
 `-O2`). Possible solutions are:

   - use `nub`
   - use some hack to remove this single option
   - ignore it, because shell will not list duplicates anyway:
 {{{
 [killy at xerxes : ~] ghc -O
 -O     -Odph  -Onot
 }}}

 Since `nub` is O(n^2^) and I don't like hacks I chose the third option.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7843#comment:15>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the ghc-tickets mailing list