exception-transformers 0.4.0.8 → 0.4.0.9
raw patch · 3 files changed
+24/−18 lines, 3 filesdep −stmPVP ok
version bump matches the API change (PVP)
Dependencies removed: stm
API changes (from Hackage documentation)
Files
- Control/Monad/Exception.hs +19/−13
- LICENSE +1/−1
- exception-transformers.cabal +4/−4
Control/Monad/Exception.hs view
@@ -174,12 +174,30 @@ a <- m return (Right a) +instance (Functor m, Monad m) => Applicative (ExceptionT m) where+ pure a = ExceptionT $ return (Right a)++ f <*> v = ExceptionT $ do+ mf <- runExceptionT f+ case mf of+ Left e -> return (Left e)+ Right k -> do+ mv <- runExceptionT v+ case mv of+ Left e -> return (Left e)+ Right x -> return (Right (k x))+ instance (Functor m) => Functor (ExceptionT m) where fmap f = ExceptionT . fmap (fmap f) . runExceptionT instance (Monad m) => Monad (ExceptionT m) where+#if MIN_VERSION_base(4,8,0)+ return = pure+#else /* !MIN_VERSION_base(4,8,0) */ return a = ExceptionT $ return (Right a)- m >>= k = ExceptionT $ do+#endif /* !MIN_VERSION_base(4,8,0) */++ m >>= k = ExceptionT $ do a <- runExceptionT m case a of Left l -> return (Left l)@@ -197,18 +215,6 @@ case a of Left _ -> runExceptionT n Right r -> return (Right r)--instance (Functor m, Monad m) => Applicative (ExceptionT m) where- pure a = ExceptionT $ return (Right a)- f <*> v = ExceptionT $ do- mf <- runExceptionT f- case mf of- Left e -> return (Left e)- Right k -> do- mv <- runExceptionT v- case mv of- Left e -> return (Left e)- Right x -> return (Right (k x)) instance (Functor m, Monad m) => Alternative (ExceptionT m) where empty = mzero
LICENSE view
@@ -25,7 +25,7 @@ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Copyright (c) 2011-2015, Geoffrey Mainland+Copyright (c) 2011-2020, Geoffrey Mainland All rights reserved. Redistribution and use in source and binary forms, with or without modification,
exception-transformers.cabal view
@@ -1,10 +1,10 @@ name: exception-transformers-version: 0.4.0.8+version: 0.4.0.9 cabal-version: >= 1.10 license: BSD3 license-file: LICENSE copyright: (c) 2009-2010 Harvard University- (c) 2011-2019 Geoffrey Mainland+ (c) 2011-2020 Geoffrey Mainland author: Geoffrey Mainland <mainland@drexel.edu> maintainer: Geoffrey Mainland <mainland@drexel.edu> stability: alpha@@ -15,7 +15,8 @@ transformer that support unchecked extensible exceptions as well as asynchronous exceptions. It is compatible with the transformers package.-tested-with: GHC==7.4.2, GHC==7.6.3, GHC==7.8.3, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2, GHC==8.4.3, GHC==8.6.5, GHC==8.8.1+tested-with: GHC==7.4.2, GHC==7.6.3, GHC==7.8.3, GHC==7.10.3, GHC==8.0.2,+ GHC==8.2.2, GHC==8.4.3, GHC==8.6.5, GHC==8.8.1, GHC==8.10.1 build-type: Simple @@ -27,7 +28,6 @@ build-depends: base >= 4 && < 5,- stm >= 2.1 && < 2.6, transformers >= 0.2 && < 0.6, transformers-compat >= 0.3 && < 0.7