Tue Feb 26 12:02:15 PST 2008 Duncan Coutts
* 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.
M ./Distribution/Simple/Command.hs -1 +12
View patch online:
http://darcs.haskell.org/cabal/_darcs/patches/20080226200215-adfee-64cb4642f...