packages feed

comonad-transformers 1.3.0.1 → 1.4.0

raw patch · 4 files changed

+14/−14 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- Control.Comonad.Trans.Store.Lazy: modify :: Comonad w => (s -> s) -> StoreT s w a -> a
+ Control.Comonad.Trans.Store.Lazy: modify :: Comonad w => (s -> s) -> StoreT s w a -> StoreT s w a
- Control.Comonad.Trans.Store.Lazy: put :: Comonad w => s -> StoreT s w a -> a
+ Control.Comonad.Trans.Store.Lazy: put :: Comonad w => s -> StoreT s w a -> StoreT s w a
- Control.Comonad.Trans.Store.Memo: modify :: Comonad w => (s -> s) -> StoreT s w a -> a
+ Control.Comonad.Trans.Store.Memo: modify :: Comonad w => (s -> s) -> StoreT s w a -> StoreT s w a
- Control.Comonad.Trans.Store.Memo: put :: Comonad w => s -> StoreT s w a -> a
+ Control.Comonad.Trans.Store.Memo: put :: Comonad w => s -> StoreT s w a -> StoreT s w a
- Control.Comonad.Trans.Store.Strict: modify :: Comonad w => (s -> s) -> StoreT s w a -> a
+ Control.Comonad.Trans.Store.Strict: modify :: Comonad w => (s -> s) -> StoreT s w a -> StoreT s w a
- Control.Comonad.Trans.Store.Strict: put :: Comonad w => s -> StoreT s w a -> a
+ Control.Comonad.Trans.Store.Strict: put :: Comonad w => s -> StoreT s w a -> StoreT s w a

Files

Control/Comonad/Trans/Store/Lazy.hs view
@@ -11,7 +11,7 @@ -- The lazy store (state-in-context/costate) comonad transformer is subject to the laws: --  -- > x = put (get x) x--- > y = get (put y x)+-- > y = get (put y) x) -- > put y x = put y (put z x) -- -- Thanks go to Russell O'Connor and Daniel Peebles for their help formulating @@ -85,11 +85,11 @@ get :: StoreT s w a -> s get (StoreT _ s) = s -put :: Comonad w => s -> StoreT s w a -> a -put s ~(StoreT f _) = extract f s+put :: Comonad w => s -> StoreT s w a -> StoreT s w a +put s ~(StoreT f _) = StoreT f s -modify :: Comonad w => (s -> s) -> StoreT s w a -> a-modify f ~(StoreT g s) = extract g (f s)+modify :: Comonad w => (s -> s) -> StoreT s w a -> StoreT s w a+modify f ~(StoreT g s) = StoreT g (f s)  experiment :: (Comonad w, Functor f) => f (s -> s) -> StoreT s w a -> f a experiment fs ~(StoreT g s) = fmap (\f -> extract g (f s)) fs
Control/Comonad/Trans/Store/Memo.hs view
@@ -93,11 +93,11 @@ get :: StoreT s w a -> s get (StoreT _ s _) = s -put :: Comonad w => s -> StoreT s w a -> a -put s (StoreT f _ _) = extract f s+put :: Comonad w => s -> StoreT s w a -> StoreT s w a+put s (StoreT f _ _) = storeT f s -modify :: Comonad w => (s -> s) -> StoreT s w a -> a-modify f (StoreT g s _) = extract g (f s)+modify :: Comonad w => (s -> s) -> StoreT s w a -> StoreT s w a+modify f (StoreT g s _) = storeT g (f s)  experiment :: (Comonad w, Functor f) => f (s -> s) -> StoreT s w a -> f a experiment fs (StoreT g s _) = fmap (\f -> extract g (f s)) fs
Control/Comonad/Trans/Store/Strict.hs view
@@ -85,11 +85,11 @@ get :: StoreT s w a -> s get (StoreT _ s) = s -put :: Comonad w => s -> StoreT s w a -> a -put s (StoreT f _) = extract f s+put :: Comonad w => s -> StoreT s w a -> StoreT s w a+put s (StoreT f _) = StoreT f s -modify :: Comonad w => (s -> s) -> StoreT s w a -> a-modify f (StoreT g s) = extract g (f s)+modify :: Comonad w => (s -> s) -> StoreT s w a -> StoreT s w a+modify f (StoreT g s) = StoreT g (f s)  experiment :: (Comonad w, Functor f) => f (s -> s) -> StoreT s w a -> f a experiment fs (StoreT g s) = fmap (\f -> extract g (f s)) fs
comonad-transformers.cabal view
@@ -1,6 +1,6 @@ name:          comonad-transformers category:      Control, Comonads-version:       1.3.0.1+version:       1.4.0 license:       BSD3 cabal-version: >= 1.6 license-file:  LICENSE