haskell/haskell-platform — pull request #111 by randen (2014-06-10 08:29:33+00:00)
Title: Add verbosity to cabal and ghc-pkg shell-outs

Since hptool uses the shake package, it can take advantage of shake's
verbosity using "--verbose" on the hptool command line (up to 3
"--verbose" switches can be used to increase shake's verbosity, but
note that the third one is for actual Shake-debugging).

A simple mapping between Development.Shake.Verbosity (from
Development.Shake.getVerbosity) to the verbosity values (integers) of
both the cabal and ghc-pkg executables is used, allowing two "--verbose"
command-line switches to get the maximum verbosity from both, as well as
the maximum useful level from shake (for shake-library users).

A 1:1 mapping is not possible from shake to either cabal or
ghc-pkg, so what is included here has some arbitrariness which may need
slight refinement if experience shows the desired verbosity of either of
those external tools is not convenient--e.g., does just one "--verbose"
dial all 3 generators (shake, cabal, ghk-pkg) down enough, etc.

Note there are some shell-outs not changed in this commit: a couple
capture and parse stdout, so adding verbosity to those invocation would
need some additional work not contemplated here; a couple of other cabal
shell-outs were not a source of debugging trouble at present.