The output will contain ([ "foo":1 ]) if the argument is --foo and ([ "foo":"bar" ]) if the argument is --foo=bar. There is no fancy stuff to handle default values (just or it with another mapping) or options that may or may not have values (e.g. -bar=foo will produce ([ "b":1, "a":1, "r":"foo" ]) and --foo x --bar will just produce ([ "foo":1 ]) and then stop processing the line).
I think --foo -- --bar should produce ([ "foo":1 ]) and put --bar as the first element in Arg.REST -- otherwise the above sounds great IMO.
The rest sounds strangely alluring. :-) Anything in there for comfy handling of input of misc data types?