monoids 0.2.0.4 → 0.3.2
raw patch · 3 files changed
+15/−14 lines, 3 filesdep ~arraydep ~parallelPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: array, parallel
API changes (from Hackage documentation)
- Data.Generator: class Generator c where { type family Elem c :: *; { mapReduce f = mapTo f mempty mapTo f m = mappend m . mapReduce f mapFrom f = mappend . mapReduce f } }
+ Data.Generator: class Generator c where type family Elem c :: * mapReduce f = mapTo f mempty mapTo f m = mappend m . mapReduce f mapFrom f = mappend . mapReduce f
- Data.Generator: mapFrom :: (Generator c, Reducer e m) => (Elem c -> e) -> c -> m -> m
+ Data.Generator: mapFrom :: (Generator c, e Reducer m) => (Elem c -> e) -> c -> m -> m
- Data.Generator: mapReduce :: (Generator c, Reducer e m) => (Elem c -> e) -> c -> m
+ Data.Generator: mapReduce :: (Generator c, e Reducer m) => (Elem c -> e) -> c -> m
- Data.Generator: mapReduceWith :: (Generator c, Reducer e m) => (m -> n) -> (Elem c -> e) -> c -> n
+ Data.Generator: mapReduceWith :: (Generator c, e Reducer m) => (m -> n) -> (Elem c -> e) -> c -> n
- Data.Generator: mapTo :: (Generator c, Reducer e m) => (Elem c -> e) -> m -> c -> m
+ Data.Generator: mapTo :: (Generator c, e Reducer m) => (Elem c -> e) -> m -> c -> m
- Data.Generator: reduce :: (Generator c, Reducer (Elem c) m) => c -> m
+ Data.Generator: reduce :: (Generator c, Elem c Reducer m) => c -> m
- Data.Generator: reduceWith :: (Generator c, Reducer (Elem c) m) => (m -> n) -> c -> n
+ Data.Generator: reduceWith :: (Generator c, Elem c Reducer m) => (m -> n) -> c -> n
- Data.Generator.Combinators: and :: (Generator c, (Elem c) ~ Bool) => c -> Bool
+ Data.Generator.Combinators: and :: (Generator c, Elem c ~ Bool) => c -> Bool
- Data.Generator.Combinators: asum :: (Generator c, Alternative f, (f a) ~ (Elem c)) => c -> f a
+ Data.Generator.Combinators: asum :: (Generator c, Alternative f, f a ~ Elem c) => c -> f a
- Data.Generator.Combinators: filter :: (Generator c, Reducer (Elem c) m) => (Elem c -> Bool) -> c -> m
+ Data.Generator.Combinators: filter :: (Generator c, Elem c Reducer m) => (Elem c -> Bool) -> c -> m
- Data.Generator.Combinators: filterWith :: (Generator c, Reducer (Elem c) m) => (m -> n) -> (Elem c -> Bool) -> c -> n
+ Data.Generator.Combinators: filterWith :: (Generator c, Elem c Reducer m) => (m -> n) -> (Elem c -> Bool) -> c -> n
- Data.Generator.Combinators: fold :: (Monoid m, Generator c, (Elem c) ~ m) => c -> m
+ Data.Generator.Combinators: fold :: (Monoid m, Generator c, Elem c ~ m) => c -> m
- Data.Generator.Combinators: msum :: (Generator c, MonadPlus m, (m a) ~ (Elem c)) => c -> m a
+ Data.Generator.Combinators: msum :: (Generator c, MonadPlus m, m a ~ Elem c) => c -> m a
- Data.Generator.Combinators: or :: (Generator c, (Elem c) ~ Bool) => c -> Bool
+ Data.Generator.Combinators: or :: (Generator c, Elem c ~ Bool) => c -> Bool
- Data.Group: class Monoid a => Group a
+ Data.Group: class Monoid a => Group a where gnegate = minus zero a minus b = a `plus` gnegate b a gsubtract b = gnegate a `plus` b
- Data.Group: class Multiplicative g => MultiplicativeGroup g
+ Data.Group: class Multiplicative g => MultiplicativeGroup g where x under y = grecip x `times` y x over y = x `times` grecip y grecip x = one `over` x
- Data.Monoid.Combinators: repeat :: Reducer e m => e -> m
+ Data.Monoid.Combinators: repeat :: e Reducer m => e -> m
- Data.Monoid.Reducer: class Monoid m => Reducer c m
+ Data.Monoid.Reducer: class Monoid m => Reducer c m where unit = snoc mempty snoc m = mappend m . unit cons = mappend . unit
- Data.Monoid.Reducer: foldMapReduce :: (Foldable f, Reducer e m) => (a -> e) -> f a -> m
+ Data.Monoid.Reducer: foldMapReduce :: (Foldable f, e Reducer m) => (a -> e) -> f a -> m
- Data.Monoid.Reducer: foldReduce :: (Foldable f, Reducer e m) => f e -> m
+ Data.Monoid.Reducer: foldReduce :: (Foldable f, e Reducer m) => f e -> m
- Data.Monoid.Reducer: pureUnit :: (Applicative f, Reducer c n) => c -> f n
+ Data.Monoid.Reducer: pureUnit :: (Applicative f, c Reducer n) => c -> f n
- Data.Monoid.Reducer: returnUnit :: (Monad m, Reducer c n) => c -> m n
+ Data.Monoid.Reducer: returnUnit :: (Monad m, c Reducer n) => c -> m n
Files
- Data/Monoid/Self.hs +2/−1
- Data/Monoid/Union.hs +7/−7
- monoids.cabal +6/−6
Data/Monoid/Self.hs view
@@ -22,7 +22,7 @@ ( Self(Self, getSelf) ) where -import Data.Monoid (Monoid)+import Data.Monoid (Monoid(..)) import Data.Monoid.Reducer (Reducer, unit) newtype Self m = Self { getSelf :: m } deriving (Monoid)@@ -32,3 +32,4 @@ instance Functor Self where fmap f (Self x) = Self (f x)+
Data/Monoid/Union.hs view
@@ -31,14 +31,14 @@ import Data.Monoid import Data.Monoid.Reducer +{-# SPECIALIZE union :: IntMap a -> IntMap a -> IntMap a #-}+{-# SPECIALIZE union :: Ord k => Map k a -> Map k a -> Map k a #-}+{-# SPECIALIZE union :: Eq a => [a] -> [a] -> [a] #-}+{-# SPECIALIZE union :: Ord a => Set a -> Set a -> Set a #-}+{-# SPECIALIZE union :: IntSet -> IntSet -> IntSet #-} -- | A Container suitable for the 'Union' 'Monoid' class HasUnion f where empty :: f- {-# SPECIALIZE union :: IntMap a -> IntMap a -> IntMap a #-}- {-# SPECIALIZE union :: Ord k => Map k a -> Map k a -> Map k a #-}- {-# SPECIALIZE union :: Eq a => [a] -> [a] -> [a] #-}- {-# SPECIALIZE union :: Ord a => Set a -> Set a -> Set a #-}- {-# SPECIALIZE union :: IntSet -> IntSet -> IntSet #-} union :: f -> f -> f instance HasUnion (IntMap a) where@@ -75,10 +75,10 @@ instance Functor Union where fmap f (Union a) = Union (f a) +{-# SPECIALIZE unionWith :: (a -> a -> a) -> IntMap a -> IntMap a -> IntMap a #-}+{-# SPECIALIZE unionWith :: Ord k => (a -> a -> a) -> Map k a -> Map k a -> Map k a #-} -- | Polymorphic containers that we can supply an operation to handle unions with class Functor f => HasUnionWith f where- {-# SPECIALIZE unionWith :: (a -> a -> a) -> IntMap a -> IntMap a -> IntMap a #-}- {-# SPECIALIZE unionWith :: Ord k => (a -> a -> a) -> Map k a -> Map k a -> Map k a #-} unionWith :: (a -> a -> a) -> f a -> f a -> f a emptyWith :: f a
monoids.cabal view
@@ -1,5 +1,5 @@ name: monoids-version: 0.2.0.4+version: 0.3.2 license: BSD3 license-file: LICENSE author: Edward A. Kmett@@ -7,8 +7,8 @@ stability: experimental homepage: http://github.com/ekmett/monoids category: Data, Math, Numerical-synopsis: Monoids, specialized containers and a general map/reduce framework-description: Monoids, specialized containers and a general map/reduce framework+synopsis: Deprecated: Use 'reducers'+description: Deprecated: Use 'reducers' copyright: (c) 2009 Edward A. Kmett build-type: Simple cabal-version: >=1.6@@ -18,18 +18,18 @@ location: git://github.com/ekmett/monoids.git flag optimize- description: Enable optimizations + description: Enable optimizations default: False library build-depends: base >= 4 && < 5,- array >= 0.2 && < 0.4,+ array >= 0.2 && < 0.5, containers >= 0.2 && < 0.5, bytestring >= 0.9 && < 1.0, fingertree >= 0.0.1 && < 0.2, text >= 0.1 && < 0.12,- parallel >= 1.1 && < 3.2+ parallel >= 1.1 && < 3.3 exposed-modules: Data.Generator