From e179c0ff6c540cf237cd01f62e91340210b35d83 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 17 Feb 2021 15:12:56 +0100 Subject: [PATCH] refactor: hlint --- src/Utils/LRU.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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''