Safe Haskell | None |
---|---|
Language | Haskell2010 |
System.Console.CmdArgs.Verbosity
Description
A module to deal with verbosity, how 'chatty' a program should be.
This module defines the Verbosity
data type, along with functions
for manipulating a global verbosity value.
Documentation
The verbosity data type
Constructors
Quiet | Only output essential messages (typically errors) |
Normal | Output normal messages (typically errors and warnings) |
Loud | Output lots of messages (typically errors, warnings and status updates) |
Instances
Data Verbosity # | |
Defined in System.Console.CmdArgs.Verbosity Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Verbosity -> c Verbosity # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Verbosity # toConstr :: Verbosity -> Constr # dataTypeOf :: Verbosity -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Verbosity) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Verbosity) # gmapT :: (forall b. Data b => b -> b) -> Verbosity -> Verbosity # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Verbosity -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Verbosity -> r # gmapQ :: (forall d. Data d => d -> u) -> Verbosity -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Verbosity -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Verbosity -> m Verbosity # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Verbosity -> m Verbosity # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Verbosity -> m Verbosity # | |
Bounded Verbosity # | |
Enum Verbosity # | |
Defined in System.Console.CmdArgs.Verbosity Methods succ :: Verbosity -> Verbosity # pred :: Verbosity -> Verbosity # fromEnum :: Verbosity -> Int # enumFrom :: Verbosity -> [Verbosity] # enumFromThen :: Verbosity -> Verbosity -> [Verbosity] # enumFromTo :: Verbosity -> Verbosity -> [Verbosity] # enumFromThenTo :: Verbosity -> Verbosity -> Verbosity -> [Verbosity] # | |
Read Verbosity # | |
Show Verbosity # | |
Eq Verbosity # | |
Ord Verbosity # | |
Defined in System.Console.CmdArgs.Verbosity |
setVerbosity :: Verbosity -> IO () #
Set the global verbosity.
getVerbosity :: IO Verbosity #
Get the global verbosity. Initially Normal
before any calls to setVerbosity
.
Used to test if status updates should be output to the user.
True
if the verbosity is set to Loud
(when --verbose
is specified).
whenNormal :: IO () -> IO () #
An action to perform if the verbosity is normal or higher, based on isNormal
.