From dbf6bccbf88317c51a21f137169a852f32543dda Mon Sep 17 00:00:00 2001 From: Kushagra Gupta Date: Fri, 8 Nov 2024 23:20:33 +0530 Subject: [PATCH] returning Nil on empty IntMap as done in corresponding functions for Map --- containers/src/Data/IntMap/Internal.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/containers/src/Data/IntMap/Internal.hs b/containers/src/Data/IntMap/Internal.hs index bf1508c41..eadb054d9 100644 --- a/containers/src/Data/IntMap/Internal.hs +++ b/containers/src/Data/IntMap/Internal.hs @@ -2186,7 +2186,7 @@ updateMinWithKey f t = go f' (Tip k y) = case f' k y of Just y' -> Tip k y' Nothing -> Nil - go _ Nil = error "updateMinWithKey Nil" + go _ Nil = Nil -- | \(O(\min(n,W))\). Update the value at the maximal key. -- @@ -2202,7 +2202,7 @@ updateMaxWithKey f t = go f' (Tip k y) = case f' k y of Just y' -> Tip k y' Nothing -> Nil - go _ Nil = error "updateMaxWithKey Nil" + go _ Nil = Nil data View a = View {-# UNPACK #-} !Key a !(IntMap a)