cabal-install-solver-3.8.1.0: The command-line interface for Cabal and Hackage.
Safe HaskellNone
LanguageHaskell2010

Distribution.Solver.Modular.RetryLog

Synopsis

Documentation

data RetryLog step fail done Source #

Progress as a difference list that allows efficient appends at failures.

toProgress :: RetryLog step fail done -> Progress step fail done Source #

O(1). Convert a RetryLog to a Progress.

fromProgress :: Progress step fail done -> RetryLog step fail done Source #

O(N). Convert a Progress to a RetryLog.

mapFailure :: (fail1 -> fail2) -> RetryLog step fail1 done -> RetryLog step fail2 done Source #

O(1). Apply a function to the failure value in a log.

retry :: RetryLog step fail1 done -> (fail1 -> RetryLog step fail2 done) -> RetryLog step fail2 done Source #

O(1). If the first log leads to failure, continue with the second.

failWith :: step -> fail -> RetryLog step fail done Source #

O(1). Create a log with one message before a failure.

succeedWith :: step -> done -> RetryLog step fail done Source #

O(1). Create a log with one message before a success.

continueWith :: step -> RetryLog step fail done -> RetryLog step fail done Source #

O(1). Prepend a message to a log.

tryWith :: Message -> RetryLog Message fail done -> RetryLog Message fail done Source #

O(1). Prepend the given message and Enter to the log, and insert Leave before the failure if the log fails.