comonad-transformers 0.6.5 → 0.7.0
raw patch · 2 files changed
+4/−41 lines, 2 filesdep +distributivedep ~comonaddep ~functor-applyPVP ok
version bump matches the API change (PVP)
Dependencies added: distributive
Dependency ranges changed: comonad, functor-apply
API changes (from Hackage documentation)
- Control.Monad.Trans.Cont.Comonadic: ContW :: (w (a -> r) -> r) -> ContW r w a
- Control.Monad.Trans.Cont.Comonadic: callCC :: Comonad w => ((a -> ContW r w b) -> ContW r w a) -> ContW r w a
- Control.Monad.Trans.Cont.Comonadic: cont :: ((a -> r) -> r) -> Cont r a
- Control.Monad.Trans.Cont.Comonadic: instance Comonad w => Applicative (ContW r w)
- Control.Monad.Trans.Cont.Comonadic: instance Comonad w => FunctorApply (ContW r w)
- Control.Monad.Trans.Cont.Comonadic: instance Comonad w => Monad (ContW r w)
- Control.Monad.Trans.Cont.Comonadic: instance Functor w => Functor (ContW r w)
- Control.Monad.Trans.Cont.Comonadic: newtype ContW r w a
- Control.Monad.Trans.Cont.Comonadic: runCont :: Cont r a -> (a -> r) -> r
- Control.Monad.Trans.Cont.Comonadic: runContW :: ContW r w a -> w (a -> r) -> r
- Control.Monad.Trans.Cont.Comonadic: type Cont r = ContW r Identity
Files
− Control/Monad/Trans/Cont/Comonadic.hs
@@ -1,37 +0,0 @@-module Control.Monad.Trans.Cont.Comonadic where--import Control.Comonad-import Control.Applicative-import Control.Monad (ap)-import Data.Functor.Apply-import Data.Functor.Identity--type Cont r = ContW r Identity--cont :: ((a -> r) -> r) -> Cont r a -cont f = ContW (f . runIdentity) --runCont :: Cont r a -> (a -> r) -> r-runCont (ContW k) = k . Identity--newtype ContW r w a = ContW { runContW :: w (a -> r) -> r }--instance Functor w => Functor (ContW r w) where- fmap f (ContW k) = ContW $ k . fmap (. f)--instance Comonad w => FunctorApply (ContW r w) where- (<.>) = ap--instance Comonad w => Applicative (ContW r w) where- pure x = ContW $ \wk -> extract wk x- (<*>) = ap -- TODO: expand--instance Comonad w => Monad (ContW r w) where- return = pure- ContW k >>= f = ContW $ k . extend (\wa a -> runContW (f a) wa)---- callCC :: Comonad w => ((forall b. a -> ContW r w b) -> ContW r w a) -> ContW r w a-callCC :: Comonad w => ((a -> ContW r w b) -> ContW r w a) -> ContW r w a-callCC f = ContW $ \wc -> runContW (f (\a -> ContW $ \_ -> extract wc a)) wc--{- instance Comonad w => MonadCont (ContT r w) where callCC = callCC #-}
comonad-transformers.cabal view
@@ -1,6 +1,6 @@ name: comonad-transformers category: Control, Comonads-version: 0.6.5+version: 0.7.0 license: BSD3 cabal-version: >= 1.6 license-file: LICENSE@@ -22,8 +22,9 @@ build-depends: base >= 4 && < 4.4, array >= 0.3.0.1 && < 0.4,- comonad >= 0.6 && < 0.7,- functor-apply >= 0.6 && < 0.8,+ comonad >= 0.7 && < 0.8,+ distributive >= 0.1 && < 0.2,+ functor-apply >= 0.7.4.1 && < 0.8, prelude-extras >= 0.1 && < 0.3, syb-extras >= 0.1 && < 0.3, transformers >= 0.2.0 && <= 0.3@@ -49,6 +50,5 @@ Control.Comonad.Trans.Store.Strict Control.Comonad.Trans.Traced Control.Comonad.Trans.Stream- Control.Monad.Trans.Cont.Comonadic ghc-options: -Wall