HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

ModuleCabal-3.12.1.0Haskell2010

Distribution.Verbosity

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.

  • 1 type
  • 31 values
  • PackageCabal-3.12.1.0
  • Exports32
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceVerbosity.hs

Verbosity

15 declarations
datadata Verbosity
#
Instances12Bounded, Enum, Eq, Ord, Read, Show, …
  • Bounded VerbosityDefined in Cabal-3.12.1.0 · Distribution.Verbosity
  • Enum VerbosityDefined in Cabal-3.12.1.0 · Distribution.Verbosity
  • Eq VerbosityDefined in Cabal-3.12.1.0 · Distribution.Verbosity
  • Ord VerbosityDefined in Cabal-3.12.1.0 · Distribution.Verbosity
  • Read VerbosityDefined in Cabal-3.12.1.0 · Distribution.Verbosity
  • Show VerbosityDefined in Cabal-3.12.1.0 · Distribution.Verbosity
  • Generic VerbosityDefined in Cabal-3.12.1.0 · Distribution.Verbosity
  • Binary VerbosityDefined in Cabal-3.12.1.0 · Distribution.Verbosity
  • Parsec VerbosityDefined in Cabal-3.12.1.0 · Distribution.Verbosity

    Parser verbosity

    Example1 expression
    explicitEitherParsec parsecVerbosity "normal"Right (Verbosity {vLevel = Normal, vFlags = fromList [], vQuiet = False})
    Example1 expression
    explicitEitherParsec parsecVerbosity "normal+nowrap  "Right (Verbosity {vLevel = Normal, vFlags = fromList [VNoWrap], vQuiet = False})
    Example1 expression
    explicitEitherParsec parsecVerbosity "normal+nowrap +markoutput"Right (Verbosity {vLevel = Normal, vFlags = fromList [VNoWrap,VMarkOutput], vQuiet = False})
    Example1 expression
    explicitEitherParsec parsecVerbosity "normal +nowrap +markoutput"Right (Verbosity {vLevel = Normal, vFlags = fromList [VNoWrap,VMarkOutput], vQuiet = False})
    Example1 expression
    explicitEitherParsec parsecVerbosity "normal+nowrap+markoutput"Right (Verbosity {vLevel = Normal, vFlags = fromList [VNoWrap,VMarkOutput], vQuiet = False})
    Example1 expression
    explicitEitherParsec parsecVerbosity "deafening+nowrap+stdout+stderr+callsite+callstack"Right (Verbosity {vLevel = Deafening, vFlags = fromList [VCallStack,VCallSite,VNoWrap,VStderr], vQuiet = False})

    Note: this parser will eat trailing spaces.

  • Pretty VerbosityDefined in Cabal-3.12.1.0 · Distribution.Verbosity
  • Structured VerbosityDefined in Cabal-3.12.1.0 · Distribution.Verbosity
  • type Rep Verbosity = D1 ('MetaData "Verbosity" "Distribution.Verbosity" "Cabal-3.12.1.0-fc60" 'False) (C1 ('MetaCons "Verbosity" 'PrefixI 'True) (S1 ('MetaSel ('Just "vLevel") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 VerbosityLevel) :*: (S1 ('MetaSel ('Just "vFlags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Set VerbosityFlag)) :*: S1 ('MetaSel ('Just "vQuiet") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))))Defined in Cabal-3.12.1.0 · Distribution.Verbosity
valuedeafening :: Verbosity
#

Not only are we verbose ourselves (perhaps even noisier than when being verbose), but we tell everything we run to be verbose too.

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

For instance, the following property holds

Property
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

4 declarations

Output markets

3 declarations

Line wrapping

2 declarations

Time stamps

3 declarations

Stderr

3 declarations

No warnings

2 declarations