explicit-exception 0.1.1 → 0.1.2
raw patch · 2 files changed
+16/−3 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
explicit-exception.cabal view
@@ -1,5 +1,5 @@ Name: explicit-exception-Version: 0.1.1+Version: 0.1.2 License: BSD3 License-File: LICENSE Author: Henning Thielemann <haskell@henning-thielemann.de>@@ -46,7 +46,7 @@ Source-Repository this type: darcs location: http://code.haskell.org/explicit-exception/- tag: 0.1.1+ tag: 0.1.2 Library Build-Depends: base >= 2, transformers >=0.0 && <0.2
src/Control/Monad/Exception/Asynchronous.hs view
@@ -202,6 +202,8 @@ and the second stream is not touched. If the first stream can be read successfully, the second one is appended until stops.++'append' is less strict than the 'Monoid' method 'mappend' instance. -} append :: Monoid a =>@@ -225,9 +227,15 @@ Exceptional (mplus ea eb) a +{- |+'mappend' must be strict in order to fulfill the Monoid laws+@mappend mempty a = a@ and @mappend a mempty = a@ for @a=undefined@.+-} instance Monoid a => Monoid (Exceptional e a) where mempty = pure mempty- mappend = append+-- mappend = append+ mappend (Exceptional ea a) (Exceptional eb b) =+ Exceptional (mplus ea eb) (mappend a (maybe b (const mempty) ea)) {- | construct Exceptional constructor lazily -}@@ -240,6 +248,11 @@ mapExceptional :: (e0 -> e1) -> (a -> b) -> Exceptional e0 a -> Exceptional e1 b mapExceptional f g ~(Exceptional e a) = Exceptional (fmap f e) (g a) +{-+fmap (f.g) = fmap f . fmap g+++-} instance Functor (Exceptional e) where fmap f ~(Exceptional e a) = Exceptional e (f a)