[commit: packages/containers] cleaned_bugfix394, master, merge-doc-target, merge-fixes-5.9, merge-restrict-fix-5.8, revert-408-bugfix_394: Actually define the (<$) method (ec0fdbb)

git at git.haskell.org git at git.haskell.org
Mon Apr 17 21:44:22 UTC 2017


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

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

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

commit ec0fdbbeda7bd0265935ecb073c4e2544d4a9799
Author: David Feuer <David.Feuer at gmail.com>
Date:   Mon Jul 25 12:01:26 2016 -0400

    Actually define the (<$) method
    
    Accidentally defined a separate `(<$)` function for `Data.Map`.
    
    Also, fix unused binding warnings.


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

ec0fdbbeda7bd0265935ecb073c4e2544d4a9799
 Data/IntMap/Base.hs | 2 +-
 Data/Map/Base.hs    | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/Data/IntMap/Base.hs b/Data/IntMap/Base.hs
index 2a735bb..6fcca50 100644
--- a/Data/IntMap/Base.hs
+++ b/Data/IntMap/Base.hs
@@ -2100,7 +2100,7 @@ instance Functor IntMap where
 #ifdef __GLASGOW_HASKELL__
     a <$ Bin p m l r = Bin p m (a <$ l) (a <$ r)
     a <$ Tip k _     = Tip k a
-    a <$ Nil         = Nil
+    _ <$ Nil         = Nil
 #endif
 
 {--------------------------------------------------------------------
diff --git a/Data/Map/Base.hs b/Data/Map/Base.hs
index 4157c17..792206b 100644
--- a/Data/Map/Base.hs
+++ b/Data/Map/Base.hs
@@ -318,6 +318,7 @@ import Data.Utils.BitUtil (wordSize)
 
 #if __GLASGOW_HASKELL__
 import GHC.Exts (build)
+import Data.Functor ((<$))
 #if USE_MAGIC_PROXY
 import GHC.Exts (Proxy#, proxy# )
 #endif
@@ -3028,9 +3029,9 @@ instance (Ord k, Ord v) => Ord (Map k v) where
 --------------------------------------------------------------------}
 instance Functor (Map k) where
   fmap f m  = map f m
-#if __GLASGOW_HASKELL__
-a <$ Tip = Tip
-a <$ (Bin sx kx _ l r) = Bin sx kx a (a <$ l) (a <$ r)
+#ifdef __GLASGOW_HASKELL__
+  _ <$ Tip = Tip
+  a <$ (Bin sx kx _ l r) = Bin sx kx a (a <$ l) (a <$ r)
 #endif
 
 instance Traversable (Map k) where



More information about the ghc-commits mailing list