packages feed

pointed 2.0.3.2 → 2.1

raw patch · 3 files changed

+27/−48 lines, 3 filesdep ~comonaddep ~comonad-transformersdep ~containers

Dependency ranges changed: comonad, comonad-transformers, containers, data-default, semigroupoids, semigroups, transformers

Files

Data/Copointed.hs view
@@ -1,8 +1,7 @@ module Data.Copointed where -import Control.Comonad import Data.Default-import Data.Functor.Identity +import Data.Functor.Identity import Data.Functor.Compose import Data.Functor.Coproduct import Data.Tree@@ -10,14 +9,9 @@ import Control.Monad.Trans.Identity import qualified Control.Monad.Trans.Writer.Lazy as Lazy import qualified Control.Monad.Trans.Writer.Strict as Strict-import qualified Control.Comonad.Trans.Discont.Lazy as Lazy-import qualified Control.Comonad.Trans.Discont.Memo as Memo-import qualified Control.Comonad.Trans.Discont.Strict as Strict-import qualified Control.Comonad.Trans.Env.Lazy as Lazy-import qualified Control.Comonad.Trans.Env.Strict as Strict-import qualified Control.Comonad.Trans.Store.Lazy as Lazy-import qualified Control.Comonad.Trans.Store.Memo as Memo-import qualified Control.Comonad.Trans.Store.Strict as Strict+import Control.Comonad.Trans.Env+import Control.Comonad.Trans.Store+import Control.Comonad.Trans.Traced import Data.List.NonEmpty (NonEmpty(..))  -- | 'Copointed' does not require a 'Functor', as the only relationship@@ -30,8 +24,11 @@   copoint = runIdentity  instance Default m => Copointed ((->)m) where-  copoint f = f def +  copoint f = f def +instance (Default m, Copointed w) => Copointed (TracedT m w) where+  copoint (TracedT w) = copoint w def+ instance Copointed ((,) a) where   copoint = snd @@ -54,10 +51,10 @@   copoint = copoint . runIdentityT  instance Copointed m => Copointed (Lazy.WriterT w m) where-  copoint = fst . copoint . Lazy.runWriterT +  copoint = fst . copoint . Lazy.runWriterT  instance Copointed m => Copointed (Strict.WriterT w m) where-  copoint = fst . copoint . Strict.runWriterT +  copoint = fst . copoint . Strict.runWriterT  instance Copointed Dual where   copoint = getDual@@ -80,26 +77,8 @@ instance Copointed Semigroup.Min where   copoint = Semigroup.getMin -instance Copointed (Lazy.DiscontT s w) where-  copoint (Lazy.DiscontT f w) = f w--instance Copointed (Strict.DiscontT s w) where-  copoint (Strict.DiscontT f w) = f w--instance Copointed (Memo.DiscontT s w) where-  copoint = extract--instance Copointed w => Copointed (Lazy.EnvT e w) where-  copoint = copoint . Lazy.lowerEnvT--instance Copointed w => Copointed (Strict.EnvT e w) where-  copoint = copoint . Strict.lowerEnvT--instance Copointed w => Copointed (Lazy.StoreT s w) where-  copoint (Lazy.StoreT wf s) = copoint wf s--instance Copointed w => Copointed (Strict.StoreT s w) where-  copoint (Strict.StoreT wf s) = copoint wf s+instance Copointed w => Copointed (EnvT e w) where+  copoint = copoint . lowerEnvT -instance Copointed w => Copointed (Memo.StoreT s w) where-  copoint = copoint . Memo.lowerStoreT +instance Copointed w => Copointed (StoreT s w) where+  copoint (StoreT wf s) = copoint wf s
Data/Pointed.hs view
@@ -41,7 +41,7 @@  instance Pointed (Either a) where   point = Right-  + instance Pointed IO where   point = return @@ -52,7 +52,7 @@   point a = Node a []  instance Pointed NonEmpty where-  point a = a :| [] +  point a = a :| []  instance Pointed ZipList where   point = pure@@ -67,7 +67,7 @@   point = (,) def  instance Monad m => Pointed (WrappedMonad m) where-  point = WrapMonad . return +  point = WrapMonad . return  instance Default m => Pointed (Const m) where   point _ = Const def@@ -117,7 +117,7 @@ instance (Pointed p, Pointed q) => Pointed (Functor.Product p q) where   point a = Functor.Pair (point a) (point a) -instance Default m => Pointed (Constant m) where +instance Default m => Pointed (Constant m) where   point _ = Constant def  instance Pointed (ContT r m) where@@ -151,7 +151,7 @@   point a = Strict.WriterT $ point (a, def)  instance Pointed m => Pointed (Lazy.StateT s m) where-  point a = Lazy.StateT $ \s -> point (a, s) +  point a = Lazy.StateT $ \s -> point (a, s)  instance Pointed m => Pointed (Strict.StateT s m) where   point a = Strict.StateT $ \s -> point (a, s)
pointed.cabal view
@@ -1,6 +1,6 @@ name:          pointed category:      Data-version:       2.0.3.2+version:       2.1 license:       BSD3 cabal-version: >= 1.6 license-file:  LICENSE@@ -20,14 +20,14 @@ library   build-depends:     base                 >= 4       && < 5,-    transformers         >= 0.2.0   && < 0.3,-    containers           >= 0.4.0.0 && < 0.5,-    data-default         >= 0.2.0.1 && < 0.4,-    comonad              >= 1.1.1.1 && < 1.2,-    semigroups           >= 0.8     && < 0.9,-    semigroupoids        >= 1.2.6.1 && < 1.3,+    transformers         >= 0.2     && < 0.4,+    containers           >= 0.4     && < 0.5,+    data-default         >= 0.4     && < 0.5,+    comonad              >= 1.1.1.3 && < 1.2,+    semigroups           >= 0.8.2   && < 0.9,+    semigroupoids        >= 1.3     && < 1.4,     stm                  >= 2.1.2.1 && < 2.4,-    comonad-transformers >= 2.0.3   && < 2.1+    comonad-transformers >= 2.1     && < 2.2    exposed-modules:     Data.Pointed