Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions io-classes/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

### Breaking changes

- Removed the deprecated `withLiftST` (deprecated since `io-classes-1.5.0.0`).

### Non-breaking changes

## 1.10.1.0
Expand Down
9 changes: 0 additions & 9 deletions io-classes/io-classes/Control/Monad/Class/MonadST.hs
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,12 @@ class PrimMonad m => MonadST m where
-- | @since 1.4.1.0
stToIO :: ST (PrimState m) a -> m a

-- | Deprecated. Use 'stToIO' instead.
withLiftST :: (forall s. (forall a. ST s a -> m a) -> b) -> b
withLiftST = \k -> k stToIO

{-# DEPRECATED withLiftST "Use the simpler 'stToIO' instead." #-}

instance MonadST IO where
stToIO = stToPrim

instance MonadST (ST s) where
stToIO = stToPrim
withLiftST = \f -> f id

instance (MonadST m, PrimMonad m) => MonadST (ReaderT r m) where
stToIO :: ST (PrimState m) a -> ReaderT r m a
stToIO f = lift (stToPrim f)

withLiftST f = withLiftST $ \g -> f (lift . g)
8 changes: 0 additions & 8 deletions io-classes/mtl/Control/Monad/Class/MonadST/Trans.hs
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,24 @@ import Control.Monad.Class.MonadST

instance MonadST m => MonadST (ContT r m) where
stToIO = lift . stToIO
withLiftST f = withLiftST $ \g -> f (lift . g)

instance MonadST m => MonadST (ExceptT e m) where
stToIO = lift . stToIO
withLiftST f = withLiftST $ \g -> f (lift . g)

instance (Monoid w, MonadST m) => MonadST (Lazy.RWST r w s m) where
stToIO = lift . stToIO
withLiftST f = withLiftST $ \g -> f (lift . g)

instance (Monoid w, MonadST m) => MonadST (Strict.RWST r w s m) where
stToIO = lift . stToIO
withLiftST f = withLiftST $ \g -> f (lift . g)

instance MonadST m => MonadST (Lazy.StateT s m) where
stToIO = lift . stToIO
withLiftST f = withLiftST $ \g -> f (lift . g)

instance MonadST m => MonadST (Strict.StateT s m) where
stToIO = lift . stToIO
withLiftST f = withLiftST $ \g -> f (lift . g)

instance (Monoid w, MonadST m) => MonadST (Lazy.WriterT w m) where
stToIO = lift . stToIO
withLiftST f = withLiftST $ \g -> f (lift . g)

instance (Monoid w, MonadST m) => MonadST (Strict.WriterT w m) where
stToIO = lift . stToIO
withLiftST f = withLiftST $ \g -> f (lift . g)
Loading