crucible-0.7: Crucible is a library for language-agnostic symbolic simulation
Copyright(c) Galois Inc 2014
LicenseBSD3
MaintainerJoe Hendrix <jhendrix@galois.com>
Stabilityprovisional
Safe HaskellSafe-Inferred
LanguageHaskell2010

Lang.Crucible.Utils.MonadVerbosity

Description

 
Synopsis

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

getVerbosity, getLogFunction, showWarning

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

Instances details
(Applicative m, MonadIO m) => MonadVerbosity (ReaderT (Handle, Int) m) Source # 
Instance details

Defined in Lang.Crucible.Utils.MonadVerbosity

MonadVerbosity (OverrideSim p sym ext rtp args ret) Source # 
Instance details

Defined in Lang.Crucible.Simulator.OverrideSim

Methods

getVerbosity :: OverrideSim p sym ext rtp args ret Int Source #

whenVerbosity :: (Int -> Bool) -> OverrideSim p sym ext rtp args ret () -> OverrideSim p sym ext rtp args ret () Source #

getLogFunction :: OverrideSim p sym ext rtp args ret (Int -> String -> IO ()) Source #

getLogLnFunction :: OverrideSim p sym ext rtp args ret (Int -> String -> IO ()) Source #

showWarning :: String -> OverrideSim p sym ext rtp args ret () Source #

showWarningWhen :: (Int -> Bool) -> String -> OverrideSim p sym ext rtp args ret () Source #

withVerbosity :: Handle -> Int -> (forall m. MonadVerbosity m => m a) -> IO a Source #