Distribution.Utils.LogProgress

Cabal-2.0.1.0: A framework for packaging Haskell software

Safe Haskell | None
Language | Haskell2010

Distribution.Utils.LogProgress

Synopsis

- data LogProgress a
- runLogProgress :: Verbosity -> LogProgress a -> NoCallStackIO a
- warnProgress :: Doc -> LogProgress ()
- infoProgress :: Doc -> LogProgress ()
- dieProgress :: Doc -> LogProgress a
- addProgressCtx :: CtxMsg -> LogProgress a -> LogProgress a

# Documentation

data LogProgress a Source #

The `Progress` monad with specialized logging and error messages.

Instances

Monad LogProgress # |
Methods (>>=) :: LogProgress a -> (a -> LogProgress b) -> LogProgress b Source # (>>) :: LogProgress a -> LogProgress b -> LogProgress b Source # return :: a -> LogProgress a Source # fail :: String -> LogProgress a Source #
Functor LogProgress # |
Methods fmap :: (a -> b) -> LogProgress a -> LogProgress b Source # (<$) :: a -> LogProgress b -> LogProgress a Source #
Applicative LogProgress # |
Methods pure :: a -> LogProgress a Source # (<*>) :: LogProgress (a -> b) -> LogProgress a -> LogProgress b Source # liftA2 :: (a -> b -> c) -> LogProgress a -> LogProgress b -> LogProgress c Source # (*>) :: LogProgress a -> LogProgress b -> LogProgress b Source # (<*) :: LogProgress a -> LogProgress b -> LogProgress a Source #

runLogProgress :: Verbosity -> LogProgress a -> NoCallStackIO a Source #

Run `LogProgress`, outputting traces according to `Verbosity`, `die` if there is an error.

warnProgress :: Doc -> LogProgress () Source #

Output a warning trace message in `LogProgress`.

infoProgress :: Doc -> LogProgress () Source #

Output an informational trace message in `LogProgress`.

dieProgress :: Doc -> LogProgress a Source #

Fail the computation with an error message.

addProgressCtx :: CtxMsg -> LogProgress a -> LogProgress a Source #

Add a message to the error/warning context.