Run shell commands with various types of progress reporting.
Author: David Fox
- systemTask :: [Style] -> String -> IO TimeDiff
- otherTask :: [Style] -> IO a -> IO a
- data Style
- readStyle :: String -> Maybe Style
- data Output
- msg :: [Style] -> String -> IO ()
- msgLn :: [Style] -> String -> IO ()
- output :: [Style] -> Maybe Output
- verbosity :: [Style] -> Int
- setStyles :: [Style] -> [Style] -> [Style]
- setStyle :: Style -> [Style] -> [Style]
- addStyles :: [Style] -> [Style] -> [Style]
- addStyle :: Style -> [Style] -> [Style]
- removeStyle :: Style -> [Style] -> [Style]
- stripDist :: FilePath -> FilePath
- showElapsed :: String -> IO a -> IO a
- data TimeDiff
- noTimeDiff :: TimeDiff
- fixedTimeDiffToString :: TimeDiff -> [Char]
Create a task that sends its output to a handle and then can be terminated using an IO operation that returns an exit status. Throws an error if the command fails.
Message printed before the execution begins
Message printed on successful termination
Message printed on failure
Type of output to generate during execution
If true, echo the shell command before beginning
If true print the elapsed time on termination
Set the verbosity level. This value can be queried using the verbosity function, but is not otherwise used by the -- functions in this module.
Set the indentation string for the generated output.
Print all the command's output with each line indented using (by default) the string ' > '.
Print a dot for every 1024 characters the command outputs
Print an ellipsis (...) when the command starts and then done. when it finishes.
Style Set modification
records the difference between two clock times in a user-readable way.