on master help sign in
Make way for either >= 4.5
ccb1043Michael Xavier
katip/katip.cabal+1−1
@@ -59,7 +59,7 @@ library
59 , auto-update >= 0.1 && < 0.2
59 , auto-update >= 0.1 && < 0.2
60 , bytestring >= 0.9 && < 0.11
60 , bytestring >= 0.9 && < 0.11
61 , containers >=0.4 && <0.6
61 , containers >=0.4 && <0.6
62− , either >= 4 && < 4.5
62+ , either >= 4 && < 5.1
63 , safe-exceptions >= 0.1.0.0
63 , safe-exceptions >= 0.1.0.0
64 , hostname >=1.0 && <1.1
64 , hostname >=1.0 && <1.1
65 , old-locale >= 1.0 && < 1.1
65 , old-locale >= 1.0 && < 1.1
katip/src/Katip/Core.hs+4
@@ -35,7 +35,9 @@ import Control.Monad.Base
35import Control.Monad.IO.Class
35import Control.Monad.IO.Class
36import Control.Monad.Trans.Class
36import Control.Monad.Trans.Class
37import Control.Monad.Trans.Control
37import Control.Monad.Trans.Control
38+#if !MIN_VERSION_either(4, 5, 0)
38import Control.Monad.Trans.Either
39import Control.Monad.Trans.Either
40+#endif
39import Control.Monad.Trans.Except
41import Control.Monad.Trans.Except
40import Control.Monad.Trans.Maybe
42import Control.Monad.Trans.Maybe
41import Control.Monad.Trans.Reader
43import Control.Monad.Trans.Reader
@@ -752,9 +754,11 @@ instance Katip m => Katip (ReaderT s m) where
752 localLogEnv = mapReaderT . localLogEnv
754 localLogEnv = mapReaderT . localLogEnv
753
755
754
756
757+#if !MIN_VERSION_either(4, 5, 0)
755instance Katip m => Katip (EitherT s m) where
758instance Katip m => Katip (EitherT s m) where
756 getLogEnv = lift getLogEnv
759 getLogEnv = lift getLogEnv
757 localLogEnv = mapEitherT . localLogEnv
760 localLogEnv = mapEitherT . localLogEnv
761+#endif
758
762
759
763
760instance Katip m => Katip (ExceptT s m) where
764instance Katip m => Katip (ExceptT s m) where
katip/src/Katip/Monadic.hs+4
@@ -46,7 +46,9 @@ import Control.Monad.IO.Class
46import Control.Monad.Reader
46import Control.Monad.Reader
47import Control.Monad.State
47import Control.Monad.State
48import Control.Monad.Trans.Control
48import Control.Monad.Trans.Control
49+#if !MIN_VERSION_either(4, 5, 0)
49import Control.Monad.Trans.Either (EitherT, mapEitherT)
50import Control.Monad.Trans.Either (EitherT, mapEitherT)
51+#endif
50import Control.Monad.Trans.Except (ExceptT, mapExceptT)
52import Control.Monad.Trans.Except (ExceptT, mapExceptT)
51import Control.Monad.Trans.Identity (IdentityT, mapIdentityT)
53import Control.Monad.Trans.Identity (IdentityT, mapIdentityT)
52import Control.Monad.Trans.List (ListT, mapListT)
54import Control.Monad.Trans.List (ListT, mapListT)
@@ -152,11 +154,13 @@ instance (KatipContext m, Katip (MaybeT m)) => KatipContext (MaybeT m) where
152 localKatipNamespace = mapMaybeT . localKatipNamespace
154 localKatipNamespace = mapMaybeT . localKatipNamespace
153
155
154
156
157+#if !MIN_VERSION_either(4, 5, 0)
155instance (KatipContext m, Katip (EitherT e m)) => KatipContext (EitherT e m) where
158instance (KatipContext m, Katip (EitherT e m)) => KatipContext (EitherT e m) where
156 getKatipContext = lift getKatipContext
159 getKatipContext = lift getKatipContext
157 localKatipContext = mapEitherT . localKatipContext
160 localKatipContext = mapEitherT . localKatipContext
158 getKatipNamespace = lift getKatipNamespace
161 getKatipNamespace = lift getKatipNamespace
159 localKatipNamespace = mapEitherT . localKatipNamespace
162 localKatipNamespace = mapEitherT . localKatipNamespace
163+#endif
160
164
161
165
162instance (KatipContext m, Katip (ListT m)) => KatipContext (ListT m) where
166instance (KatipContext m, Katip (ListT m)) => KatipContext (ListT m) where