on master help sign in
Make way for either >= 4.5

This resolves #76

commitccb1043ea84a467411eb63c715695265abe42891 authorMichael Xavier <michael@michaelxavier.net> dateMon 27 Nov 2017, 09:08 (9 years ago) parent3775af9
3 files changed+9−1
katip/katip.cabal+1−1 katip/src/Katip/Core.hs+4 katip/src/Katip/Monadic.hs+4
katip/katip.cabal+1−1
@@ -59,7 +59,7 @@ library
5959 , auto-update >= 0.1 && < 0.2
6060 , bytestring >= 0.9 && < 0.11
6161 , containers >=0.4 && <0.6
62− , either >= 4 && < 4.5
62+ , either >= 4 && < 5.1
6363 , safe-exceptions >= 0.1.0.0
6464 , hostname >=1.0 && <1.1
6565 , old-locale >= 1.0 && < 1.1
katip/src/Katip/Core.hs+4
@@ -35,7 +35,9 @@ import Control.Monad.Base
3535import Control.Monad.IO.Class
3636import Control.Monad.Trans.Class
3737import Control.Monad.Trans.Control
38+#if !MIN_VERSION_either(4, 5, 0)
3839import Control.Monad.Trans.Either
40+#endif
3941import Control.Monad.Trans.Except
4042import Control.Monad.Trans.Maybe
4143import Control.Monad.Trans.Reader
@@ -752,9 +754,11 @@ instance Katip m => Katip (ReaderT s m) where
752754 localLogEnv = mapReaderT . localLogEnv
753755
754756
757+#if !MIN_VERSION_either(4, 5, 0)
755758instance Katip m => Katip (EitherT s m) where
756759 getLogEnv = lift getLogEnv
757760 localLogEnv = mapEitherT . localLogEnv
761+#endif
758762
759763
760764instance Katip m => Katip (ExceptT s m) where
katip/src/Katip/Monadic.hs+4
@@ -46,7 +46,9 @@ import Control.Monad.IO.Class
4646import Control.Monad.Reader
4747import Control.Monad.State
4848import Control.Monad.Trans.Control
49+#if !MIN_VERSION_either(4, 5, 0)
4950import Control.Monad.Trans.Either (EitherT, mapEitherT)
51+#endif
5052import Control.Monad.Trans.Except (ExceptT, mapExceptT)
5153import Control.Monad.Trans.Identity (IdentityT, mapIdentityT)
5254import Control.Monad.Trans.List (ListT, mapListT)
@@ -152,11 +154,13 @@ instance (KatipContext m, Katip (MaybeT m)) => KatipContext (MaybeT m) where
152154 localKatipNamespace = mapMaybeT . localKatipNamespace
153155
154156
157+#if !MIN_VERSION_either(4, 5, 0)
155158instance (KatipContext m, Katip (EitherT e m)) => KatipContext (EitherT e m) where
156159 getKatipContext = lift getKatipContext
157160 localKatipContext = mapEitherT . localKatipContext
158161 getKatipNamespace = lift getKatipNamespace
159162 localKatipNamespace = mapEitherT . localKatipNamespace
163+#endif
160164
161165
162166instance (KatipContext m, Katip (ListT m)) => KatipContext (ListT m) where