úÎ!X P2‚      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKL M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h ijklmnopqrstuvwxyz{|}~€Safe Ż‚rescueDAttach a message to an exception, typicaly for runtime user feedbackExamples:set -XOverloadedStringsBshow $ InvalidFormat "foo" `WithMessage` "Not a valid JSON object"A"InvalidFormat \"foo\" `WithMessage` \"Not a valid JSON object\""   None.Hg )rescue- is a synonym for 'Either (OpenUnion errs) a'None.HVrescueCType-level check that a type is an open union. For use with the Subset' typeclass.None.=?@AHrescueHHack around overlapping instances to check subsets of bare values or ƒs automaticallyNone =?@AHVXkž rescueState that some type err is a subset of errsPIn essence, this is used to avoid having to specially lift bare values to an ƒ . We can treat all types and ƒ s the same. ! !None .=>?FHVž#rescue&Raise semantics, like a type-directed  MonadThrow. Not unlike  MonadError with an in-built open variant.%rescueRaise an errorThe ProxyZ gives a type hint to the type checker. If you have a case where it can be inferred, see  .Examples$data FooErr = FooErr deriving Show$data BarErr = BarErr deriving Show$data QuuxErr = QuuxErr deriving Show type MyErrs = '[FooErr, BarErr]:{1 goesBoom :: Int -> Either (OpenUnion MyErrs) Int goesBoom x = if x > 50 then return x else raise FooErr:} goesBoom 42Left (Identity FooErr):{ maybeBoom :: Int -> Maybe Int maybeBoom x = if x > 50 then return x else raise ():} maybeBoom 42Nothing#$%#$%None,>HV!Ş8rescue(Restrict exceptions to exactly this list9rescue-May raise errors, including the provided list:rescue-Raises this exception, but potentially others89::98None =>?HV_+;rescue5Pull a potential error out of the surrounding context<rescue<Attempt some action, exposing the success and error branchesExamples:{1 goesBoom :: Int -> Rescue '[FooErr, BarErr] Int goesBoom x = if x > 50 then return x else raise FooErr :}!runRescue . attempt $ goesBoom 42Right (Left (Identity FooErr))Where Identity fooErr is the selection of the ƒ$. In practice you would handle the ƒ like so:-let handleErr = catchesOpenUnion (show, show)>let x = attempt (goesBoom 42) >>= pure . either handleErr show runRescue xRight "FooErr";<;< None>HVX:PLrescueLift a pure error (Either ) into a  MonadRaise context i.e. Turn Lefts into raises.Examples:{% mayFail :: Int -> Either FooErr Int mayFail n = if n > 50 then Left FooErr else Right n:}:{8 goesBoom :: (MonadRaise m, m `Raises` FooErr) => m Int goesBoom = do" first <- ensure $ mayFail 100! second <- ensure $ mayFail 42 return $ second * 10:}(goesBoom :: Result '[FooErr, BarErr] IntLeft (Identity FooErr)Mrescue A version of ensure that takes monadic actionsExamples:{L mayFailM :: Monad m => Int -> m (Either (OpenUnion '[FooErr, BarErr]) Int) mayFailM n = return $ if n > 50& then Left (openUnionLift FooErr) else Right n:}:{@ foo :: (MonadRaise m, RaisesOnly m '[FooErr, BarErr]) => m Int foo = do$ first <- ensureM $ mayFailM 100& second <- ensureM $ mayFailM first return (second * 10):}/runRescue (foo :: Rescue '[FooErr, BarErr] Int)Left (Identity FooErr) !#$%89:LMLM None>HV;gNrescueUpgrade from an „ to a NN NoneHV_EmOrescueHandle all exceptionstype MyErrs = '[FooErr, BarErr]myErrs = Proxy @MyErrs:{'goesBoom :: Int -> Rescue MyErrs String goesBoom x = if x > 50 then return (show x) else raise FooErr:}Thandler = catchesOpenUnion (\foo -> "Foo: " <> show foo, \bar -> "Bar:" <> show bar)%rescue (goesBoom 42) (pure . handler)(RescueT (Identity (Right "Foo: FooErr"))Qrescueretryˆ without asynchoronous exception cleanup. Useful when not dealing with external resources that may be dangerous to close suddenly.Rrescue]Run an additional step, and throw away the result. Return the result of the action passed. !#$%89:;<LMOPQROQPR None 0=?@AHV_H^SrescueA specialized version of T' to be used without a transfromer stackTrescue0Add type-directed error handling abilities to a …STUVWTUVSWNoneHźSTUVW None>HVL‘grescueGSafely work with resources when an asynchronous exception may be thrownhrescueAcquire some resourcerescueCleanup and re-raiserescueCleanup normallyrescue)Inner action to perform with the resourceghghNoneMQirescueEquivalent of finally !#$%89:;<LMOPQRghijjiNone .HUVX_OilrescueAdds †$ to an exception stack, and thus aware of async exceptionsklmnlmnkNoneOżklmnSafeP ‡ˆ‰Š‹ŒŽ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ [ \ ] ^ _ ` a b c c d e f g h i j k l m n o p q r s t u vwxyzz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•“–—“˜™š›œžŸ Ą˘#rescue-0.2.1-5c9gtEOq96x2J8iP1oHTM9Data.Exception.TypesData.Result.Types"Data.WorldPeace.IsOpenUnion.Family%Data.WorldPeace.Subset.Class.InternalData.WorldPeace.Subset.ClassControl.Monad.Raise.ClassControl.Monad.Raise.ConstraintControl.Monad.Rescue.ClassControl.Monad.Raise Data.ResultControl.Monad.Rescue Control.Monad.Trans.Rescue.TypesControl.Monad.Cleanup.ClassControl.Monad.Cleanup!Control.Monad.Trans.Cleanup.Typesraise'Control.Monad.Trans.RescueControl.Monad.Trans.Cleanup Paths_rescue DivideByZero OutOfBounds AlreadyExists NotAllowedNotFound$fShowNotFound $fEqNotFound$fShowNotAllowed$fEqNotAllowed$fShowAlreadyExists$fEqAlreadyExists$fShowOutOfBounds$fEqOutOfBounds$fShowDivideByZero$fEqDivideByZero$fShowInvalidFormat$fEqInvalidFormat$fShowWithMessage$fEqWithMessageResultErrOk IsOpenUnionSubset'include'$fSubset'Falseerrerrs$fSubset'TrueUnionerrsSubsetinclude$fSubseterrUnion MonadRaiseErrorsraise$fMonadRaiseRWST$fMonadRaiseRWST0$fMonadRaiseWriterT$fMonadRaiseWriterT0$fMonadRaiseStateT$fMonadRaiseStateT0$fMonadRaiseContT$fMonadRaiseCatchT$fMonadRaiseReaderT$fMonadRaiseMaybeT$fMonadRaiseIdentityT$fMonadRaiseExceptT$fMonadRaiseSTM$fMonadRaiseST$fMonadRaiseIO$fMonadRaiseEither$fMonadRaiseMaybe$fMonadRaise[] RaisesOnly RaisesAtLeastRaises MonadRescueattempt$fMonadRescueContT$fMonadRescueRWST$fMonadRescueRWST0$fMonadRescueStateT$fMonadRescueStateT0$fMonadRescueWriterT$fMonadRescueWriterT0$fMonadRescueReaderT$fMonadRescueExceptT$fMonadRescueIdentityT$fMonadRescueMaybeT$fMonadRescueIO$fMonadRescueEither$fMonadRescue[]$fMonadRescueMaybeensureensureM fromEitherrescueonRaise reattemptlastlyRescueRescueT runRescueT runRescue$fMonadReadercfgRescueT$fMonadCatchRescueT$fMonadThrowRescueT$fMonadRescueRescueT$fMonadRaiseRescueT$fTraversableRescueT$fFoldableRescueT$fMonadFixRescueT$fMonadIORescueT$fMonadTransRescueT$fMonadRescueT$fApplicativeRescueT$fFunctorRescueT $fShowRescueT $fEqRescueT MonadCleanupcleanupalwaysretry CleanupIOCleanupT runCleanupT$fMonadCleanupCleanupT$fMonadMaskCleanupT$fMonadCatchCleanupT$fMonadRescueCleanupT$fMonadRaiseCleanupT$fMonadThrowCleanupT$fMonadFixCleanupT$fMonadPlusCleanupT$fMonadIOCleanupT$fMonadTransCleanupT$fMonadCleanupT$fAlternativeCleanupT$fApplicativeCleanupT$fTraversableCleanupT$fFoldableCleanupT$fContravariantCleanupT$fFunctorCleanupT$fShowCleanupT $fEqCleanupT WithMessage*world-peace-1.0.2.0-8YwVIJwXJlE9V1H0QN8tN4Data.WorldPeace.Union OpenUnionbase Data.EitherEitherGHC.BaseMonadGHC.Exception.Type SomeExceptionversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileName