File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -266,9 +266,8 @@ instance (Eq k, Eq v) => Eq (HashMap k v) where
266266
267267equal :: (k -> k' -> Bool ) -> (v -> v' -> Bool )
268268 -> HashMap k v -> HashMap k' v' -> Bool
269- equal eqk eqv (HashMap s1 t1) (HashMap s2 t2)
270- | s1 == s2 = go (toList' t1 [] ) (toList' t2 [] )
271- | otherwise = False
269+ equal eqk eqv (HashMap s1 t1) (HashMap s2 t2) =
270+ (s1 == s2) && go (toList' t1 [] ) (toList' t2 [] )
272271 where
273272 -- If the two trees are the same, then their lists of 'Leaf's and
274273 -- 'Collision's read from left to right should be the same (modulo the
@@ -329,9 +328,8 @@ cmp cmpk cmpv (HashMap _ t1) (HashMap _ t2) =
329328
330329-- Same as 'equal' but doesn't compare the values.
331330equalKeys :: (k -> k' -> Bool ) -> HashMap k v -> HashMap k' v' -> Bool
332- equalKeys eq (HashMap s1 t1) (HashMap s2 t2)
333- | s1 == s2 = go (toList' t1 [] ) (toList' t2 [] )
334- | otherwise = False
331+ equalKeys eq (HashMap s1 t1) (HashMap s2 t2) =
332+ (s1 == s2) && go (toList' t1 [] ) (toList' t2 [] )
335333 where
336334 go (Leaf k1 l1 : tl1) (Leaf k2 l2 : tl2)
337335 | k1 == k2 && leafEq l1 l2
You can’t perform that action at this time.
0 commit comments