monad-control-identity 0.1.1.1 → 0.2.0.0
raw patch · 3 files changed
+11/−12 lines, 3 files
Files
- CHANGELOG.md +5/−0
- monad-control-identity.cabal +1/−1
- src/Control/Monad/Trans/Control/Identity.hs +5/−11
CHANGELOG.md view
@@ -1,5 +1,10 @@ # Revision history for monad-control-identity +## 0.2.0.0 -- 2022-03-31++* Remove `defaultLiftWithIdentity`.+* Support GHC 9.0.2.+ ## 0.1.1.1 -- 2022-03-31 * Add base version boundary.
monad-control-identity.cabal view
@@ -1,5 +1,5 @@ name: monad-control-identity-version: 0.1.1.1+version: 0.2.0.0 synopsis: Stronger classes than monad-control description: This package defines the type class 'MonadBaseControlIdentity', which is very similar to 'MonadBaseControl' from
src/Control/Monad/Trans/Control/Identity.hs view
@@ -15,17 +15,16 @@ ... instance 'MonadTransControlIdentity' ExampleT where- 'liftWithIdentity' = 'defaultLiftWithIdentity'+ 'liftWithIdentity' f = 'liftWith' $ \ runT -> f runT @ -}-, defaultLiftWithIdentity -- * MonadBaseControlIdentity -- | Regarding the 'IO' base monad this can be seen as an alternative, -- but equivalent, way to implement 'MonadUnliftIO'. , MonadBaseControlIdentity (..)-{- | Just like 'MonadTransControlIdentity', 'MonadBaseControlIdentity'- instances can easily be created for monad transformers:+{- | 'MonadBaseControlIdentity' instances can be created just as+ easily for monad transformers: @ instance 'MonadBaseControlIdentity' b m => 'MonadBaseControlIdentity' b (ExampleT m) where@@ -63,16 +62,11 @@ class MonadTransControl t => MonadTransControlIdentity t where liftWithIdentity :: Monad m => ((forall x. t m x -> m x) -> m a) -> t m a -defaultLiftWithIdentity :: (Monad m, MonadTransControl t)- => ((forall x. StT t x ~ x => t m x -> m x) -> m a)- -> t m a-defaultLiftWithIdentity = liftWith- instance MonadTransControlIdentity IdentityT where- liftWithIdentity = defaultLiftWithIdentity+ liftWithIdentity f = liftWith $ \ runT -> f runT instance MonadTransControlIdentity (ReaderT r) where- liftWithIdentity = defaultLiftWithIdentity+ liftWithIdentity f = liftWith $ \ runT -> f runT {- | The 'MonadBaseControlIdentity' type class is a stronger version of 'MonadBaseControl'.