adjunctions 4.0 → 4.0.1
raw patch · 4 files changed
+13/−9 lines, 4 filesdep ~contravariant
Dependency ranges changed: contravariant
Files
- CHANGELOG.markdown +4/−0
- adjunctions.cabal +2/−2
- src/Control/Comonad/Trans/Adjoint.hs +3/−3
- src/Control/Monad/Trans/Conts.hs +4/−4
CHANGELOG.markdown view
@@ -1,3 +1,7 @@+4.0.1+-----+* Increased lower bound on `contravariant` to match the actual requirement.+ 4.0 --- * Merged the contents of `representable-functors`.
adjunctions.cabal view
@@ -1,6 +1,6 @@ name: adjunctions category: Data Structures, Adjunctions-version: 4.0+version: 4.0.1 license: BSD3 cabal-version: >= 1.6 license-file: LICENSE@@ -44,7 +44,7 @@ base >= 4 && < 5, comonad >= 4 && < 5, containers >= 0.3 && < 0.6,- contravariant >= 0.2.0.1 && < 1,+ contravariant >= 0.4.1 && < 1, distributive >= 0.4 && < 1, free >= 4 && < 5, mtl >= 2.0.1 && < 2.2,
src/Control/Comonad/Trans/Adjoint.hs view
@@ -50,12 +50,12 @@ instance (Adjunction f g, Comonad w) => Comonad (AdjointT f g w) where extend f (AdjointT m) = AdjointT $ fmap (extend $ leftAdjunct (f . AdjointT)) m extract = rightAdjunct extract . runAdjointT- + {- instance (Adjunction f g, Monad m) => Applicative (AdjointT f g m) where pure = AdjointT . leftAdjunct return (<*>) = ap -}- + instance (Adjunction f g, Distributive g) => ComonadTrans (AdjointT f g) where- lower = counit . fmap distribute . runAdjointT + lower = counit . fmap distribute . runAdjointT
src/Control/Monad/Trans/Conts.hs view
@@ -18,7 +18,7 @@ ---------------------------------------------------------------------------- module Control.Monad.Trans.Conts- ( + ( -- * Continuation passing style Cont , cont@@ -63,7 +63,7 @@ instance Comonad w => Apply (ContsT r w m) where (<.>) = ap- + instance Comonad w => Applicative (ContsT r w m) where pure x = ContsT $ \f -> extract f x (<*>) = ap@@ -77,8 +77,8 @@ {- callCCs :: Comonad w => (w (a -> ContsT r w m b) -> ContsT r w m a) -> ContsT r w m a-callCCs f = +callCCs f = -} instance Comonad w => MonadTrans (ContsT r w) where- lift m = ContsT $ extract . fmap (m >>=) + lift m = ContsT $ extract . fmap (m >>=)