comonad 4.2.4 → 4.2.5
raw patch · 3 files changed
+15/−5 lines, 3 filesdep ~basePVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: base
API changes (from Hackage documentation)
- Control.Comonad: class Comonad w => ComonadApply w where a @> b = const id <$> a <@> b a <@ b = const <$> a <@> b
+ Control.Comonad: class Comonad w => ComonadApply w where (<@>) = (<*>) a @> b = const id <$> a <@> b a <@ b = const <$> a <@> b
Files
- CHANGELOG.markdown +4/−0
- comonad.cabal +1/−1
- src/Control/Comonad.hs +10/−4
CHANGELOG.markdown view
@@ -1,3 +1,7 @@+4.2.5+-------+* Added a `MINIMAL` pragma to `Comonad`.+ 4.2.4 ----- * Added Kenneth Foner's fixed point as `kfix`.
comonad.cabal view
@@ -1,6 +1,6 @@ name: comonad category: Control, Comonads-version: 4.2.4+version: 4.2.5 license: BSD3 cabal-version: >= 1.10 license-file: LICENSE
src/Control/Comonad.hs view
@@ -1,10 +1,8 @@ {-# LANGUAGE CPP #-}-#ifdef __GLASGOW_HASKELL__ #if __GLASGOW_HASKELL__ >= 707-{-# LANGUAGE DeriveDataTypeable, StandaloneDeriving, Safe #-}+{-# LANGUAGE DeriveDataTypeable, StandaloneDeriving, Safe, DefaultSignatures #-} #elif __GLASGOW_HASKELL__ >= 702-{-# LANGUAGE Trustworthy #-}-#endif+{-# LANGUAGE Trustworthy, DefaultSignatures #-} #endif ----------------------------------------------------------------------------- -- |@@ -143,7 +141,11 @@ extend :: (w a -> b) -> w a -> w b extend f = fmap f . duplicate +#if __GLASGOW_HASKELL__ >= 708+ {-# MINIMAL extract, (duplicate | extend) #-}+#endif + instance Comonad ((,)e) where duplicate p = (fst p, p) {-# INLINE duplicate #-}@@ -228,6 +230,10 @@ class Comonad w => ComonadApply w where (<@>) :: w (a -> b) -> w a -> w b+#if __GLASGOW_HASKELL__ >= 702+ default (<@>) :: Applicative w => w (a -> b) -> w a -> w b+ (<@>) = (<*>)+#endif (@>) :: w a -> w b -> w b a @> b = const id <$> a <@> b