Skip to content

Commit c9300f0

Browse files
committed
fix description
1 parent 7bb851f commit c9300f0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ghcide/src/Development/IDE/Core/Shake.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1357,8 +1357,9 @@ updatePositionMapping IdeState{shakeExtras = ShakeExtras{positionMapping}} Versi
13571357
-- Very important to use mapAccum here so that the tails of
13581358
-- each mapping can be shared, otherwise quadratic space is
13591359
-- used which is evident in long running sessions.
1360-
-- mapAccumWithKey is the one with smaller key accumulate in acc
1361-
EM.mapAccumWithKey (\acc _k (delta, _) -> let new = addOldDelta delta acc in (new, (delta, acc)))
1360+
-- mapAccumWithKey is the one with smaller keys accumulated in acc
1361+
-- so smaller keys can be shared.
1362+
EM.mapAccumWithKey (\acc _k (delta, _) -> let new = addDelta delta acc in (new, (delta, acc)))
13621363
zeroMapping
13631364
(EM.insert _version (shared_change, zeroMapping) mappingForUri)
13641365
shared_change = mkDelta changes

0 commit comments

Comments
 (0)