darcs-2.5.2: a distributed, interactive, smart revision control system




beginTedious :: String -> IO ()Source

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 ()Source

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

progress :: String -> a -> aSource

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