Add liftOption for making derived command parsers
Add liftOption for making derived command parsers

liftOption :: (b -> a) -> (a -> (b -> b)) -> Option a -> Option b
For example:
liftOption fst (\a (_,b) -> (a,b)) :: Option a -> Option (a,b)
Needed to be able to make a CommandUI (a, b) using an existing CommandUI a.
That's what we want to do in cabal-install where the 'install' command
to support all the 'configure' flags and some extra of it's own, for example
--dry-run and probably several more in future.

20080226200215-adfee-64cb4642ffb5c880e8935c7117062f0e07686b82.gz

dcreager/cabal,dcreager/cabal