patch applied (cabal): Add liftOption for making derived command
parsers
Duncan Coutts
duncan.coutts at worc.ox.ac.uk
Tue Feb 26 15:05:52 EST 2008
Tue Feb 26 12:02:15 PST 2008 Duncan Coutts <duncan at haskell.org>
* 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-64cb4642ffb5c880e8935c7117062f0e07686b82.gz
More information about the cabal-devel
mailing list