Hello community, here is the log from the commit of package ghc-ether for openSUSE:Factory checked in at 2017-05-16 14:45:42 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-ether (Old) and /work/SRC/openSUSE:Factory/.ghc-ether.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-ether" Tue May 16 14:45:42 2017 rev:4 rq:494901 version:0.4.2.0 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-ether/ghc-ether.changes 2017-05-06 18:28:27.305356114 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-ether.new/ghc-ether.changes 2017-05-16 14:46:40.582305441 +0200 @@ -1,0 +2,5 @@ +Wed May 3 08:24:06 UTC 2017 - [email protected] + +- Update to version 0.4.2.0 with cabal2obs. + +------------------------------------------------------------------- Old: ---- ether-0.4.1.0.tar.gz New: ---- ether-0.4.2.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-ether.spec ++++++ --- /var/tmp/diff_new_pack.L5XWjg/_old 2017-05-16 14:46:41.378193623 +0200 +++ /var/tmp/diff_new_pack.L5XWjg/_new 2017-05-16 14:46:41.382193061 +0200 @@ -19,7 +19,7 @@ %global pkg_name ether %bcond_with tests Name: ghc-%{pkg_name} -Version: 0.4.1.0 +Version: 0.4.2.0 Release: 0 Summary: Monad transformers and classes License: BSD-3-Clause ++++++ ether-0.4.1.0.tar.gz -> ether-0.4.2.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ether-0.4.1.0/CHANGELOG.md new/ether-0.4.2.0/CHANGELOG.md --- old/ether-0.4.1.0/CHANGELOG.md 2017-04-03 15:12:40.000000000 +0200 +++ new/ether-0.4.2.0/CHANGELOG.md 2017-04-29 12:35:22.000000000 +0200 @@ -1,3 +1,8 @@ +0.4.2.0 +------- + +* Add default MTL instances for DispatchT. + 0.4.1.0 ------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ether-0.4.1.0/ether.cabal new/ether-0.4.2.0/ether.cabal --- old/ether-0.4.1.0/ether.cabal 2017-04-03 15:12:40.000000000 +0200 +++ new/ether-0.4.2.0/ether.cabal 2017-04-29 12:35:22.000000000 +0200 @@ -1,5 +1,5 @@ name: ether -version: 0.4.1.0 +version: 0.4.2.0 synopsis: Monad transformers and classes description: Ether is a Haskell library that extends @mtl@ and @transformers@ with diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ether-0.4.1.0/src/Control/Monad/Trans/Ether/Dispatch.hs new/ether-0.4.2.0/src/Control/Monad/Trans/Ether/Dispatch.hs --- old/ether-0.4.1.0/src/Control/Monad/Trans/Ether/Dispatch.hs 2017-04-03 15:12:40.000000000 +0200 +++ new/ether-0.4.2.0/src/Control/Monad/Trans/Ether/Dispatch.hs 2017-04-29 12:35:22.000000000 +0200 @@ -1,5 +1,10 @@ {-# LANGUAGE CPP #-} +#if __GLASGOW_HASKELL__ < 710 +{-# LANGUAGE OverlappingInstances #-} +{-# OPTIONS_GHC -fno-warn-unrecognised-pragmas #-} +#endif + #if __GLASGOW_HASKELL__ >= 710 {-# OPTIONS_GHC -fno-warn-unticked-promoted-constructors #-} #endif @@ -84,6 +89,7 @@ import Control.Monad.Ether.Except.Class import Control.Monad.Ether.Writer.Class +import qualified Control.Monad.Cont as Class import qualified Control.Monad.Reader as Class import qualified Control.Monad.State as Class import qualified Control.Monad.Except as Class @@ -207,3 +213,44 @@ tell _ = let t = Proxy :: Proxy tNew in Lift.lift . tell t listen _ = let t = Proxy :: Proxy tNew in Lift.liftListen (listen t) pass _ = let t = Proxy :: Proxy tNew in Lift.liftPass (pass t) + + +-- Instances for mtl classes + +instance {-# OVERLAPPABLE #-} + ( Class.MonadCont m + ) => Class.MonadCont (DispatchT dp m) + where + callCC = Lift.liftCallCC' Class.callCC + +instance {-# OVERLAPPABLE #-} + ( Class.MonadReader r m + ) => Class.MonadReader r (DispatchT dp m) + where + ask = Class.lift Class.ask + local = Lift.liftLocal Class.ask Class.local + reader = Class.lift . Class.reader + +instance {-# OVERLAPPABLE #-} + ( Class.MonadState s m + ) => Class.MonadState s (DispatchT dp m) + where + get = Class.lift Class.get + put = Class.lift . Class.put + state = Class.lift . Class.state + +instance {-# OVERLAPPABLE #-} + ( Class.MonadWriter w m + ) => Class.MonadWriter w (DispatchT dp m) + where + writer = Class.lift . Class.writer + tell = Class.lift . Class.tell + listen = Lift.liftListen Class.listen + pass = Lift.liftPass Class.pass + +instance {-# OVERLAPPABLE #-} + ( Class.MonadError e m + ) => Class.MonadError e (DispatchT dp m) + where + throwError = Class.lift . Class.throwError + catchError = Lift.liftCatch Class.catchError
