úÎ8£5©%      !"#$AA simple exception which simply contains a string. Note that the % / instance simply returns the contained string. Any &< which may report failure using extensible exceptions. This N most obviously applies to the Attempt data type, but you should just as well  use this for arbitrary &s. "Usage should be straight forward: ' successes and  errors. 8 If you simply want to send a string error message, use .  Although tempting to do so, ( is *not* used as a synonym for  ; ( should not be used at all. Minimal complete definition:  and . Call  by wrapping the argument in a . AWrap the failure value, if any, with the given function. This is G useful in particular when you want all the exceptions returned from a I certain library to be of a certain type, even if they were generated by  a different library.  HA simple wrapper value necesary due to the Haskell type system. Wraps a  function from a *specific* ) type to some value. *(Any type which can be converted from an  ". The included instances are your "usual suspects"0 for dealing with error handling. They include: +-: For the IO instance, any exceptions in the   are thrown as  runtime exceptions. , : Returns - on  , or . on  .  List: Returns the empty list on  , or a singleton list on  . / 0 : Returns 1 (2 exception) on  , or 3 on   . / ) : Returns 1 exception on  , or 3 on   .  Contains either a   value or a   exception. A shortcut for . ,Process either the exception or value in an   to produce a result. This function is modeled after 4 and 5. The first argument must  accept any instances of )'. If you want to handle multiple types  of exceptions, see +. The second argument converts the success  value. error handler success handler Convert multiple (s and a default value into an exception  handler. LThis is a convenience function when you want to have special handling for a  few types of )/s and provide another value for anything else.        Instances of  specify a manner for embedding   ? failures directly into the target data type. For example, the + instance N simply throws a runtime error. This is a convenience wrapper when you simply " want to use that default action. So given a type  + 6#, this function will convert it to +  61, throwing any exceptions in the original value.  78.For functions which expect index values >= 0. Report errors from the ! function. ;Exception type for functions which expect non-empty lists. Exception type for the  function. EThis is not a simple translation of the Control.Monad.join function.  Instead, for &s which are instances of , it removes the  inner  * type, reporting errors as defined in the   instance. 'For example, join (Just (failureString "foo")) == Nothing.  !"3Same as Prelude.!!. Name stolen from safe library. #IAssert a value to be true. If true, returns the first value as a succss. 3 Otherwise, returns the second value as a failure. $(The standard readFile function with any 9s returned as a ) failure instead of a runtime exception.  !"#$ !"#$ !"#$:      !"#$%&$'($')$'*$+, -./$01$02$03$45$'6$47$%8$49$0:$4;-.<==$>?@ attempt-0.0.0Control.Monad.Attempt.Class Data.AttemptControl.Monad.AttemptData.Attempt.HelperStringException MonadAttemptfailure failureString wrapFailureAttemptHandler FromAttempt fromAttemptAttemptFailureSuccessfaattempt makeHandlerAttemptT runAttemptT evalAttemptT NegativeIndex CouldNotRead EmptyList KeyNotFoundjoinlookuptailinitheadlastreadatassertreadFilebaseGHC.ShowShowGHC.BaseMonadreturnfail GHC.Exception Exceptionghc-prim GHC.TypesIO Data.MaybeMaybeNothingJust Data.EitherEitherStringLeftshowRightmaybeeitherIntOutOfBoundsIndexGHC.IO.Exception IOException