monad-control 1.0.3 → 1.0.3.1
raw patch · 3 files changed
+25/−13 lines, 3 filesdep ~transformersPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: transformers
API changes (from Hackage documentation)
Files
- CHANGELOG +4/−0
- monad-control.cabal +2/−2
- src/Control/Monad/Trans/Control.hs +19/−11
CHANGELOG view
@@ -1,3 +1,7 @@+1.0.3.1.++* Support transformers-0.6+ 1.0.3 * Add `controlT`
monad-control.cabal view
@@ -1,5 +1,5 @@ name: monad-control-version: 1.0.3+version: 1.0.3.1 synopsis: Lift control operations, like exception catching, through monad transformers @@ -65,6 +65,6 @@ build-depends: base >=4.5 && <5 , stm >=2.3 && <3- , transformers >=0.2 && <0.6+ , transformers >=0.2 && <0.7 , transformers-base >=0.4.4 && <0.5 , transformers-compat >=0.3 && <0.8
src/Control/Monad/Trans/Control.hs view
@@ -115,15 +115,18 @@ import Control.Monad.Trans.Class ( MonadTrans ) import Control.Monad.Trans.Identity ( IdentityT(IdentityT), runIdentityT )-import Control.Monad.Trans.List ( ListT (ListT), runListT ) import Control.Monad.Trans.Maybe ( MaybeT (MaybeT), runMaybeT )-import Control.Monad.Trans.Error ( ErrorT (ErrorT), runErrorT, Error ) import Control.Monad.Trans.Reader ( ReaderT (ReaderT), runReaderT ) import Control.Monad.Trans.State ( StateT (StateT), runStateT ) import Control.Monad.Trans.Writer ( WriterT (WriterT), runWriterT ) import Control.Monad.Trans.RWS ( RWST (RWST), runRWST ) import Control.Monad.Trans.Except ( ExceptT (ExceptT), runExceptT ) +#if !(MIN_VERSION_transformers(0,6,0))+import Control.Monad.Trans.List ( ListT (ListT), runListT )+import Control.Monad.Trans.Error ( ErrorT (ErrorT), runErrorT, Error )+#endif+ import qualified Control.Monad.Trans.RWS.Strict as Strict ( RWST (RWST), runRWST ) import qualified Control.Monad.Trans.State.Strict as Strict ( StateT (StateT), runStateT ) import qualified Control.Monad.Trans.Writer.Strict as Strict ( WriterT(WriterT), runWriterT )@@ -415,12 +418,21 @@ {-# INLINABLE liftWith #-} {-# INLINABLE restoreT #-} +#if !(MIN_VERSION_transformers(0,6,0))+instance MonadTransControl ListT where+ type StT ListT a = [a]+ liftWith f = ListT $ liftM return $ f $ runListT+ restoreT = ListT+ {-# INLINABLE liftWith #-}+ {-# INLINABLE restoreT #-}+ instance Error e => MonadTransControl (ErrorT e) where type StT (ErrorT e) a = Either e a liftWith f = ErrorT $ liftM return $ f $ runErrorT restoreT = ErrorT {-# INLINABLE liftWith #-} {-# INLINABLE restoreT #-}+#endif instance MonadTransControl (ExceptT e) where type StT (ExceptT e) a = Either e a@@ -429,13 +441,6 @@ {-# INLINABLE liftWith #-} {-# INLINABLE restoreT #-} -instance MonadTransControl ListT where- type StT ListT a = [a]- liftWith f = ListT $ liftM return $ f $ runListT- restoreT = ListT- {-# INLINABLE liftWith #-}- {-# INLINABLE restoreT #-}- instance MonadTransControl (ReaderT r) where type StT (ReaderT r) a = a liftWith f = ReaderT $ \r -> f $ \t -> runReaderT t r@@ -711,17 +716,20 @@ TRANS(IdentityT) TRANS(MaybeT)-TRANS(ListT) TRANS(ReaderT r) TRANS(Strict.StateT s) TRANS( StateT s) TRANS(ExceptT e) -TRANS_CTX(Error e, ErrorT e) TRANS_CTX(Monoid w, Strict.WriterT w) TRANS_CTX(Monoid w, WriterT w) TRANS_CTX(Monoid w, Strict.RWST r w s) TRANS_CTX(Monoid w, RWST r w s)++#if !(MIN_VERSION_transformers(0,6,0))+TRANS(ListT)+TRANS_CTX(Error e, ErrorT e)+#endif #undef BODY #undef TRANS