comonad-transformers 1.2.1 → 1.3.0
raw patch · 4 files changed
+16/−7 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Control.Comonad.Trans.Env.Lazy: lowerEnvT :: EnvT e w a -> w a
Files
- Control/Comonad/Trans/Discont/Lazy.hs +1/−1
- Control/Comonad/Trans/Env/Lazy.hs +13/−4
- Control/Comonad/Trans/Store/Lazy.hs +1/−1
- comonad-transformers.cabal +1/−1
Control/Comonad/Trans/Discont/Lazy.hs view
@@ -80,7 +80,7 @@ -- instance Apply w => Apply (DiscontT s w) where label :: Comonad w => DiscontT s w a -> s -label ~(DiscontT _ ws) = extract ws+label (DiscontT _ ws) = extract ws callCV :: DiscontT s w (DiscontT s w (DiscontT s w a -> a) -> b) -> b callCV ~(DiscontT k s) = k s (DiscontT (\s' ~(DiscontT k' _) -> k' s') s)
Control/Comonad/Trans/Env/Lazy.hs view
@@ -1,7 +1,7 @@ {-# LANGUAGE CPP, FlexibleContexts #-} ----------------------------------------------------------------------------- -- |--- Module : Control.Comonad.Trans.Context+-- Module : Control.Comonad.Trans.Env.Lazy -- Copyright : (C) 2008-2011 Edward Kmett -- License : BSD-style (see the file LICENSE) --@@ -23,10 +23,12 @@ -- * The environment comonad transformer , EnvT(..) , runEnvT+ , lowerEnvT -- * Combinators , ask , asks , local+ -- , liftCallCV ) where import Control.Applicative@@ -105,19 +107,19 @@ ~(EnvT ef wf) <.> ~(EnvT ea wa) = EnvT (ef <> ea) (wf <.> wa) instance ComonadTrans (EnvT e) where- lower ~(EnvT _ wa) = wa+ lower (EnvT _ wa) = wa instance ComonadHoist (EnvT e) where cohoist ~(EnvT e wa) = EnvT e (Identity (extract wa)) instance Foldable w => Foldable (EnvT e w) where- foldMap f (EnvT _ w) = foldMap f w+ foldMap f ~(EnvT _ w) = foldMap f w instance Traversable w => Traversable (EnvT e w) where traverse f (EnvT e w) = EnvT e <$> traverse f w ask :: EnvT e w a -> e-ask ~(EnvT e _) = e+ask (EnvT e _) = e asks :: (e -> f) -> EnvT e w a -> f asks f = f . ask@@ -125,3 +127,10 @@ local :: (e -> e) -> EnvT e w a -> EnvT e w a local f ~(EnvT e wa) = EnvT (f e) wa +lowerEnvT :: EnvT e w a -> w a +lowerEnvT (EnvT _ wa) = wa++{-+liftCallCV :: Functor w => (w (w (w a -> a) -> b) -> b) -> EnvT e w (EnvT e w (EnvT e w a -> a) -> b) -> b+liftCallCV callCV ~(EnvT e wa) = callCV $ \c -> ...+-}
Control/Comonad/Trans/Store/Lazy.hs view
@@ -83,7 +83,7 @@ cohoist ~(StoreT f s) = StoreT (Identity (extract f)) s get :: StoreT s w a -> s-get ~(StoreT _ s) = s+get (StoreT _ s) = s put :: Comonad w => s -> StoreT s w a -> a put s ~(StoreT f _) = extract f s
comonad-transformers.cabal view
@@ -1,6 +1,6 @@ name: comonad-transformers category: Control, Comonads-version: 1.2.1+version: 1.3.0 license: BSD3 cabal-version: >= 1.6 license-file: LICENSE