patch applied (cabal-branches/cabal-1.4): Add *Verbose flags back in with the old type

Duncan Coutts duncan.coutts at
Thu Mar 27 11:53:30 EDT 2008

Wed Mar 26 21:24:46 PDT 2008  Duncan Coutts <duncan at>
  * Add *Verbose flags back in with the old type
  Abuse the Monoid instances for the flags types to keep the extra
  non-Flag type field up-to-date wrt the real Flag Verbosity field.
  Here's the pattern:
  copyVerbose   = fromFlagOrDefault (copyVerbose a) (copyVerbosity b),
  copyVerbosity = combine copyVerbosity
  We update copyVerbosity normally and we transfer the new value of
  (copyVerbosity b) to the copyVerbose field, unless the new value
  is NoFlag in which case the old value remains. To make this actually
  work we have to make sure the set of flags are `mappend`ed to the
  default set of flag rather than merely accumulated on top of them
  field by field. So we now accumulate on top of mempty and `mappend`
  to the default flags. We do this in the command line handling code.

    M ./Distribution/Simple/Command.hs -2 +4
    M ./Distribution/Simple/Setup.hs +41

View patch online:

More information about the cabal-devel mailing list