packages feed

comonad-transformers 1.5.0.1 → 1.5.0.2

raw patch · 4 files changed

+36/−1 lines, 4 filesdep +MemoTriePVP: minor bump suggested

API additions: PVP suggests at least a minor version bump

Dependencies added: MemoTrie

API changes (from Hackage documentation)

+ Control.Comonad.Trans.Store.Lazy: instance (Applicative w, Semigroup s, Monoid s) => Applicative (StoreT s w)
+ Control.Comonad.Trans.Store.Lazy: instance (Apply w, Semigroup s) => Apply (StoreT s w)
+ Control.Comonad.Trans.Store.Memo: instance (Applicative w, Semigroup s, Monoid s) => Applicative (StoreT s w)
+ Control.Comonad.Trans.Store.Memo: instance (Apply w, Semigroup s) => Apply (StoreT s w)
+ Control.Comonad.Trans.Store.Strict: instance (Applicative w, Semigroup s, Monoid s) => Applicative (StoreT s w)
+ Control.Comonad.Trans.Store.Strict: instance (Apply w, Semigroup s) => Apply (StoreT s w)

Files

Control/Comonad/Trans/Store/Lazy.hs view
@@ -30,10 +30,14 @@   , peek, peeks   ) where +import Control.Applicative import Control.Comonad import Control.Comonad.Hoist.Class import Control.Comonad.Trans.Class import Data.Functor.Identity+import Data.Functor.Apply+import Data.Monoid+import Data.Semigroup  #ifdef __GLASGOW_HASKELL__ import Data.Typeable@@ -68,6 +72,13 @@  instance Functor w => Functor (StoreT s w) where   fmap f ~(StoreT wf s) = StoreT (fmap (f .) wf) s++instance (Apply w, Semigroup s) => Apply (StoreT s w) where+  ~(StoreT ff m) <.> ~(StoreT fa n) = StoreT ((<*>) <$> ff <.> fa) (m <> n)++instance (Applicative w, Semigroup s, Monoid s) => Applicative (StoreT s w) where+  pure a = StoreT (pure (const a)) mempty+  ~(StoreT ff m) <*> ~(StoreT fa n) = StoreT ((<*>) <$> ff <*> fa) (m `mappend` n)  instance Extend w => Extend (StoreT s w) where   duplicate ~(StoreT wf s) = StoreT (extend StoreT wf) s
Control/Comonad/Trans/Store/Memo.hs view
@@ -32,10 +32,14 @@   , peek, peeks   ) where +import Control.Applicative import Control.Comonad import Control.Comonad.Hoist.Class import Control.Comonad.Trans.Class import Data.Functor.Identity+import Data.Functor.Apply+import Data.Monoid+import Data.Semigroup  #ifdef __GLASGOW_HASKELL__ import Data.Typeable@@ -76,6 +80,13 @@  instance Functor w => Functor (StoreT s w) where   fmap f (StoreT wf s w) = StoreT (fmap (f .) wf) s (fmap f w)++instance (Apply w, Semigroup s) => Apply (StoreT s w) where+  StoreT ff m _ <.> StoreT fa n _ = storeT ((<*>) <$> ff <.> fa) (m <> n)++instance (Applicative w, Semigroup s, Monoid s) => Applicative (StoreT s w) where+  pure a = storeT (pure (const a)) mempty+  StoreT ff m _ <*> StoreT fa n _ = storeT ((<*>) <$> ff <*> fa) (m `mappend` n)  instance Extend w => Extend (StoreT s w) where   duplicate (StoreT wf s _) = storeT (extend storeT wf) s 
Control/Comonad/Trans/Store/Strict.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- | -- Module      :  Control.Comonad.Trans.Store.Strict@@ -29,10 +30,14 @@   , peek, peeks   ) where +import Control.Applicative import Control.Comonad import Control.Comonad.Hoist.Class import Control.Comonad.Trans.Class import Data.Functor.Identity+import Data.Functor.Apply+import Data.Semigroup+import Data.Monoid  #ifdef __GLASGOW_HASKELL__ import Data.Typeable@@ -67,6 +72,13 @@  instance Functor w => Functor (StoreT s w) where   fmap f (StoreT wf s) = StoreT (fmap (f .) wf) s++instance (Apply w, Semigroup s) => Apply (StoreT s w) where+  StoreT ff m <.> StoreT fa n = StoreT ((<*>) <$> ff <.> fa) (m <> n)++instance (Applicative w, Semigroup s, Monoid s) => Applicative (StoreT s w) where+  pure a = StoreT (pure (const a)) mempty+  StoreT ff m <*> StoreT fa n = StoreT ((<*>) <$> ff <*> fa) (m `mappend` n)  instance Extend w => Extend (StoreT s w) where   duplicate (StoreT wf s) = StoreT (extend StoreT wf) s
comonad-transformers.cabal view
@@ -1,6 +1,6 @@ name:          comonad-transformers category:      Control, Comonads-version:       1.5.0.1+version:       1.5.0.2 license:       BSD3 cabal-version: >= 1.6 license-file:  LICENSE@@ -25,6 +25,7 @@ library   build-depends:      base >= 4 && < 4.4,+    MemoTrie >= 0.4.9 && < 0.5,     comonad >= 1.0.1 && < 1.1,     distributive >= 0.1 && < 0.2,     semigroupoids >= 1.0 && < 1.2,