Hello community, here is the log from the commit of package ghc-either for openSUSE:Factory checked in at 2015-08-27 08:55:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-either (Old) and /work/SRC/openSUSE:Factory/.ghc-either.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-either" Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-either/ghc-either.changes 2015-06-02 10:06:35.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-either.new/ghc-either.changes 2015-08-27 08:55:28.000000000 +0200 @@ -1,0 +2,6 @@ +Fri Aug 7 06:57:35 UTC 2015 - mimi...@gmail.com + +- update to 4.4.1 +* Support mmorph + +------------------------------------------------------------------- Old: ---- either-4.3.4.1.tar.gz New: ---- either-4.4.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-either.spec ++++++ --- /var/tmp/diff_new_pack.62vxWI/_old 2015-08-27 08:55:29.000000000 +0200 +++ /var/tmp/diff_new_pack.62vxWI/_new 2015-08-27 08:55:29.000000000 +0200 @@ -19,7 +19,7 @@ %global pkg_name either Name: ghc-either -Version: 4.3.4.1 +Version: 4.4.1 Release: 0 Summary: An either monad transformer License: BSD-3-Clause @@ -36,6 +36,7 @@ BuildRequires: ghc-bifunctors-devel BuildRequires: ghc-exceptions-devel BuildRequires: ghc-free-devel +BuildRequires: ghc-mmorph-devel BuildRequires: ghc-monad-control-devel BuildRequires: ghc-mtl-devel BuildRequires: ghc-profunctors-devel ++++++ either-4.3.4.1.tar.gz -> either-4.4.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/either-4.3.4.1/CHANGELOG.markdown new/either-4.4.1/CHANGELOG.markdown --- old/either-4.3.4.1/CHANGELOG.markdown 2015-05-29 07:59:29.000000000 +0200 +++ new/either-4.4.1/CHANGELOG.markdown 2015-05-29 16:10:31.000000000 +0200 @@ -1,3 +1,7 @@ +4.4 +--- +* Support `mmorph` + 4.3.4.1 ------- * Support `MonadRandom` 0.4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/either-4.3.4.1/either.cabal new/either-4.4.1/either.cabal --- old/either-4.3.4.1/either.cabal 2015-05-29 07:59:29.000000000 +0200 +++ new/either-4.4.1/either.cabal 2015-05-29 16:10:31.000000000 +0200 @@ -1,6 +1,6 @@ name: either category: Control, Monads -version: 4.3.4.1 +version: 4.4.1 license: BSD3 cabal-version: >= 1.6 license-file: LICENSE @@ -34,6 +34,7 @@ monad-control >= 0.3.2 && < 1.1, MonadRandom >= 0.1 && < 0.5, mtl >= 2.0 && < 2.3, + mmorph >= 1.0.0 && < 1.1, profunctors >= 4 && < 6, semigroups >= 0.8.3.1 && < 1, semigroupoids >= 4 && < 6, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/either-4.3.4.1/src/Control/Monad/Trans/Either.hs new/either-4.4.1/src/Control/Monad/Trans/Either.hs --- old/either-4.3.4.1/src/Control/Monad/Trans/Either.hs 2015-05-29 07:59:29.000000000 +0200 +++ new/either-4.4.1/src/Control/Monad/Trans/Either.hs 2015-05-29 16:10:31.000000000 +0200 @@ -7,6 +7,7 @@ {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeFamilies #-} ----------------------------------------------------------------------------- -- | @@ -49,6 +50,7 @@ import Control.Monad.Trans.Control (MonadBaseControl(..), MonadTransControl(..), defaultLiftBaseWith, defaultRestoreM) import Control.Monad.Writer.Class import Control.Monad.Random (MonadRandom,getRandom,getRandoms,getRandomR,getRandomRs) +import Control.Monad.Morph (MFunctor, hoist) import Data.Either.Combinators ( swapEither ) import Data.Foldable import Data.Function (on) @@ -92,6 +94,10 @@ compare = compare `on` runEitherT {-# INLINE compare #-} +instance MFunctor (EitherT e) where + hoist f = EitherT . f . runEitherT + {-# INLINE hoist #-} + -- | Given a pair of actions, one to perform in case of failure, and one to perform -- in case of success, run an 'EitherT' and get back a monadic result. eitherT :: Monad m => (a -> m c) -> (b -> m c) -> EitherT a m b -> m c @@ -343,7 +349,7 @@ {-# INLINE liftWith #-} restoreT = EitherT . liftM unStEitherT {-# INLINE restoreT #-} - + instance MonadBaseControl b m => MonadBaseControl b (EitherT e m) where newtype StM (EitherT e m) a = StMEitherT { unStMEitherT :: StM m (StT (EitherT e) a) } liftBaseWith = defaultLiftBaseWith StMEitherT