[commit: packages/containers] master: Fix unused pattern match warnings (#418) (9e5d789)

git at git.haskell.org git at git.haskell.org
Mon Apr 17 21:49:00 UTC 2017


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

On branch  : master
Link       : http://git.haskell.org/packages/containers.git/commitdiff/9e5d789c77b7252fb3fbf7a26f649b96ba20649c

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

commit 9e5d789c77b7252fb3fbf7a26f649b96ba20649c
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Tue Feb 28 13:56:58 2017 -0500

    Fix unused pattern match warnings (#418)


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

9e5d789c77b7252fb3fbf7a26f649b96ba20649c
 Data/Map/Internal.hs | 6 +++---
 Data/Set/Internal.hs | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Data/Map/Internal.hs b/Data/Map/Internal.hs
index aa1bfcb..425397e 100644
--- a/Data/Map/Internal.hs
+++ b/Data/Map/Internal.hs
@@ -764,7 +764,7 @@ insert kx0 = go kx0 kx0
     -- as the present value. We try anyway; this condition
     -- seems particularly likely to occur in 'union'.
     go :: Ord k => k -> k -> a -> Map k a -> Map k a
-    go orig !kx x Tip = singleton (lazy orig) x
+    go orig !_  x Tip = singleton (lazy orig) x
     go orig !kx x t@(Bin sz ky y l r) =
         case compare kx ky of
             LT | l' `ptrEq` l -> t
@@ -809,8 +809,8 @@ insertR :: Ord k => k -> a -> Map k a -> Map k a
 insertR kx0 = go kx0 kx0
   where
     go :: Ord k => k -> k -> a -> Map k a -> Map k a
-    go orig !kx x Tip = singleton (lazy orig) x
-    go orig !kx x t@(Bin sz ky y l r) =
+    go orig !_  x Tip = singleton (lazy orig) x
+    go orig !kx x t@(Bin _ ky y l r) =
         case compare kx ky of
             LT | l' `ptrEq` l -> t
                | otherwise -> balanceL ky y l' r
diff --git a/Data/Set/Internal.hs b/Data/Set/Internal.hs
index 3fc47ef..674bf4b 100644
--- a/Data/Set/Internal.hs
+++ b/Data/Set/Internal.hs
@@ -510,7 +510,7 @@ insert :: Ord a => a -> Set a -> Set a
 insert x0 = go x0 x0
   where
     go :: Ord a => a -> a -> Set a -> Set a
-    go orig !x Tip = singleton (lazy orig)
+    go orig !_ Tip = singleton (lazy orig)
     go orig !x t@(Bin sz y l r) = case compare x y of
         LT | l' `ptrEq` l -> t
            | otherwise -> balanceL y l' r
@@ -540,8 +540,8 @@ insertR :: Ord a => a -> Set a -> Set a
 insertR x0 = go x0 x0
   where
     go :: Ord a => a -> a -> Set a -> Set a
-    go orig !x Tip = singleton (lazy orig)
-    go orig !x t@(Bin sz y l r) = case compare x y of
+    go orig !_ Tip = singleton (lazy orig)
+    go orig !x t@(Bin _ y l r) = case compare x y of
         LT | l' `ptrEq` l -> t
            | otherwise -> balanceL y l' r
            where !l' = go orig x l



More information about the ghc-commits mailing list