kan-extensions 5 → 5.0.1
raw patch · 5 files changed
+18/−11 lines, 5 filesdep ~comonadPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: comonad
API changes (from Hackage documentation)
- Control.Monad.Co: askW :: (ComonadEnv e w, Monad m) => CoT w m e
+ Control.Monad.Co: askW :: ComonadEnv e w => CoT w m e
- Control.Monad.Co: asksW :: (ComonadEnv e w, Monad m) => (e -> a) -> CoT w m a
+ Control.Monad.Co: asksW :: ComonadEnv e w => (e -> a) -> CoT w m a
- Control.Monad.Co: dctrlM :: (Comonad w, Monad m) => (forall a. w a -> m (w a)) -> CoT (Density w) m ()
+ Control.Monad.Co: dctrlM :: Monad m => (forall a. w a -> m (w a)) -> CoT (Density w) m ()
- Control.Monad.Co: peekW :: (ComonadStore s w, Monad m) => s -> CoT w m ()
+ Control.Monad.Co: peekW :: ComonadStore s w => s -> CoT w m ()
- Control.Monad.Co: peeksW :: (ComonadStore s w, Monad m) => (s -> s) -> CoT w m ()
+ Control.Monad.Co: peeksW :: ComonadStore s w => (s -> s) -> CoT w m ()
- Control.Monad.Co: posW :: (ComonadStore s w, Monad m) => CoT w m s
+ Control.Monad.Co: posW :: ComonadStore s w => CoT w m s
- Control.Monad.Co: traceW :: (ComonadTraced e w, Monad m) => e -> CoT w m ()
+ Control.Monad.Co: traceW :: ComonadTraced e w => e -> CoT w m ()
- Data.Functor.Day.Curried: toCurried :: (Functor g, Functor k) => (forall x. Day g k x -> h x) -> k a -> Curried g h a
+ Data.Functor.Day.Curried: toCurried :: (forall x. Day g k x -> h x) -> k a -> Curried g h a
- Data.Functor.Day.Curried: unapplied :: Functor f => g a -> Curried f (Day f g) a
+ Data.Functor.Day.Curried: unapplied :: g a -> Curried f (Day f g) a
Files
- .travis.yml +3/−0
- CHANGELOG.markdown +4/−0
- kan-extensions.cabal +2/−2
- src/Control/Monad/Co.hs +7/−7
- src/Data/Functor/Day/Curried.hs +2/−2
.travis.yml view
@@ -28,6 +28,9 @@ - env: CABALVER=1.22 GHCVER=7.10.2 compiler: ": #GHC 7.10.2" addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.2,alex-3.1.4,happy-1.19.5], sources: [hvr-ghc]}}+ - env: CABALVER=1.24 GHCVER=8.0.1+ compiler: ": #GHC 8.0.1"+ addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.1,alex-3.1.4,happy-1.19.5], sources: [hvr-ghc]}} before_install: - unset CC
CHANGELOG.markdown view
@@ -1,3 +1,7 @@+5.0.1+-----+* Removed some redundant constraints+ 5 ----- * Move `Data.Functor.Kan.Rift` to `Data.Functor.Day.Curried`
kan-extensions.cabal view
@@ -1,6 +1,6 @@ name: kan-extensions category: Data Structures, Monads, Comonads, Functors-version: 5+version: 5.0.1 license: BSD3 cabal-version: >= 1.6 license-file: LICENSE@@ -43,7 +43,7 @@ adjunctions >= 4.2 && < 5, array >= 0.3.0.2 && < 0.6, base >= 4.4 && < 5,- comonad >= 4 && < 5,+ comonad >= 4 && < 6, containers >= 0.4 && < 0.6, contravariant >= 1 && < 2, distributive >= 0.2.2 && < 1,
src/Control/Monad/Co.hs view
@@ -128,22 +128,22 @@ lowerCo1 :: Functor w => Co w () -> w a -> a lowerCo1 m = runIdentity . runCoT m . fmap (const . return) -posW :: (ComonadStore s w, Monad m) => CoT w m s+posW :: ComonadStore s w => CoT w m s posW = liftCoT0 pos -peekW :: (ComonadStore s w, Monad m) => s -> CoT w m ()+peekW :: ComonadStore s w => s -> CoT w m () peekW s = liftCoT1 (peek s) -peeksW :: (ComonadStore s w, Monad m) => (s -> s) -> CoT w m ()+peeksW :: ComonadStore s w => (s -> s) -> CoT w m () peeksW f = liftCoT1 (peeks f) -askW :: (ComonadEnv e w, Monad m) => CoT w m e+askW :: ComonadEnv e w => CoT w m e askW = liftCoT0 (Env.ask) -asksW :: (ComonadEnv e w, Monad m) => (e -> a) -> CoT w m a+asksW :: ComonadEnv e w => (e -> a) -> CoT w m a asksW f = liftCoT0 (Env.asks f) -traceW :: (ComonadTraced e w, Monad m) => e -> CoT w m ()+traceW :: ComonadTraced e w => e -> CoT w m () traceW e = liftCoT1 (Traced.trace e) liftCoT0M :: (Comonad w, Monad m) => (forall a. w a -> m s) -> CoT w m s@@ -155,7 +155,7 @@ diter :: Functor f => a -> (a -> f a) -> Density (Cofree f) a diter x y = liftDensity . coiter y $ x -dctrlM :: (Comonad w, Monad m) => (forall a. w a -> m (w a)) -> CoT (Density w) m ()+dctrlM :: Monad m => (forall a. w a -> m (w a)) -> CoT (Density w) m () dctrlM k = liftCoT1M (\(Density w a) -> liftM w (k a)) instance (Comonad w, MonadReader e m) => MonadReader e (CoT w m) where
src/Data/Functor/Day/Curried.hs view
@@ -86,12 +86,12 @@ {-# INLINE applied #-} -- | This is the unit of the @Day f -| Curried f@ adjunction-unapplied :: Functor f => g a -> Curried f (Day f g) a+unapplied :: g a -> Curried f (Day f g) a unapplied ga = Curried $ \ fab -> Day fab ga id {-# INLINE unapplied #-} -- | The universal property of 'Curried'-toCurried :: (Functor g, Functor k) => (forall x. Day g k x -> h x) -> k a -> Curried g h a+toCurried :: (forall x. Day g k x -> h x) -> k a -> Curried g h a toCurried h ka = Curried $ \gar -> h (Day gar ka id) {-# INLINE toCurried #-}