-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Ungarble output from several threads -- -- This library provides a simple interface to output status messages -- from more than one thread. -- -- It will continue adding information (such as dots, or done) to -- the correct line and continue scrolling when a line is done. -- -- For example, this screen: -- --
-- Thread ThreadId 27: still working... done ---- --
-- Thread ThreadId 25: still working... ---- --
-- Thread ThreadId 26: still working... ---- --
-- _ ---- -- will, once thread 25 has finished, look like this -- --
-- Thread ThreadId 25: still working... done ---- --
-- Thread ThreadId 27: still working... done ---- --
-- Thread ThreadId 26: still working... ---- --
-- _ ---- -- If standard output is not a terminal, it will only print complete -- lines. -- -- At the moment, it can only handle lines that are shorter than the -- terminal. If they are not, output will be garbled again. @package concurrentoutput @version 0.1 -- | This library provides a simple interface to output status messages -- from more than one thread. -- -- It will continue adding information (such as dots, or done) to -- the correct line corresponding to the issuing thread and continue -- scrolling when a line is done. module System.Terminal.Concurrent data ConcurrentOutput -- | Starts the thread responsible for gathering and formatting the -- outputs. -- -- You can not kill this thread, so only start one for your application. startConcurrentOutput :: IO ConcurrentOutput -- | Begin a new line of output for your thread or, if there already is -- one, append to it. -- -- Do not put newline characters in there, or it will break the output. -- This will also happen if your total line will be wider than the -- terminal. writeConcurrent :: ConcurrentOutput -> String -> IO () -- | Finish your line of output with the given string. -- -- Do not put newline characters in there, or it will break the output. -- This will also happen if your total line will be wider than the -- terminal. writeConcurrentDone :: ConcurrentOutput -> String -> IO ()