on master help sign in
Remove space leaks in a more robust way (#578)
e16e841Neil Mitchell
src/Development/IDE/Core/Shake.hs+1−1
@@ -541,7 +541,7 @@ withProgress var file = actionBracket (f succ) (const $ f pred) . const
541 -- This functions are deliberately eta-expanded to avoid space leaks.
541 -- This functions are deliberately eta-expanded to avoid space leaks.
542 -- Do not remove the eta-expansion without profiling a session with at
542 -- Do not remove the eta-expansion without profiling a session with at
543 -- least 1000 modifications.
543 -- least 1000 modifications.
544− where f shift = modifyVar_ var $ \x -> return (HMap.alter (\x -> Just (shift (fromMaybe 0 x))) file x)
544+ where f shift = modifyVar_ var $ \x -> evaluate $ HMap.alter (\x -> Just $! shift (fromMaybe 0 x)) file x
545
545
546
546
547defineEarlyCutoff
547defineEarlyCutoff