packages feed

distributive 0.6.2.1 → 0.6.3

raw patch · 5 files changed

+24/−77 lines, 5 filesdep −base-orphansdep −ghc-primdep −semigroupsdep ~basePVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependencies removed: base-orphans, ghc-prim, semigroups

Dependency ranges changed: base

API changes (from Hackage documentation)

- Data.Distributive: class Functor g => Distributive g
+ Data.Distributive: class Functor g => Distributive (g :: Type -> Type)
- Data.Distributive.Generic: class GDistributive g
+ Data.Distributive.Generic: class GDistributive (g :: Type -> Type)

Files

CHANGELOG.markdown view
@@ -1,3 +1,8 @@+0.6.3 [2026.01.10]+------------------+* Drop support for pre-8.0 versions of GHC.+* Drop unnecessary `base-orphans` dependency.+ 0.6.2.1 [2020.12.30] -------------------- * The build-type has been changed from `Custom` to `Simple`.
distributive.cabal view
@@ -1,6 +1,6 @@ name:          distributive category:      Data Structures-version:       0.6.2.1+version:       0.6.3 license:       BSD3 cabal-version: >= 1.10 license-file:  LICENSE@@ -13,18 +13,20 @@ synopsis:      Distributive functors -- Dual to Traversable description:   Distributive functors -- Dual to @Traversable@ build-type:    Simple-tested-with:   GHC == 7.0.4-             , GHC == 7.2.2-             , GHC == 7.4.2-             , GHC == 7.6.3-             , GHC == 7.8.4-             , GHC == 7.10.3-             , GHC == 8.0.2+tested-with:   GHC == 8.0.2              , GHC == 8.2.2              , GHC == 8.4.4              , GHC == 8.6.5              , GHC == 8.8.4-             , GHC == 8.10.3+             , GHC == 8.10.4+             , GHC == 9.0.2+             , GHC == 9.2.8+             , GHC == 9.4.8+             , GHC == 9.6.7+             , GHC == 9.8.4+             , GHC == 9.10.3+             , GHC == 9.12.2+             , GHC == 9.14.1 extra-source-files:   .hlint.yaml   .vim.custom@@ -34,15 +36,7 @@  source-repository head   type: git-  location: git://github.com/ekmett/distributive.git--flag semigroups-  manual: True-  default: True-  description:-    You can disable the use of the `semigroups` package using `-f-semigroups`.-    .-    Disabling this is an unsupported configuration, but it may be useful for accelerating builds in sandboxes for expert users.+  location: https://github.com/ekmett/distributive.git  flag tagged   manual: True@@ -54,30 +48,16 @@  library   build-depends:-    base                >= 4   && < 5,-    base-orphans        >= 0.5.2 && < 1,-    transformers        >= 0.3 && < 0.6+    base                >= 4.9 && < 5,+    transformers        >= 0.3 && < 0.7    hs-source-dirs:  src   exposed-modules:     Data.Distributive--  if impl(ghc>=7.2)-    exposed-modules: Data.Distributive.Generic+    Data.Distributive.Generic    if flag(tagged)     build-depends: tagged >= 0.7 && < 1--  if impl(ghc>=7.2 && < 7.6)-    build-depends: ghc-prim--  if impl(ghc < 8.0)-    if flag(semigroups)-      build-depends: semigroups >= 0.13 && < 1--  if impl(ghc < 7.8)-    hs-source-dirs: src-compat-    other-modules: Data.Coerce    ghc-options: -Wall 
− src-compat/Data/Coerce.hs
@@ -1,8 +0,0 @@--- This is a shim for GHC before 7.8. Cabal ignores it--- for GHC 7.8 and later.-module Data.Coerce (coerce) where--import Unsafe.Coerce (unsafeCoerce)--coerce :: a -> b-coerce = unsafeCoerce
src/Data/Distributive.hs view
@@ -2,13 +2,8 @@ {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE ScopedTypeVariables #-}-#if __GLASGOW_HASKELL__ >= 702 {-# LANGUAGE Trustworthy #-}-#endif--#if __GLASGOW_HASKELL__ >= 706 {-# LANGUAGE PolyKinds #-}-#endif  ----------------------------------------------------------------------------- -- |@@ -30,34 +25,22 @@ import Control.Applicative import Control.Applicative.Backwards import Control.Monad (liftM)-#if __GLASGOW_HASKELL__ < 707-import Control.Monad.Instances ()-#endif import Control.Monad.Trans.Identity import Control.Monad.Trans.Reader import Data.Coerce+import Data.Complex import Data.Functor.Compose import Data.Functor.Identity import Data.Functor.Product import Data.Functor.Reverse import qualified Data.Monoid as Monoid-import Data.Orphans ()--#if MIN_VERSION_base(4,4,0)-import Data.Complex-#endif-#if __GLASGOW_HASKELL__ >= 707 || defined(MIN_VERSION_tagged) import Data.Proxy-#endif-#if __GLASGOW_HASKELL__ >= 800 || defined(MIN_VERSION_semigroups) import qualified Data.Semigroup as Semigroup-#endif+import GHC.Generics (U1(..), (:*:)(..), (:.:)(..), Par1(..), Rec1(..), M1(..))+ #ifdef MIN_VERSION_tagged import Data.Tagged #endif-#if __GLASGOW_HASKELL__ >= 702-import GHC.Generics (U1(..), (:*:)(..), (:.:)(..), Par1(..), Rec1(..), M1(..))-#endif  #ifdef HLINT {-# ANN module "hlint: ignore Use section" #-}@@ -79,9 +62,7 @@ -- and no extra information to try to merge together. -- class Functor g => Distributive g where-#if __GLASGOW_HASKELL__ >= 707   {-# MINIMAL distribute | collect #-}-#endif   -- | The dual of 'Data.Traversable.sequenceA'   --   -- >>> distribute [(+1),(+2)] 1@@ -140,11 +121,9 @@     :: forall a b f . Functor f => (a -> Identity b) -> f a -> Identity (f b)   distribute = Identity . fmap runIdentity -#if __GLASGOW_HASKELL__ >= 707 || defined(MIN_VERSION_tagged) instance Distributive Proxy where   collect _ _ = Proxy   distribute _ = Proxy-#endif  #if defined(MIN_VERSION_tagged) instance Distributive (Tagged t) where@@ -154,7 +133,7 @@ #endif  instance Distributive ((->)e) where-  distribute a e = fmap ($e) a+  distribute a e = fmap ($ e) a   collect f q e = fmap (flip f e) q  instance Distributive g => Distributive (ReaderT e g) where@@ -209,7 +188,6 @@     => (a -> Monoid.Sum b) -> f a -> Monoid.Sum (f b)   distribute = Monoid.Sum . fmap Monoid.getSum -#if __GLASGOW_HASKELL__ >= 800 || defined(MIN_VERSION_semigroups) instance Distributive Semigroup.Min where   collect = coerce (fmap :: (a -> b) -> f a -> f b)     :: forall f a b . Functor f@@ -233,21 +211,17 @@     :: forall f a b . Functor f     => (a -> Semigroup.Last b) -> f a -> Semigroup.Last (f b)   distribute = Semigroup.Last . fmap Semigroup.getLast-#endif -#if MIN_VERSION_base(4,4,0) instance Distributive Complex where   distribute wc = fmap realP wc :+ fmap imagP wc where     -- Redefine realPart and imagPart to avoid incurring redundant RealFloat     -- constraints on older versions of base     realP (r :+ _) = r     imagP (_ :+ i) = i-#endif  instance (Distributive m, Monad m) => Distributive (WrappedMonad m) where   collect f = WrapMonad . collect (coerce f) -#if __GLASGOW_HASKELL__ >= 702 instance Distributive U1 where   distribute _ = U1 @@ -280,4 +254,3 @@   collect = coerce (collect :: (a -> f b) -> g a -> f (g b))     :: forall g a b . Functor g     => (a -> M1 i c f b) -> g a -> M1 i c f (g b)-#endif
src/Data/Distributive/Generic.hs view
@@ -1,10 +1,7 @@-{-# LANGUAGE CPP #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE FlexibleContexts #-}-#if __GLASGOW_HASKELL__ >= 702 {-# LANGUAGE Trustworthy #-}-#endif ----------------------------------------------------------------------------- -- | -- Module      :  Data.Distributive