set-extra 1.4 → 1.4.1
raw patch · 2 files changed
+12/−5 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Data/Set/Extra.hs +4/−0
- set-extra.cabal +8/−5
Data/Set/Extra.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE CPP #-}+ module Data.Set.Extra ( module Set , mapM@@ -99,8 +101,10 @@ distrib :: Ord a => Set (Set a) -> Set (Set a) -> Set (Set a) distrib lss rss = flatten $ map (\ rs -> (map (\ ls -> union rs ls) lss)) rss +#if !MIN_VERSION_containers(0,5,11) cartesianProduct :: (Ord a, Ord b) => Set a -> Set b -> Set (a, b) cartesianProduct xs ys = flatten $ Set.map (\ x -> Set.map (\ y -> (x, y)) ys) xs+#endif groupBy :: (Ord a, Ord b) => (a -> b) -> Set a -> Map.Map b (Set a) groupBy f xs = fold (\ x m -> Map.insertWith union (f x) (singleton x) m) Map.empty xs
set-extra.cabal view
@@ -1,5 +1,5 @@ Name: set-extra-Version: 1.4+Version: 1.4.1 License: BSD3 License-File: COPYING Author: David Fox@@ -8,7 +8,10 @@ Synopsis: Functions that could be added to Data.Set. Maintainer: David Fox <dsf@seereason.com> Homepage: https://github.com/ddssff/set-extra-ghc-options: -O2 -Wall-Exposed-modules: Data.Set.Extra, Data.Set.ExtraG-Build-Depends: base < 5, containers, mtl, syb-Build-Type: Simple+Build-Type: Simple+cabal-version: >= 1.2++Library+ ghc-options: -O2 -Wall+ Exposed-modules: Data.Set.Extra, Data.Set.ExtraG+ Build-Depends: base < 5, containers, mtl, syb