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

Safe HaskellSafe-Infered

Darcs.MonadProgress

Synopsis

Documentation

class Monad m => MonadProgress m whereSource

Methods

runProgressActions :: String -> [ProgressAction m ()] -> m ()Source

run a list of ProgressActions. In some monads (typically IO-based ones), the progress and error messages will be used. In others they will be ignored and just the actions will be run.

Instances

MonadProgress IO 
MonadProgress RestrictedApply 
MonadProgress FilePathMonad 
(Functor m, Monad m) => MonadProgress (TreeMonad m) 

data ProgressAction m a Source

a monadic action, annotated with a progress message that could be printed out while running the action, and a message that could be printed out on error. Actually printing out these messages is optional to allow non-IO monads to just run the action.

Constructors

ProgressAction 

Fields

paAction :: m a
 
paMessage :: Doc
 
paOnError :: Doc
 

silentlyRunProgressActions :: Monad m => String -> [ProgressAction m ()] -> m ()Source

run a list of ProgressActions without any feedback messages