packages feed

comonad-transformers 0.10.1.1 → 1.0.0

raw patch · 5 files changed

+28/−99 lines, 5 filesdep +semigroupoidsdep −functor-applydep −prelude-extrasdep −syb-extrasdep ~comonadPVP ok

version bump matches the API change (PVP)

Dependencies added: semigroupoids

Dependencies removed: functor-apply, prelude-extras, syb-extras

Dependency ranges changed: comonad

API changes (from Hackage documentation)

- Control.Comonad.Trans.Stream: instance (Show1 f, Show1 w) => Show1 (Node f w)
- Control.Comonad.Trans.Stream: instance (Show1 f, Show1 w) => Show1 (StreamT f w)
- Control.Comonad.Trans.Stream: instance (Show1 f, Show1 w, Show a) => Show (Node f w a)
- Control.Comonad.Trans.Stream: instance (Show1 f, Show1 w, Show a) => Show (StreamT f w a)
- Control.Comonad.Trans.Traced: instance (Apply w, Semigroup m, Monoid m) => Apply (TracedT m w)
+ Control.Comonad.Trans.Stream: instance (Show (w (Node f w a)), Show (Node f w a), Show a, Show (f (StreamT f w a))) => Show (StreamT f w a)
+ Control.Comonad.Trans.Stream: instance (Show a, Show (StreamT f w a), Show (f (StreamT f w a)), Show (w (Node f w a))) => Show (Node f w a)
+ Control.Comonad.Trans.Traced: instance Applicative w => Applicative (TracedT m w)
+ Control.Comonad.Trans.Traced: instance Apply w => Apply (TracedT m w)

Files

Control/Comonad/Trans/Env/Lazy.hs view
@@ -40,7 +40,7 @@ import Data.Semigroup  #ifdef __GLASGOW_HASKELL__-import Data.Data.Extras+import Data.Data  instance (Typeable s, Typeable1 w) => Typeable1 (EnvT s w) where   typeOf1 dswa = mkTyConApp envTTyCon [typeOf (s dswa), typeOf1 (w dswa)]@@ -56,24 +56,6 @@  instance (Typeable s, Typeable1 w, Typeable a) => Typeable (EnvT s w a) where   typeOf = typeOfDefault--{--instance (Data e, Data1 w) => Data1 (EnvT e w) where-    gfoldl1 f z (EnvT e wa) = liftK f wa (z EnvT `f` e)-    toConstr1 _ = envTConstr-    gunfold1 k z c = case constrIndex c of-        1 -> liftF k (k (z EnvT))-        _ -> error "gunfold"-    dataTypeOf1 _ = envTDataType-    dataCast1_1 f = gcast1 f--instance (Data e, Data1 w, Data a) => Data (EnvT e w a) where-    gfoldl = gfoldl1-    toConstr = toConstr1-    gunfold = gunfold1-    dataTypeOf = dataTypeOf1-    dataCast1 = dataCast1_1--}  instance   ( Data e
Control/Comonad/Trans/Env/Strict.hs view
@@ -39,7 +39,7 @@ import Data.Semigroup  #ifdef __GLASGOW_HASKELL__-import Data.Data.Extras+import Data.Data  instance (Typeable s, Typeable1 w) => Typeable1 (EnvT s w) where   typeOf1 dswa = mkTyConApp envTTyCon [typeOf (s dswa), typeOf1 (w dswa)]@@ -55,24 +55,6 @@  instance (Typeable s, Typeable1 w, Typeable a) => Typeable (EnvT s w a) where   typeOf = typeOfDefault--{--instance (Data e, Data1 w) => Data1 (EnvT e w) where-    gfoldl1 f z (EnvT e wa) = liftK f wa (z EnvT `f` e)-    toConstr1 _ = envTConstr-    gunfold1 k z c = case constrIndex c of-        1 -> liftF k (k (z EnvT))-        _ -> error "gunfold"-    dataTypeOf1 _ = envTDataType-    dataCast1_1 f = gcast1 f--instance (Data e, Data1 w, Data a) => Data (EnvT e w a) where-    gfoldl = gfoldl1-    toConstr = toConstr1-    gunfold = gunfold1-    dataTypeOf = dataTypeOf1-    dataCast1 = dataCast1_1--}  instance   ( Data e
Control/Comonad/Trans/Stream.hs view
@@ -40,10 +40,8 @@ import Data.Traversable import Data.Monoid -import Text.Show.Extras- #ifdef __GLASGOW_HASKELL__-import Data.Data.Extras hiding (liftF2)+import Data.Data #endif  -- | Isomorphic to the definition:@@ -65,14 +63,7 @@  data Node f w a = a :< f (StreamT f w a) -instance (Show1 f, Show1 w) => Show1 (Node f w) where-  showsPrec1 d (a :< as) = showParen (d > 5) $-    showsPrec 6 a . showString " :< " . showsPrec1 5 as -instance (Show1 f, Show1 w, Show a) => Show (Node f w a) where-  showsPrec = showsPrec1-- infixr 5 :<  fstN :: Node f w a -> a@@ -90,12 +81,13 @@ -- value by using 'lower' or runStream data StreamT f w a = StreamT { runStreamT :: w (Node f w a) } -instance (Show1 f, Show1 w) => Show1 (StreamT f w) where-  showsPrec1 d (StreamT wa) = showParen (d > 10) $ -    showsPrec1 11 wa+instance (Show a, Show (StreamT f w a), Show (f (StreamT f w a)), Show (w (Node f w a))) => Show (Node f w a) where+  showsPrec d (a :< as) = showParen (d > 5) $+    showsPrec 6 a . showString " :< " . showsPrec 5 as -instance (Show1 f, Show1 w, Show a) => Show (StreamT f w a) where-  showsPrec = showsPrec1+instance (Show (w (Node f w a)), Show (Node f w a), Show a, Show (f (StreamT f w a))) => Show (StreamT f w a) where+  showsPrec d (StreamT wa) = showParen (d > 10) $ +    showsPrec 11 wa  instance (Functor w, Functor f) => Functor (StreamT f w) where   fmap f = StreamT . fmap (fmap f) . runStreamT@@ -171,17 +163,6 @@ streamTTyCon = mkTyCon "Control.Comonad.Trans.Stream.StreamT" {-# NOINLINE streamTTyCon #-} -{--instance (Data1 f, Data1 w) => Data1 (Node f w) where-  gfoldl1 k z (a :< as) = liftK k (z (:<) `k` a) as-  toConstr1 _ = nodeConstr-  gunfold1 f z c = case constrIndex c of-    1 -> liftF f (f (z (:<)))-    _ -> error "gunfold"-  dataTypeOf1 _ = nodeDataType-  dataCast1_1 f = gcast1 f--}- instance (Typeable1 f, Typeable1 w, Data a, Data (f (StreamT f w a)), Data (StreamT f w a)) => Data (Node f w a) where   gfoldl k z (a :< as) = z (:<) `k` a `k` as   toConstr _ = nodeConstr@@ -191,32 +172,6 @@   dataTypeOf _ = nodeDataType   dataCast1 f = gcast1 f -{--instance (Data1 f, Data1 w, Data a) => Data (Node f w a) where-  gfoldl = gfoldl1-  toConstr = toConstr1-  gunfold = gunfold1-  dataTypeOf = dataTypeOf1-  dataCast1 = dataCast1_1--instance (Data1 f, Data1 w) => Data1 (StreamT f w) where-  gfoldl1 k z (StreamT a) = liftK k (z StreamT) (undefined a)-  toConstr1 _ = streamTConstr-  gunfold1 k z c = case constrIndex c of-    1 -> liftF k (z StreamT)-    _ -> error "gunfold"-  dataTypeOf1 _ = streamTDataType-  dataCast1_1 f = gcast1 f--}--{--instance (Data1 f, Data1 w, Data a) => Data (StreamT f w a) where-  gfoldl = gfoldl1-  toConstr = toConstr1-  gunfold = gunfold1-  dataTypeOf = dataTypeOf1-  dataCast1 = dataCast1_1--} -- if any structure ever cried out for generic programming, this is it instance    ( Typeable1 f
Control/Comonad/Trans/Traced.hs view
@@ -26,6 +26,9 @@   , censor   ) where +import Control.Applicative+import Control.Monad.Instances+import Control.Monad (ap) import Control.Comonad import Control.Comonad.Hoist.Class import Control.Comonad.Trans.Class@@ -50,6 +53,13 @@ instance Functor w => Functor (TracedT m w) where   fmap g = TracedT . fmap (g .) . runTracedT +instance Apply w => Apply (TracedT m w) where+  TracedT wf <.> TracedT wa = TracedT (ap <$> wf <.> wa)++instance Applicative w => Applicative (TracedT m w) where+  pure = TracedT . pure . const +  TracedT wf <*> TracedT wa = TracedT (ap <$> wf <*> wa)+ instance (Extend w, Semigroup m) => Extend (TracedT m w) where   extend f = TracedT . extend (\wf m -> f (TracedT (fmap (. (<>) m) wf))) . runTracedT @@ -61,9 +71,6 @@  instance (Semigroup m, Monoid m) => ComonadHoist (TracedT m) where   cohoist = traced . extract . runTracedT--instance (Apply w, Semigroup m, Monoid m) => Apply (TracedT m w) where-  TracedT wf <.> TracedT wa = TracedT ((\mf ma m -> (mf m) (ma m)) <$> wf <.> wa)  trace :: (Comonad w, Monoid m) => m -> TracedT m w a -> a trace m (TracedT wf) = extract wf m
comonad-transformers.cabal view
@@ -1,6 +1,6 @@ name:          comonad-transformers category:      Control, Comonads-version:       0.10.1.1+version:       1.0.0 license:       BSD3 cabal-version: >= 1.6 license-file:  LICENSE@@ -18,20 +18,23 @@   type: git   location: git://github.com/ekmett/comonad-transformers.git +flag DeriveDataTypeable+  manual: False+  default: True+ library   build-depends:      base >= 4 && < 4.4,     array >= 0.3.0.1 && < 0.4,-    comonad >= 0.9 && < 0.10,+    comonad >= 1.0 && < 1.1,     distributive >= 0.1 && < 0.2,-    functor-apply >= 0.10.0.2 && < 0.11,+    semigroupoids >= 1.0 && < 1.1,     semigroups >= 0.3.4 && < 0.4,-    prelude-extras >= 0.1 && < 0.3,     transformers >= 0.2.0 && <= 0.3 -  if impl(ghc)-    build-depends: syb-extras >= 0.1 && <= 0.3+  if flag(DeriveDataTypeable)     extensions: DeriveDataTypeable+    cpp-options: -DLANGUAGE_DeriveDataTypeable    extensions: CPP