[commit: packages/containers] cleaned_bugfix394, master, merge-doc-target, revert-408-bugfix_394: Fix typo in error message for minimum (#350) (c027280)

git at git.haskell.org git at git.haskell.org
Mon Apr 17 21:47:04 UTC 2017


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

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

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

commit c027280354d6c13044ec6d8b0f2a5aa6de77867b
Author: Charles Cooper <cooper.charles.m at gmail.com>
Date:   Fri Dec 23 18:40:39 2016 -0500

    Fix typo in error message for minimum (#350)
    
    * Fix typo in error message for minimum
    
    * Change the error messages for maximum and minimum
    
    This message mirrors the error messages in Data.Foldable, while
    prefixing the module name to help the user a little bit.
    
    * Increase message verbosity


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

c027280354d6c13044ec6d8b0f2a5aa6de77867b
 Data/IntMap/Internal.hs | 4 ++--
 Data/Map/Internal.hs    | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Data/IntMap/Internal.hs b/Data/IntMap/Internal.hs
index 6c0efd2..0576b1e 100644
--- a/Data/IntMap/Internal.hs
+++ b/Data/IntMap/Internal.hs
@@ -425,7 +425,7 @@ instance Foldable.Foldable IntMap where
           go x (Bin _ _ l r) = go x l || go x r
   {-# INLINABLE elem #-}
   maximum = start
-    where start Nil = error "IntMap.Foldable.maximum: called with empty map"
+    where start Nil = error "Data.Foldable.maximum (for Data.IntMap): empty map"
           start (Tip _ y) = y
           start (Bin _ _ l r) = go (start l) r
 
@@ -434,7 +434,7 @@ instance Foldable.Foldable IntMap where
           go m (Bin _ _ l r) = go (go m l) r
   {-# INLINABLE maximum #-}
   minimum = start
-    where start Nil = error "IntMap.Foldable.minimum: called with empty map"
+    where start Nil = error "Data.Foldable.minimum (for Data.IntMap): empty map"
           start (Tip _ y) = y
           start (Bin _ _ l r) = go (start l) r
 
diff --git a/Data/Map/Internal.hs b/Data/Map/Internal.hs
index ca21117..8fc766d 100644
--- a/Data/Map/Internal.hs
+++ b/Data/Map/Internal.hs
@@ -4030,14 +4030,14 @@ instance Foldable.Foldable (Map k) where
           go x (Bin _ _ v l r) = x == v || go x l || go x r
   {-# INLINABLE elem #-}
   maximum = start
-    where start Tip = error "Map.Foldable.maximum: called with empty map"
+    where start Tip = error "Data.Foldable.maximum (for Data.Map): empty map"
           start (Bin _ _ v l r) = go (go v l) r
 
           go !m Tip = m
           go m (Bin _ _ v l r) = go (go (max m v) l) r
   {-# INLINABLE maximum #-}
   minimum = start
-    where start Tip = error "Map.Foldable.minumum: called with empty map"
+    where start Tip = error "Data.Foldable.minimum (for Data.Map): empty map"
           start (Bin _ _ v l r) = go (go v l) r
 
           go !m Tip = m



More information about the ghc-commits mailing list