UNDO: Merge "unrecognized long opt" fix from 6.4.2
authorSimon Marlow <simonmar@microsoft.com>
Wed, 5 Jul 2006 14:25:37 +0000 (14:25 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Wed, 5 Jul 2006 14:25:37 +0000 (14:25 +0000)
This patch undid the previous patch, "RequireOrder: do not collect
unrecognised options after a non-opt".  I asked Sven to revert it, but
didn't get an answer.

See bug #473.

System/Console/GetOpt.hs

index fa9f9b2..c1463c0 100644 (file)
@@ -161,7 +161,7 @@ getOpt' _        _        []         =  ([],[],[],[])
 getOpt' ordering optDescr (arg:args) = procNextOpt opt ordering
    where procNextOpt (Opt o)      _                 = (o:os,xs,us,es)
          procNextOpt (UnreqOpt u) _                 = (os,xs,u:us,es)
-         procNextOpt (NonOpt x)   RequireOrder      = ([],x:rest,us,[])
+         procNextOpt (NonOpt x)   RequireOrder      = ([],x:rest,[],[])
          procNextOpt (NonOpt x)   Permute           = (os,x:xs,us,es)
          procNextOpt (NonOpt x)   (ReturnInOrder f) = (f x :os, xs,us,es)
          procNextOpt EndOfOpts    RequireOrder      = ([],rest,[],[])