A short example, on how to use monad classes to program against the interface.
class Monad m => MonadLog m where
log :: Text -> m ()
class Monad m => MonadProgress m where
reportProgress :: Done -> All -> m ()
is very same as passing an object implementing LoggerInterface
or ProgressInterface
.