EstProgress-0.2.0.0: Methods for estimating the progress of functions

Safe HaskellNone
LanguageHaskell98

Data.Progress

Description

Progress estimates.

progress is good for functions the recursion trees of which are very unbalanced. progressWithCalls is good for functions that consume their input very long before they finish.

Synopsis

Documentation

progress :: Data s => (s -> IO b) -> s -> IO b Source

Estimate progress based on thunks forced.

progressWithFile :: (Handle -> IO b) -> Handle -> IO b Source

...based on amount of file consumed.

progressWithCalls :: ((t -> IO b) -> t -> IO b) -> t -> IO b Source

...based on number of recursive calls.

It returns a result equivalent to that of fix f x.

progress' :: Data s => (s -> b) -> s -> IO b Source

Adapters for pure functions.

progressWithCalls' :: ((a -> c) -> a -> c) -> a -> IO c Source