Skip to content

Commit e2f5cd3

Browse files
committed
Strict.alterFEager: Fix strictness
Fixes #383.
1 parent df780cb commit e2f5cd3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Data/HashMap/Internal/Strict.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,13 +401,13 @@ alterFEager f !k !m = (<$> f mv) $ \fres ->
401401

402402
------------------------------
403403
-- Update value
404-
Just v' -> case lookupRes of
404+
Just !v' -> case lookupRes of
405405

406406
-- Key did not exist before, insert v' under a new key
407407
Absent -> insertNewKey h k v' m
408408

409409
-- Key existed before, no hash collision
410-
Present v collPos -> v' `seq`
410+
Present v collPos ->
411411
if v `ptrEq` v'
412412
-- If the value is identical, no-op
413413
then m

0 commit comments

Comments
 (0)