|
|
|
|
|
Description |
CIO is a type class for the TIO monad, which tracks the cursor
position of the console so that indentation and prefixes can be
added to the output. TIO also has a style component which lets you
control the output verbosity and the appearance of the prefix.
There is an instance for the regular IO monad which doesn't use any
of these features, to allow functions which do not use the TIO
monad call functions in the Debian library.
|
|
Synopsis |
|
|
|
|
The CIO class
|
|
|
Class representing ways of doing console (terminal?) output.
| | Methods | | Write output to a handle.
| | | If we are not already at the beginning of a line, move the cursor
to the beginning of the next one.
| | | Return the "effective verbosity" for a task. If the argument
is 2 it means the caller is computing ev for a task that
normally does output when the verbosity level is 2 or higher.
If the verbosity of the current style is 1, then the ev or
effective verbosity is 2-1 = -1, so the output should be
quieter.
| | | Modify the current output style.
| | | Implementation of try for this monad
|
| | Instances | |
|
|
Style constructors and transformers
|
|
|
A record used to hold the output style information for a task.
This The prefixes that will appear at the beginning of each line,
and the desired verbosity level. Suggested verbosity level policy:
- -1: No output of any kind, as if you were directing all output to devnull
- 0: Error output only, suitable for a run whose log you might examine later
- 1: casual progress reporting - if you were running on a console but didn't
expect anything to go wrong
- 2: detailed progress reporting - show more progress, particularly things
that might fail during the normal operation of the autobuilder: patches
that fail to apply, dpkg-buildpackage runs that return errors, etc.
- 3: Debugging output - use this level or higher if you suspect the
autobuilder itself is failing, or you are doing development work on
the autobuilder.
| Constructors | TStyle | | prefix :: String | Add this string at the beginning of each line
| verbosity :: Int | Ignore v functions whose argument is more than this
| hPrefix :: [(Handle, String)] | Per-handle prefix
|
|
| Instances | |
|
|
|
|
|
Use a new style for the TIO action
|
|
|
|
|
|
|
Set the output style for a handle to prefixed.
|
|
|
Prepend some text to the prefix.
|
|
|
Append some text to the prefix.
|
|
|
Set the output style for the stdout and stderr handle to prefixed,
using whatever prefixes were most recently set (default is [1] and [2].)
|
|
|
Switch to prefixed mode and modify both the stdout and stderr prefixes.
|
|
|
|
|
Get the current prefix for a particular handle
|
|
Output functions
|
|
|
Write a string to stdout.
|
|
|
Write a string to stderr.
|
|
|
Write a string to stdout depending on the verbosity level.
|
|
|
Verbosity controlled version of ePutStr
|
|
|
Write a character.
|
|
|
Write a character to stdout.
|
|
|
Write a character to stderr.
|
|
|
Verbosity controlled version of hPutChar.
|
|
|
Verbosity controlled version of putChar
|
|
|
Verbosity controlled version of ePutChar
|
|
|
Move to beginning of next line (if necessary) and output a string.
|
|
|
hPutStrBl to stdout.
|
|
|
hPutStrBl to stderr.
|
|
|
Verbosity controlled version of hPutStrBl
|
|
|
Verbosity controlled version of putStrBl
|
|
|
Verbosity controlled version of ePutStrBl
|
|
|
Write a newline character and a string.
|
|
|
hPutStrLn to stdout.
|
|
|
hPutStrLn to stderr.
|
|
|
Verbosity controlled version of hPutStrLn.
|
|
|
Verbosity controlled version of putStrLn
|
|
|
Verbosity controlled version of ePutStrLn
|
|
|
hBOL to stdout.
|
|
|
hBOL to stderr.
|
|
|
|
|
Verbosity controlled version of BOL
|
|
|
Verbosity controlled version of eBOL
|
|
Produced by Haddock version 2.6.0 |