|
Re: [GHC] #473: getOpt' checks "non-option options": msg#00034lang.haskell.glasgow.bugs
#473: getOpt' checks "non-option options" -----------------------------+---------------------------------------------- Reporter: nobody | Owner: nobody Type: bug | Status: closed Priority: normal | Milestone: Component: libraries/base | Version: 6.4.1 Severity: normal | Resolution: fixed Keywords: | Os: Unknown Difficulty: Unknown | Architecture: Unknown -----------------------------+---------------------------------------------- Changes (by panne): * architecture: => Unknown * resolution: None => fixed * difficulty: => Unknown * status: assigned => closed * os: => Unknown Old description: > {{{ > When given RequireOrder the getOpt' function should not > parse options > following a non-option. But currently (as of version > 6.4.1 of ghc) it > does. E.g. when parsing with RequireOrder and if > invalid-opt3 is not a > recognized option then the following produces an error: > > progname --valid-opt1 --valid-opt2 non-opt --invalid-opt3 > > However, anything after non-opt should not be parsed. > The problem can be > fixed as follows: > > 164c164 > < procNextOpt (NonOpt x) RequireOrder = > ([],x:rest,us,[]) > --- > > procNextOpt (NonOpt x) RequireOrder = > ([],x:rest,[],[]) > > Best > Sebastian > > }}} New description: {{{ When given RequireOrder the getOpt' function should not parse options following a non-option. But currently (as of version 6.4.1 of ghc) it does. E.g. when parsing with RequireOrder and if invalid-opt3 is not a recognized option then the following produces an error: progname --valid-opt1 --valid-opt2 non-opt --invalid-opt3 However, anything after non-opt should not be parsed. The problem can be fixed as follows: 164c164 < procNextOpt (NonOpt x) RequireOrder = ([],x:rest,us,[]) --- > procNextOpt (NonOpt x) RequireOrder = ([],x:rest,[],[]) Best Sebastian }}} Comment: The bug has already been fixed in the 6.4.2 branch, and it is now fixed in the HEAD, too. -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/473> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler_______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@xxxxxxxxxxx http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: [GHC] #715: OpenAL package fails to compile with older headers, GHC |
|---|---|
| Next by Date: | [GHC] #765: x86_64 NCG goes via unsigned for FFI Int return types., GHC |
| Previous by Thread: | Re: [GHC] #715: OpenAL package fails to compile with older headers, GHC |
| Next by Thread: | [GHC] #765: x86_64 NCG goes via unsigned for FFI Int return types., GHC |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |