packages feed

folds 0.7.6 → 0.7.7

raw patch · 4 files changed

+27/−41 lines, 4 filesdep ~basePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base

API changes (from Hackage documentation)

Files

CHANGELOG.markdown view
@@ -1,3 +1,7 @@+0.7.7 [2021.11.16]+------------------+* Drop support for pre-8.0 versions of GHC.+ 0.7.6 [2021.02.17] ------------------ * Allow building with `lens-5.*`.
folds.cabal view
@@ -1,6 +1,6 @@ name:          folds category:      Data, Comonads, Enumerator-version:       0.7.6+version:       0.7.7 license:       BSD3 cabal-version: >= 1.10 license-file:  LICENSE@@ -12,16 +12,14 @@ copyright:     Copyright (C) 2009-2013 Edward A. Kmett build-type:    Simple synopsis:      Beautiful Folding-tested-with:   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.3-             , GHC == 8.10.1+             , GHC == 8.8.4+             , GHC == 8.10.7+             , GHC == 9.0.1+             , GHC == 9.2.1  extra-source-files:   .gitignore@@ -32,7 +30,7 @@  description: This package is a playground full of comonadic folds.   .-  This style of fold is documented in <https://www.fpcomplete.com/user/edwardk/cellular-automata/part-2 "Cellular Automata, Part II: PNGs and Moore">+  This style of fold is documented in <https://www.schoolofhaskell.com/user/edwardk/cellular-automata/part-2 "Cellular Automata, Part II: PNGs and Moore">   .   This package can be seen as what happens if you chase Max Rabkin's <http://squing.blogspot.com/2008/11/beautiful-folding.html "Beautiful Folding"> to its logical conclusion.   .@@ -50,7 +48,7 @@ library   build-depends:     adjunctions       >= 4.2   && < 5,-    base              >= 4     && < 5,+    base              >= 4.9   && < 5,     bifunctors        >= 4     && < 6,     comonad           >= 4     && < 6,     constraints       >= 0.4   && < 1,@@ -92,8 +90,5 @@    if flag(optimize)     ghc-options: -O2--  if impl(ghc >= 8.6)-    ghc-options: -Wno-star-is-type    default-language: Haskell2010
src/Data/Fold/Class.hs view
@@ -1,4 +1,3 @@-{-# LANGUAGE CPP #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE Trustworthy #-}@@ -9,9 +8,6 @@   ) where  import Control.Lens-#if __GLASGOW_HASKELL__ < 710-import Data.Foldable-#endif import Data.Fold.Internal import Data.Profunctor.Unsafe 
src/Data/Fold/Internal.hs view
@@ -28,19 +28,14 @@   , foldDeRef1   ) where -#if __GLASGOW_HASKELL__ < 710-import Control.Applicative-#endif import Control.Monad.Fix import Data.Bifunctor import Data.Bifoldable import Data.Bitraversable import Data.Constraint-import Data.Data (Data, Typeable)+import Data.Data (Data)+import Data.Kind import Data.Semigroup hiding (Last, First)-#if __GLASGOW_HASKELL__ < 710-import Data.Foldable-#endif import Data.Functor.Bind import Data.HashMap.Lazy as HM import Data.Profunctor.Unsafe@@ -50,15 +45,11 @@ import Data.Semigroup.Foldable import Data.Semigroup.Bifoldable import Data.Semigroup.Bitraversable--#if __GLASGOW_HASKELL__ < 710-import Data.Traversable-#endif import System.IO.Unsafe  -- | Reversed '[]' data SnocList a = Snoc (SnocList a) a | Nil-  deriving (Eq,Ord,Show,Read,Typeable,Data)+  deriving (Eq,Ord,Show,Read,Data)  instance Functor SnocList where   fmap f (Snoc xs x) = Snoc (fmap f xs) (f x)@@ -80,7 +71,7 @@   {-# INLINABLE traverse #-}  data SnocList1 a = Snoc1 (SnocList1 a) a | First a-  deriving (Eq,Ord,Show,Read,Typeable,Data)+  deriving (Eq,Ord,Show,Read,Data)  instance Functor SnocList1 where   fmap f (Snoc1 xs x) = Snoc1 (fmap f xs) (f x)@@ -107,7 +98,7 @@  -- | Strict 'Maybe' data Maybe' a = Nothing' | Just' !a-  deriving (Eq,Ord,Show,Read,Typeable,Data)+  deriving (Eq,Ord,Show,Read,Data)  instance Foldable Maybe' where   foldMap _ Nothing' = mempty@@ -120,7 +111,7 @@  -- | A reified 'Monoid'. newtype N a s = N { runN :: a }-  deriving (Eq,Ord,Show,Read,Typeable,Data)+  deriving (Eq,Ord,Show,Read,Data)  instance Reifies s (a -> a -> a, a) => Semigroup (N a s) where   N a <> N b = N $ fst (reflect (Proxy :: Proxy s)) a b@@ -137,7 +128,7 @@   = Zero   | One a   | Two (Tree a) (Tree a)-  deriving (Eq,Ord,Show,Read,Typeable,Data)+  deriving (Eq,Ord,Show,Read,Data)  instance Functor Tree where   fmap _ Zero = Zero@@ -156,13 +147,13 @@  -- | A reified 'Semigroup'. newtype S a s = S { runS :: a }-  deriving (Eq,Ord,Show,Read,Typeable,Data)+  deriving (Eq,Ord,Show,Read,Data)  instance Reifies s (a -> a -> a) => Semigroup (S a s) where   S a <> S b = S $ reflect (Proxy :: Proxy s) a b  -- | Strict Pair-data Pair' a b = Pair' !a !b deriving (Eq,Ord,Show,Read,Typeable,Data)+data Pair' a b = Pair' !a !b deriving (Eq,Ord,Show,Read,Data)  instance (Semigroup a, Semigroup b) => Semigroup (Pair' a b) where   Pair' a b <> Pair' c d = Pair' (a <> c) (b <> d)@@ -172,12 +163,12 @@   mempty = Pair' mempty mempty   {-# INLINE mempty #-} -  -- TODO/FIXME: Once Semigroup becomes a superclass-  -- `#if MIN_VERSION_base`-out this definition+#if !(MIN_VERSION_base(4,11,0))   mappend (Pair' a b) (Pair' c d) = Pair' (mappend a c) (mappend b d)   {-# INLINE mappend #-}+#endif -newtype An a = An a deriving (Eq,Ord,Show,Read,Typeable,Data)+newtype An a = An a deriving (Eq,Ord,Show,Read,Data)  instance Functor An where   fmap f (An a) = An (f a)@@ -188,7 +179,7 @@ instance Traversable An where   traverse f (An a) = An <$> f a -data Box a = Box a deriving (Eq,Ord,Show,Read,Typeable,Data)+data Box a = Box a deriving (Eq,Ord,Show,Read,Data)  instance Functor Box where   fmap f (Box a) = Box (f a)@@ -261,8 +252,8 @@   mapDeRef _ (One a) = pure (T1 a)   mapDeRef f (Two x y) = T2 <$> f x <*> f y -class MuRef1 (f :: * -> *) where-  type DeRef1 f :: * -> * -> *+class MuRef1 (f :: Type -> Type) where+  type DeRef1 f :: Type -> Type -> Type   muRef1 :: proxy (f a) -> Dict (MuRef (f a), DeRef (f a) ~ DeRef1 f a)  foldDeRef :: forall f a. (MuRef1 f, Bifoldable (DeRef1 f)) => f a -> FreeMonoid a