explicit-exception 0.1.10.1 → 0.2.0.2
raw patch · 5 files changed
Files
- explicit-exception.cabal +13/−21
- src/Control/Monad/Exception/Asynchronous/Lazy.hs +0/−4
- src/Control/Monad/Exception/Asynchronous/Strict.hs +0/−5
- src/Control/Monad/Exception/Synchronous.hs +6/−11
- src/Control/Monad/Exception/Warning.hs +1/−1
explicit-exception.cabal view
@@ -1,6 +1,6 @@ Cabal-Version: 2.2 Name: explicit-exception-Version: 0.1.10.1+Version: 0.2.0.2 License: BSD-3-Clause License-File: LICENSE Author: Henning Thielemann <haskell@henning-thielemann.de>@@ -31,7 +31,7 @@ . See also: @unexceptionalio@ Tested-With: GHC==7.4.2, GHC==7.6.3, GHC==7.8.4-Tested-With: GHC==8.0.2, GHC==8.4.1+Tested-With: GHC==8.0.2, GHC==8.4.1, GHC==9.6.0 Build-Type: Simple Source-Repository head@@ -41,32 +41,24 @@ Source-Repository this type: darcs location: https://hub.darcs.net/thielema/explicit-exception/- tag: 0.1.10.1+ tag: 0.2.0.2 Flag buildTests description: Build executables that demonstrate some space leaks default: False -Flag splitBase- description: Choose the smaller, split-up base package from version 2 on. - Library Build-Depends:- transformers >=0.2 && <0.6,- semigroups >=0.1 && <1.0,- deepseq >=1.1 && <1.5+ transformers >=0.2 && <0.7,+ semigroups >=0.1 && <1,+ deepseq >=1.1 && <1.6 If impl(jhc) Build-Depends: applicative >=1.0 && <1.1, base >= 1 && <2 Else- If flag(splitBase)- Build-Depends: base >= 2 && <5- Else- Build-Depends:- special-functors >=1.0 && <1.1,- base >= 1 && <2+ Build-Depends: base >=4.11 && <5 GHC-Options: -Wall Hs-Source-Dirs: src@@ -92,9 +84,9 @@ If flag(buildTests) Build-Depends: explicit-exception,- bytestring >=0.9.0.1 && <0.12,+ bytestring >=0.9.0.1 && <0.13, tar >=0.4 && <0.6,- base+ base >=4.11 && <5 Else Buildable: False GHC-Options: -Wall@@ -106,8 +98,8 @@ If flag(buildTests) Build-Depends: explicit-exception,- bytestring >=0.9.0.1 && <0.12,- base+ bytestring >=0.9.0.1 && <0.13,+ base >=4.11 && <5 Else Buildable: False GHC-Options: -Wall@@ -118,7 +110,7 @@ Executable ee-unzip If flag(buildTests) Build-Depends:- base+ base >=4.11 && <5 Else Buildable: False GHC-Options: -Wall@@ -130,7 +122,7 @@ If flag(buildTests) Build-Depends: transformers,- base+ base >=4.11 && <5 Else Buildable: False GHC-Options: -Wall
src/Control/Monad/Exception/Asynchronous/Lazy.hs view
@@ -218,8 +218,6 @@ -} instance Monoid a => Monoid (Exceptional e a) where mempty = pure mempty--- mappend = append- mappend = (<>) {- | construct Exceptional constructor lazily -}@@ -403,7 +401,6 @@ instance (Monad m, Monoid a) => Monoid (ExceptionalT e m a) where mempty = ExceptionalT $ return mempty- mappend = (<>) {- instance Applicative m => Applicative (ExceptionalT e m) where@@ -412,7 +409,6 @@ ExceptionalT (fmap (<*>) f <*> x) instance Monad m => Monad (ExceptionalT e m) where- return = ExceptionalT . return . return x0 >>= f = ExceptionalT $ do Exceptional ex x <- runExceptionalT x0
src/Control/Monad/Exception/Asynchronous/Strict.hs view
@@ -212,8 +212,6 @@ -} instance Monoid a => Monoid (Exceptional e a) where mempty = pure mempty--- mappend = append- mappend = (<>) {- | construct Exceptional constructor lazily -}@@ -310,7 +308,6 @@ Exceptional e1 y -> Exceptional (mplus e0 e1) (g y) instance Monad (Exceptional e) where- return = pure fail _msg = Exceptional [Just (error "Asynchronous.fail exception")]@@ -383,7 +380,6 @@ instance (Monad m, Monoid a) => Monoid (ExceptionalT e m a) where mempty = ExceptionalT $ return mempty- mappend = (<>) {- instance Applicative m => Applicative (ExceptionalT e m) where@@ -392,7 +388,6 @@ ExceptionalT (fmap (<*>) f <*> x) instance Monad m => Monad (ExceptionalT e m) where- return = ExceptionalT . return . return x0 >>= f = ExceptionalT $ do Exceptional ex x <- runExceptionalT x0
src/Control/Monad/Exception/Synchronous.hs view
@@ -52,7 +52,6 @@ ExceptionalT(..), fromMaybeT, toMaybeT,- fromErrorT, toErrorT, fromEitherT, toEitherT, fromExitCodeT, toExitCodeT, liftT,@@ -77,7 +76,6 @@ {- MonadPlus(mzero, mplus), -}) import Control.Monad.Fix (MonadFix, mfix, ) import Control.Monad.Trans.Class (MonadTrans, lift, )-import Control.Monad.Trans.Error (ErrorT(ErrorT, runErrorT)) import Control.Monad.Trans.Maybe (MaybeT(MaybeT, runMaybeT)) import Control.DeepSeq (NFData, rnf, ) import Data.Functor (Functor, fmap, )@@ -206,6 +204,10 @@ Success a -> a Exception e -> handler e +{-+Semigroup instance could replace (Math.Checksum.IBAN.+++).+-}+ -- like Applicative.<|> infixl 3 `alternative`, `alternativeT` @@ -262,7 +264,6 @@ Exception e -> Exception e instance Monad (Exceptional e) where- return = Success x >>= f = case x of Exception e -> Exception e@@ -283,7 +284,8 @@ in a {--A MonadPlus instance would require another class, say DefaultException,+An Alternative/MonadPlus instance would require another class,+say DefaultException, that provides a default exception used for @mzero@. In Control.Monad.Error this is handled by the Error class. Since String is a typical type used for exceptions -@@ -308,12 +310,6 @@ toMaybeT :: Monad m => ExceptionalT e m a -> MaybeT m a toMaybeT = MaybeT . liftM toMaybe . runExceptionalT -fromErrorT :: Monad m => ErrorT e m a -> ExceptionalT e m a-fromErrorT = fromEitherT . runErrorT--toErrorT :: Monad m => ExceptionalT e m a -> ErrorT e m a-toErrorT = ErrorT . toEitherT- fromEitherT :: Monad m => m (Either e a) -> ExceptionalT e m a fromEitherT = ExceptionalT . liftM fromEither @@ -479,7 +475,6 @@ ExceptionalT (fmap (<*>) f <*> x) instance Monad m => Monad (ExceptionalT e m) where- return = ExceptionalT . return . return x0 >>= f = ExceptionalT $ runExceptionalT x0 >>= \x1 ->
src/Control/Monad/Exception/Warning.hs view
@@ -74,7 +74,7 @@ Warnable e1 y -> Warnable (mplus e0 e1) (g y) instance Monad (Warnable e) where- return = Warnable [] -- [Nothing]?+ return = pure x >>= f = case x of Warnable e0 y ->