darcs-2.18.2: a distributed, interactive, smart revision control system
Copyright2008 David Roundy
LicenseGPL
Maintainerdarcs-devel@darcs.net
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Darcs.Util.Progress

Description

Utility functions for tracking progress of long-running actions.

Synopsis

Documentation

beginTedious :: String -> IO () #

beginTedious k starts a tedious process and registers it in _progressData with the key k. A tedious process is one for which we want a progress indicator.

Wouldn't it be safer if it had type String -> IO ProgressDataKey, so that we can ensure there is no collision? What happens if you call beginTedious twice with the same string, without calling endTedious in the meantime?

endTedious :: String -> IO () #

endTedious k unregisters the tedious process with key k, printing Done if such a tedious process exists.

tediousSize :: String -> Int -> IO () #

withProgress :: String -> (String -> IO a) -> IO a #

withSizedProgress :: String -> Int -> (String -> IO a) -> IO a #

progress :: String -> a -> a #

finishedOne :: String -> String -> a -> a #

progressList :: String -> [a] -> [a] #

minlist :: Int #

XXX: document this constant