|A universal data type for computations which may fail. Errors are reported
using extensible exceptions. These exceptions are not explicitly stated; if
you want this kind of functionality, something like control-monad-exception
might be a more appropriate fit.
|Data type and type class
|Contains either a Success value or a Failure exception.
|class FromAttempt a where||Source|
|A shortcut for fromAttempt.
This is not a simple translation of the Control.Monad.join function.
Instead, for Monads which are instances of FromAttempt, it removes the
inner Attempt type, reporting errors as defined in the FromAttempt
For example, join (Just (failureString "foo")) == Nothing.
|General handling of Attempts
|=> forall e. Exception e => e -> b||error handler
|-> a -> b||success handler
|-> Attempt a|
Process either the exception or value in an Attempt to produce a result.
This function is modeled after maybe and either. The first argument must
accept any instances of Exception. If you want to handle multiple types
of exceptions, see makeHandler. The second argument converts the success
Convert multiple AttemptHandlers and a default value into an exception
This is a convenience function when you want to have special handling for a
few types of Exceptions and provide another value for anything else.
|A simple wrapper value necesary due to the Haskell type system. Wraps a
function from a *specific* Exception type to some value.
|forall e . Exception e => AttemptHandler (e -> v)|
|Tests for a Failure value.
|Tests for a Success value.
|This is an unsafe, partial function which should only be used if you
either know that a function will succeed or don't mind the occassional
|Lists of Attempts
|Returns only the Success values.
|Returns only the Failure values, each wrapped in a SomeException.
|Return all of the Failures and Successes separately in a tuple.
|Reexport the MonadFailure class
|Produced by Haddock version 2.4.2|