[commit: packages/containers] cleaned_bugfix394, master, merge-doc-target, merge-fixes-5.9, revert-408-bugfix_394: Added Data.IntMap.Merge.{Lazy, Strict} modules. (6d86a74)

git at git.haskell.org git at git.haskell.org
Mon Apr 17 21:46:58 UTC 2017


Repository : ssh://git@git.haskell.org/containers

On branches: cleaned_bugfix394,master,merge-doc-target,merge-fixes-5.9,revert-408-bugfix_394
Link       : http://git.haskell.org/packages/containers.git/commitdiff/6d86a74b3553f2241f3d75e03474f4cf1a55c602

>---------------------------------------------------------------

commit 6d86a74b3553f2241f3d75e03474f4cf1a55c602
Author: wren romano <wren at community.haskell.org>
Date:   Sun Dec 18 21:12:43 2016 -0800

    Added Data.IntMap.Merge.{Lazy,Strict} modules.


>---------------------------------------------------------------

6d86a74b3553f2241f3d75e03474f4cf1a55c602
 Data/IntMap/Internal.hs              | 10 ++++++++++
 Data/{Map => IntMap}/Merge/Lazy.hs   | 10 +++++-----
 Data/{Map => IntMap}/Merge/Strict.hs | 10 +++++-----
 Data/Map/Merge/Lazy.hs               |  2 +-
 Data/Map/Merge/Strict.hs             |  2 +-
 containers.cabal                     |  2 ++
 6 files changed, 24 insertions(+), 12 deletions(-)

diff --git a/Data/IntMap/Internal.hs b/Data/IntMap/Internal.hs
index e909338..6077986 100644
--- a/Data/IntMap/Internal.hs
+++ b/Data/IntMap/Internal.hs
@@ -18,6 +18,7 @@
 -- Module      :  Data.IntMap.Internal
 -- Copyright   :  (c) Daan Leijen 2002
 --                (c) Andriy Palamarchuk 2008
+--                (c) wren romano 2016
 -- License     :  BSD-style
 -- Maintainer  :  libraries at haskell.org
 -- Stability   :  provisional
@@ -268,6 +269,15 @@ module Data.IntMap.Internal (
     , shorter
     , branchMask
     , highestBitMask
+
+    -- * Used by "IntMap.Merge.Lazy" and "IntMap.Merge.Strict"
+    , mapWhenMissing
+    , mapWhenMatched
+    , lmapWhenMissing
+    , contramapFirstWhenMatched
+    , contramapSecondWhenMatched
+    , mapGentlyWhenMissing
+    , mapGentlyWhenMatched
     ) where
 
 #if MIN_VERSION_base(4,8,0)
diff --git a/Data/Map/Merge/Lazy.hs b/Data/IntMap/Merge/Lazy.hs
similarity index 92%
copy from Data/Map/Merge/Lazy.hs
copy to Data/IntMap/Merge/Lazy.hs
index ae4f139..869c9fa 100644
--- a/Data/Map/Merge/Lazy.hs
+++ b/Data/IntMap/Merge/Lazy.hs
@@ -20,8 +20,8 @@
 
 -----------------------------------------------------------------------------
 -- |
--- Module      :  Data.Map.Merge.Lazy
--- Copyright   :  (c) David Feuer 2016
+-- Module      :  Data.IntMap.Merge.Lazy
+-- Copyright   :  (c) wren romano 2016
 -- License     :  BSD-style
 -- Maintainer  :  libraries at haskell.org
 -- Stability   :  provisional
@@ -29,7 +29,7 @@
 --
 -- This module defines an API for writing functions that merge two
 -- maps. The key functions are 'merge' and 'mergeA'.
--- Each of these can be used with several different "merge tactics".
+-- Each of these can be used with several different \"merge tactics\".
 --
 -- The 'merge' and 'mergeA' functions are shared by
 -- the lazy and strict modules. Only the choice of merge tactics
@@ -45,7 +45,7 @@
 -- inefficient in many cases and should usually be avoided. The instances
 -- for 'WhenMatched' tactics should not pose any major efficiency problems.
 
-module Data.Map.Merge.Lazy (
+module Data.IntMap.Merge.Lazy (
     -- ** Simple merge tactic types
       SimpleWhenMissing
     , SimpleWhenMatched
@@ -100,4 +100,4 @@ module Data.Map.Merge.Lazy (
     , runWhenMissing
     ) where
 
-import Data.Map.Internal
+import Data.IntMap.Internal
diff --git a/Data/Map/Merge/Strict.hs b/Data/IntMap/Merge/Strict.hs
similarity index 92%
copy from Data/Map/Merge/Strict.hs
copy to Data/IntMap/Merge/Strict.hs
index 6fcfaf8..7a82557 100644
--- a/Data/Map/Merge/Strict.hs
+++ b/Data/IntMap/Merge/Strict.hs
@@ -20,8 +20,8 @@
 
 -----------------------------------------------------------------------------
 -- |
--- Module      :  Data.Map.Merge.Strict
--- Copyright   :  (c) David Feuer 2016
+-- Module      :  Data.IntMap.Merge.Strict
+-- Copyright   :  (c) wren romano 2016
 -- License     :  BSD-style
 -- Maintainer  :  libraries at haskell.org
 -- Stability   :  provisional
@@ -29,7 +29,7 @@
 --
 -- This module defines an API for writing functions that merge two
 -- maps. The key functions are 'merge' and 'mergeA'.
--- Each of these can be used with several different "merge tactics".
+-- Each of these can be used with several different \"merge tactics\".
 --
 -- The 'merge' and 'mergeA' functions are shared by
 -- the lazy and strict modules. Only the choice of merge tactics
@@ -45,7 +45,7 @@
 -- inefficient in many cases and should usually be avoided. The instances
 -- for 'WhenMatched' tactics should not pose any major efficiency problems.
 
-module Data.Map.Merge.Strict (
+module Data.IntMap.Merge.Strict (
     -- ** Simple merge tactic types
       SimpleWhenMissing
     , SimpleWhenMatched
@@ -96,4 +96,4 @@ module Data.Map.Merge.Strict (
     , runWhenMissing
     ) where
 
-import Data.Map.Strict.Internal
+import Data.IntMap.Internal
diff --git a/Data/Map/Merge/Lazy.hs b/Data/Map/Merge/Lazy.hs
index ae4f139..466f150 100644
--- a/Data/Map/Merge/Lazy.hs
+++ b/Data/Map/Merge/Lazy.hs
@@ -29,7 +29,7 @@
 --
 -- This module defines an API for writing functions that merge two
 -- maps. The key functions are 'merge' and 'mergeA'.
--- Each of these can be used with several different "merge tactics".
+-- Each of these can be used with several different \"merge tactics\".
 --
 -- The 'merge' and 'mergeA' functions are shared by
 -- the lazy and strict modules. Only the choice of merge tactics
diff --git a/Data/Map/Merge/Strict.hs b/Data/Map/Merge/Strict.hs
index 6fcfaf8..f068c84 100644
--- a/Data/Map/Merge/Strict.hs
+++ b/Data/Map/Merge/Strict.hs
@@ -29,7 +29,7 @@
 --
 -- This module defines an API for writing functions that merge two
 -- maps. The key functions are 'merge' and 'mergeA'.
--- Each of these can be used with several different "merge tactics".
+-- Each of these can be used with several different \"merge tactics\".
 --
 -- The 'merge' and 'mergeA' functions are shared by
 -- the lazy and strict modules. Only the choice of merge tactics
diff --git a/containers.cabal b/containers.cabal
index 6671ebf..ded0854 100644
--- a/containers.cabal
+++ b/containers.cabal
@@ -45,6 +45,8 @@ Library
         Data.IntMap.Lazy
         Data.IntMap.Strict
         Data.IntMap.Internal
+        Data.IntMap.Merge.Lazy
+        Data.IntMap.Merge.Strict
         Data.IntSet.Internal
         Data.IntSet
         Data.Map



More information about the ghc-commits mailing list