-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Live diagnostics for concurrent activity -- -- This library can be used to display progress meters or other -- diagnostics for concurrently running actions. It supports dynamic -- creation and removal of new sub-meters as well es correct behaviour -- when printing diagnostics that are not part of the progress meter and -- should just scroll by. -- -- The System.ProgressMeter module contains a tutorial. @package progress-meter @version 0.1.0 -- | This module implements a progress bar with support for multiple -- individual text chunks that can be updated independently (called -- meters). module System.ProgressMeter -- | Handle to a progress bar data Progress -- | Variant of hWithProgress that uses stderr withProgress :: Int -> (Progress -> IO a) -> IO a -- | High-level interface to create a progress bar -- -- This action creates a progress bar with the given update delay (in -- microseconds) on the given output handle and runs it in a background -- thread. It passes the progress handle to the given function and quits -- the bar after the action completes. hWithProgress :: Int -> Handle -> (Progress -> IO a) -> IO a -- | Set the separator string between individual meters (" | " by -- default) setProgressSep :: Progress -> String -> IO () -- | Create a progress handle using the given update delay (in -- microseconds) -- -- Note: In most cases you can and should just use withProgress. newProgress :: IO Progress -- | Run the given progress bar -- -- If the given handle is not a terminal, this action -- -- Note: In most cases you can and should just use withProgress. runProgress :: Progress -> Int -> Handle -> IO () -- | Make runProgress clear its display and return -- -- Note: In most cases you can and should just use withProgress. quitProgress :: Progress -> IO () -- | Handle to an individual progress meter data Meter -- | Set the text of the given meter setMeter :: Meter -> String -> IO () -- | Append a new progress meter to the given progress bar -- -- The meter is removed when garbage-collected or when deleteMeter -- is used. The latter is preferable. appendMeter :: Progress -> IO Meter -- | Delete the given progress meter -- -- Changes to the meter after running this action will not have any -- effect. deleteMeter :: Meter -> IO () -- | Prepend a new progress to the given progress bar -- -- The meter is removed when garbage-collected or when deleteMeter -- is used. The latter is preferable. prependMeter :: Progress -> IO Meter -- | High-level interface to appendMeter that makes sure the meter -- is deleted after the given action withAppendMeter :: Progress -> (Meter -> IO a) -> IO a -- | High-level interface to prependMeter that makes sure the meter -- is deleted after the given action withPrependMeter :: Progress -> (Meter -> IO a) -> IO a -- | Send an action to be executed by the progress bar after temporarily -- clearing its display -- -- This function can be used, for example, to print something safely. It -- returns immediately after queuing the action. Commands are executed in -- the order they are sent. -- -- Actions sent by this function are not subject to the update -- delay and cause the display to be redrawn immediately. putCmd :: Progress -> (Handle -> IO ()) -> IO () -- | Send a message to be printed by the progress bar after temporarily -- clearing its display -- -- Messages are printed in the order they are sent. Note: unless the -- message includes a line feed, it will most likely be overwritten by -- the progress bar. -- -- Messages sent by this function are not subject to the update -- delay and cause the display to be redrawn immediately. putMsg :: Progress -> String -> IO () -- | Variant of putMsg that prints a line feed after the message putMsgLn :: Progress -> String -> IO ()