hs-ix 0.1.0.0 → 0.1.1.0
raw patch · 2 files changed
+4/−4 lines, 2 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Control.Monad.Indexed.Trans.Cont: mapContT :: (f i -> f i) -> ContT f i j a -> ContT f i j a
+ Control.Monad.Indexed.Trans.Cont: mapContT :: (f i -> f j) -> ContT f i k a -> ContT f j k a
Files
- Control/Monad/Indexed/Trans/Cont.hs +3/−3
- hs-ix.cabal +1/−1
Control/Monad/Indexed/Trans/Cont.hs view
@@ -11,19 +11,19 @@ deriving (Functor) lift :: Monad m => m a -> ContT m i i a-lift am = ContT (am >>=)+lift = ContT . (>>=) evalContT :: Applicative p => ContT p a a a -> p a evalContT = flip runContT pure -mapContT :: (f i -> f i) -> ContT f i j a -> ContT f i j a+mapContT :: (f i -> f j) -> ContT f i k a -> ContT f j k a mapContT φ (ContT f) = ContT (φ . f) withContT :: ((b -> f j) -> (a -> f k)) -> ContT f i k a -> ContT f i j b withContT φ (ContT f) = ContT (f . φ) callCC :: ((a -> ContT f j k b) -> ContT f i j a) -> ContT f i j a-callCC f = ContT $ \ k -> runContT (f $ \ x -> ContT $ \ _ -> k x) k+callCC f = ContT $ \ k -> runContT (f $ ContT . pure . k) k resetT :: Monad m => ContT m a i i -> ContT m j j a resetT (ContT f) = ContT (f pure >>=)
hs-ix.cabal view
@@ -1,5 +1,5 @@ name: hs-ix-version: 0.1.0.0+version: 0.1.1.0 synopsis: Indexed monads -- description: license: BSD3