Skip to content

Commit

Permalink
Strict.alterFEager: Fix strictness
Browse files Browse the repository at this point in the history
Fixes #383.
  • Loading branch information
sjakobi committed Mar 20, 2022
1 parent c79685a commit 546b141
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Data/HashMap/Internal/Strict.hs
Original file line number Diff line number Diff line change
Expand Up @@ -401,13 +401,13 @@ alterFEager f !k !m = (<$> f mv) $ \fres ->

------------------------------
-- Update value
Just v' -> case lookupRes of
Just !v' -> case lookupRes of

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

-- Key existed before, no hash collision
Present v collPos -> v' `seq`
Present v collPos ->
if v `ptrEq` v'
-- If the value is identical, no-op
then m
Expand Down

0 comments on commit 546b141

Please sign in to comment.