h&+)V      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_ (c) Alexey Kuleshevich 2022-2023BSD3(Alexey Kuleshevich  experimental non-portable Safe-Inferred"')*FailT%An exception that is produced by the  monad transformer.FailT,Fail monad transformer that plays well with ` type class.FailT transformer with a as the base monad.FailTUnwrap the pure  monad and reveal the underlying result of monadic computation.9runFail (fail "Something went wrong") :: Either String ()Left "Something went wrong"1runFail (failT "Something went wrong" >> pure ())Left "Something went wrong"import Control.Applicative=runFail (failT "Something could have gone wrong" <|> pure ())Right ()All errors accrued during the monadic computation will be combined using the b# instance and delimited by a comma:runFail (fail "One thing went wrong" <|> fail "Another thing went wrong") :: Either String ()5Left "One thing went wrong, Another thing went wrong"(Failing with one of instances functions c or d& will yield a no-reason error report:"runFail mempty :: Either String ()Left "No failure reason given"FailTThis is a variant of   where only the error reported for the very last failed computation will be produced and others discarded. This is useful when it is not relevant to retain information about all the attempts and only the last one matters, eg. parsing with backtracking. FailT Convert a  monad computation in an e , where the f will contain all failures in the same order they where received, or g upon a successful computation.runFailAgg (fail "One bad thing" <|> fail "Another bad thing") :: Either [String] ()*Left ["One bad thing","Another bad thing"]runFailAgg (fail "A bad thing" <|> pure "A good thing") :: Either [String] StringRight "A good thing" FailTThrow an error if there was a failure, otherwise return the result of computation. Use  in case you'd like to handle an actual exception in some other underlying monad.5errorFail (fail "This didn't work" :: Fail String ())!*** Exception: "This didn't work"CallStack (from HasCallStack):...errorFail (fail "This didn't work" <|> pure "That Worked" :: Fail String String) "That Worked" FailTSame as  , but without the stack trace:errorFailWithoutStackTrace (fail "This didn't work" :: Fail String ())!*** Exception: "This didn't work"errorFailWithoutStackTrace (fail "This didn't work" <|> pure "That Worked" :: Fail String String) "That Worked" FailT Similar to h, but it is not restricted to i. FailT Similar to  !, but accepts a list of failures.runFailAgg (foldMap failT (xs :: [String])) == runFailAgg (failManyT xs)FailT Similar to /, except underlying monad is not restricted to a. Unwrap the  monad transformer and produce an action that can be executed in the underlying monad and, which will produce either a comma delimited error message upon a failure or the result otherwise.runFailT (failT "Could have failed" <|> liftIO (putStrLn "Nothing went wrong"))Nothing went wrongRight ()FailT Similar to /, except underlying monad is not restricted to a.FailT Similar to  /, except underlying monad is not restricted to a.FailT7Change the underlying monad with the hoisting function.FailT9Map a function over the underlying representation of the  monad.FailT*Map a function over the error type in the  monad.FailT5Map a function over the aggregation of errors in the  monad. Could be used for example for clearing our all of the aggregated error messages:runFail (mapErrorsFailT (const []) $ failT "Something went wrong") :: Either String ()Left "No failure reason given"FailT Convert a  computation into an j.=exceptFailT (fail "A bad thing" >> pure () :: Fail String ())%ExceptT (Identity (Left FailException "A bad thing"CallStack (from HasCallStack):...FailTSame as , but works with any k.throwErrorFailT (fail "A bad thing" >> pure () :: FailT String (Except FailException) ())%ExceptT (Identity (Left FailException "A bad thing"CallStack (from HasCallStack):...FailTUse the l instance to raise a  in the underlying monad.)throwFailT (failT "One thing went wrong")*** Exception: FailException"One thing went wrong"...5throwFailT (failT "One thing went wrong") :: Maybe ()NothingmFailTLift a callCC operation to the new monad.FailTLift a catchE operation to the new monad.FailTLift a n operation to the new monad.FailTLift a o operation to the new monad.FailT0FailTExecutes all monadic actions and combines all successful results using a b instance. Combines together all failures as well, until a successful operation.1FailTShort-circuits on the first successful operation, combines failures otherwise.5FailT/Short-circuites on the first failing operation.    (c) Alexey Kuleshevich 2022-2023BSD3(Alexey Kuleshevich  experimental non-portable Safe-Inferred:FailT Version of  restricted to i,Fail monad transformer that plays well with `;FailT Version of  restricted to i<FailT Version of  restricted to i=FailT Version of  restricted to i>FailT Version of   restricted to i?FailT Version of   restricted to iThrow an error if there was a failure, otherwise return the result of monadic computation. Use L2 in case you'd like to handle an actual exception.@FailT Version of  restricted to iSame as ?, but without the stack trace:?errorFailWithoutStackTrace (fail "This didn't work" :: Fail ())!*** Exception: "This didn't work"import Control.ApplicativeerrorFailWithoutStackTrace (fail "This didn't work" <|> pure "That Worked" :: Fail String) "That Worked"AFailT Version of   restricted to iMonomorphic synonym for hBFailT Version of   restricted to i:runFailAgg (foldMap failT xs) == runFailAgg (failManyT xs)CFailT Version of  restricted to iDFailT Version of  restricted to iEFailT Version of  restricted to iFFailT Version of  restricted to i6Change the underlying monad with the hoisting functionGFailT Version of  restricted to i9Map a function over the underlying representation of the : monad.HFailT Version of (, where resulting type is restricted to i*Map a function over the error type in the : monad.IFailT Version of (, where resulting type is restricted to i5Map a function over the aggregation of errors in the : monad. Could be used for example for clearing our all of the aggregated error messages:runFail (mapErrorsFailT (const []) $ failT "Something went wrong") :: Either String ()Left "No failure reason given"JFailT Version of  restricted to iKFailT Version of  restricted to iSame as J, but works with any k.&import Control.Monad.Trans.Fail.StringthrowErrorFailT (fail "A bad thing" >> pure () :: FailT (Except FailException) ())%ExceptT (Identity (Left FailException "A bad thing"CallStack (from HasCallStack):...LFailT Version of  restricted to i:;<=>?@ABCDEFGHIJKL;<=>?@:ABCDEFGHIJKL (c) Alexey Kuleshevich 2022-2023BSD3(Alexey Kuleshevich  experimental non-portable Safe-Inferred)$MFailT Version of  restricted to p,Fail monad transformer that plays well with `NFailT Version of  restricted to pOFailT Version of  restricted to pPFailT Version of  restricted to pQFailT Version of   restricted to pRFailT Version of   restricted to pThrow an error if there was a failure, otherwise return the result of monadic computation. Use _2 in case you'd like to handle an actual exception.SFailT Version of   restricted to pSame as R, but without the stack trace:?errorFailWithoutStackTrace (fail "This didn't work" :: Fail ())!*** Exception: "This didn't work"import Control.ApplicativeerrorFailWithoutStackTrace (fail "This didn't work" <|> pure "That Worked" :: Fail String) "That Worked"TFailT Version of   restricted to pMonomorphic synonym for hUFailT Version of   restricted to pVFailT Version of  restricted to pWFailT Version of  restricted to pXFailT Version of  restricted to pYFailT Version of  restricted to p6Change the underlying monad with the hoisting functionZFailT Version of  restricted to p9Map a function over the underlying representation of the M monad.[FailT Version of ' where resulting type is restricted to p*Map a function over the error type in the M monad.\FailT Version of (, where resulting type is restricted to p5Map a function over the aggregation of errors in the M monad. Could be used for example for clearing our all of the aggregated error messages:runFail (mapErrorsFailT (const [] :: [Text] -> [Text]) $ fail "Something went wrong" >> pure ())Left "No failure reason given"]FailT Version of  restricted to p^FailT Version of  restricted to pSame as ], but works with any k.$import Control.Monad.Trans.Fail.TextthrowErrorFailT (fail "A bad thing" >> pure () :: FailT (Except FailException) ())%ExceptT (Identity (Left FailException "A bad thing"CallStack (from HasCallStack):..._FailT Version of  restricted to pMNOPQRSTUVWXYZ[\]^_NOPQRSMTUVWXYZ[\]^_       !"#$%&'()*+,-./0123456789:;<=>        ?@A?BC?DE?DF?DG?HI?HJ?HK?@L?DMNOPQRSTUVWQXYQXZ[\]$FailT-0.1.2.0-At9giw5QOlAG2JO3K0eelIControl.Monad.Trans.FailControl.Monad.Trans.Fail.StringControl.Monad.Trans.Fail.TextF mapErrorFail mapErrorsFail FailException failMessages failCallStackFailTFailrunFail runFailLast runFailAgg errorFailerrorFailWithoutStackTracefailT failManyTrunFailT runFailLastT runFailAggT hoistFailTmapFailT mapErrorFailTmapErrorsFailT exceptFailTthrowErrorFailT throwFailT liftCatch liftListenliftPass$fMonadContFailT$fMonadRWSrwsFailT$fMonadWriterwFailT$fMonadErroreFailT$fMonadStatesFailT$fMonadReaderrFailT$fMonadThrowFailT $fShowFailT $fReadFailT $fOrdFailT $fEqFailT $fShow1FailT $fRead1FailT $fOrd1FailT $fEq1FailT$fContravariantFailT$fMonadFixFailT$fMonadZipFailT$fMonadTransFailT$fMonadIOFailT $fMonoidFailT$fSemigroupFailT$fAlternativeFailT$fTraversableFailT$fFoldableFailT$fMonadFailFailT $fMonadFailT$fApplicativeFailT$fFunctorFailT$fExceptionFailException$fShowFailExceptionbaseControl.Monad.Fail MonadFailData.Functor.IdentityIdentityGHC.Base Semigroupmemptyempty Data.EitherEitherLeftRightfailStringtransformers-0.5.6.2Control.Monad.Trans.ExceptExceptT mtl-2.2.2Control.Monad.Error.Class MonadErrorexceptions-0.10.4Control.Monad.Catch MonadThrow liftCallCCControl.Monad.Writer.Classlistenpass text-1.2.5.0Data.Text.InternalText