Cabal- A framework for packaging Haskell software

CopyrightIan Lynagh 2007
Safe HaskellNone




A Verbosity type with associated utilities.

There are 4 standard verbosity levels from silent, normal, verbose up to deafening. This is used for deciding what logging messages to print.

Verbosity also is equipped with some internal settings which can be used to control at a fine granularity the verbosity of specific settings (e.g., so that you can trace only particular things you are interested in.) It's important to note that the instances for Verbosity assume that this does not exist.



isVerboseQuiet :: Verbosity -> Bool #

Test if we had called lessVerbose on the verbosity

verboseNoFlags :: Verbosity -> Verbosity #

Turn off all flags

modifyVerbosity :: (Verbosity -> Verbosity) -> Verbosity -> Verbosity #

Combinator for transforming verbosity level while retaining the original hidden state.

For instance, the following property holds

isVerboseNoWrap (modifyVerbosity (max verbose) v) == isVerboseNoWrap v

Note: you can use modifyVerbosity (const v1) v0 to overwrite v1's flags with v0's flags.


Call stacks

verboseCallSite :: Verbosity -> Verbosity #

Turn on verbose call-site printing when we log.

verboseCallStack :: Verbosity -> Verbosity #

Turn on verbose call-stack printing when we log.

isVerboseCallSite :: Verbosity -> Bool #

Test if we should output call sites when we log.

isVerboseCallStack :: Verbosity -> Bool #

Test if we should output call stacks when we log.

Output markets

verboseMarkOutput :: Verbosity -> Verbosity #

Turn on -----BEGIN CABAL OUTPUT----- markers for output from Cabal (as opposed to GHC, or system dependent).

isVerboseMarkOutput :: Verbosity -> Bool #

Test if we should output markets.

verboseUnmarkOutput :: Verbosity -> Verbosity #

Turn off marking; useful for suppressing nondeterministic output.


verboseNoWrap :: Verbosity -> Verbosity #

Disable line-wrapping for log messages.

isVerboseNoWrap :: Verbosity -> Bool #

Test if line-wrapping is disabled for log messages.


verboseTimestamp :: Verbosity -> Verbosity #

Turn on timestamps for log messages.

isVerboseTimestamp :: Verbosity -> Bool #

Test if if we should output timestamps when we log.

verboseNoTimestamp :: Verbosity -> Verbosity #

Turn off timestamps for log messages.