diff --git a/src/Utils/LRU.hs b/src/Utils/LRU.hs index 19ad3e0c5..2aa30a5ae 100644 --- a/src/Utils/LRU.hs +++ b/src/Utils/LRU.hs @@ -82,7 +82,7 @@ insertLRU k t newVal oldLRU@LRU{..} now | Just (_, w) <- newVal, w > lruMaximumWeight = (oldLRU, now) | Just (_, w) <- newVal = (, later) $ let (lruStore', lruWeight') = evictToSize (lruMaximumWeight - w) lruStore lruWeight - ((fromMaybe 0 . preview (_Just . _2 . _2) -> oldWeight), lruStore'') + (fromMaybe 0 . preview (_Just . _2 . _2) -> oldWeight, lruStore'') = OrdPSQ.alter (, ((t, now), ) <$> newVal) k lruStore' in oldLRU { lruStore = lruStore''