- Just (rest,action) ->
- case processOneArg action rest arg args of
- Left err -> process spec args spare (err:errs)
- Right (action,rest) -> action >> process spec rest spare errs
- Nothing -> process spec args (dash_arg:spare) errs
+ Just (rest, action, deprecated) ->
+ let warns' = case deprecated of
+ Deprecated warning ->
+ ("Warning: " ++ dash_arg ++ " is deprecated: " ++ warning) : warns
+ Supported -> warns
+ in case processOneArg action rest arg args of
+ Left err -> process spec args spare (err:errs) warns'
+ Right (action,rest) -> do action
+ process spec rest spare errs warns'
+ Nothing -> process spec args (dash_arg : spare) errs warns