Copyright | (c) Galois Inc 2014 |
---|---|
License | BSD3 |
Maintainer | Joe Hendrix <jhendrix@galois.com> |
Stability | provisional |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Lang.Crucible.Utils.MonadVerbosity
Description
Synopsis
- class (Applicative m, MonadIO m) => MonadVerbosity m where
- getVerbosity :: m Int
- whenVerbosity :: (Int -> Bool) -> m () -> m ()
- getLogFunction :: m (Int -> String -> IO ())
- getLogLnFunction :: m (Int -> String -> IO ())
- showWarning :: String -> m ()
- showWarningWhen :: (Int -> Bool) -> String -> m ()
- withVerbosity :: Handle -> Int -> (forall m. MonadVerbosity m => m a) -> IO a
Documentation
class (Applicative m, MonadIO m) => MonadVerbosity m where Source #
This class applies to monads that contain verbosity information, which is used to control the level of debugging messages presented to the user.
Minimal complete definition
Methods
getVerbosity :: m Int Source #
whenVerbosity :: (Int -> Bool) -> m () -> m () Source #
getLogFunction :: m (Int -> String -> IO ()) Source #
getLogLnFunction :: m (Int -> String -> IO ()) Source #
showWarning :: String -> m () Source #
Print a message.
showWarningWhen :: (Int -> Bool) -> String -> m () Source #
Print a warning message when verbosity satisfies predicate.
Instances
withVerbosity :: Handle -> Int -> (forall m. MonadVerbosity m => m a) -> IO a Source #