Revision 5b11f8db htools/Ganeti/Common.hs
b/htools/Ganeti/Common.hs | ||
---|---|---|
99 | 99 |
-> (a -> b -> Result b) |
100 | 100 |
-> String |
101 | 101 |
-> ArgDescr (b -> Result b) |
102 |
reqWithConversion conversion_fn updater_fn metavar =
|
|
102 |
reqWithConversion conversion_fn updater_fn = |
|
103 | 103 |
ReqArg (\string_opt opts -> do |
104 | 104 |
parsed_value <- conversion_fn string_opt |
105 |
updater_fn parsed_value opts) metavar
|
|
105 |
updater_fn parsed_value opts) |
|
106 | 106 |
|
107 | 107 |
-- | Command line parser, using a generic 'Options' structure. |
108 | 108 |
parseOpts :: (StandardOptions a) => |
Also available in: Unified diff