packages feed

monad-control-identity 0.1.0.1 → 0.1.0.2

raw patch · 3 files changed

+13/−3 lines, 3 files

Files

CHANGELOG.md view
@@ -1,5 +1,9 @@ # Revision history for monad-control-identity +## 0.1.0.2 -- 2020-07-17++* Improve documentation.+ ## 0.1.0.1 -- 2020-07-17  * Accept older versions of dependencies.
monad-control-identity.cabal view
@@ -1,7 +1,12 @@ name:                monad-control-identity-version:             0.1.0.1+version:             0.1.0.2 synopsis:            Stronger classes than monad-control--- description:+description:         This package defines the type class MonadBaseControlIdentity, which is very+                     similar to MonadBaseControl from monad-control.+                     The difference is, that MonadBaseControlIdentity instances are only valid,+                     when there is no monadic state.+                     This results in simpler type signatures to lift values in contravariant+                     positions. license:             BSD3 license-file:        LICENSE author:              Felix Springer
src/Control/Monad/Trans/Control/Functor.hs view
@@ -10,7 +10,7 @@ import Control.Monad.Trans.Reader  {- | This type class is generalization of functions like 'mapReaderT'-   and 'mapIdentityT'.+  and 'mapIdentityT'. -} class MonadTransControlIdentity t => MonadTransFunctor t where   liftMap :: (m a -> n b) -> t m a -> t n b@@ -21,6 +21,7 @@ instance MonadTransFunctor (ReaderT r) where   liftMap f m = ReaderT $ f . runReaderT m +-- | Lift the inner monad of a monad transformer from the base monad. hoistTrans :: (MonadBaseControl b m, MonadBaseControl b (t m), MonadTransFunctor t)            => t b a            -> t m a