on master help sign in
+1 is faster than succ
commit1b6e42ecc6a129c137e283e21dee4c0b4e23894f authorMichael Snoyman <michael@snoyman.com> dateWed 1 Oct 2014, 07:41 (12 years ago) parent652a7a0
1 file changed+2−2
auto-update/Control/AutoUpdate.hs+2−2
auto-update/Control/AutoUpdate.hs+2−2
@@ -117,8 +117,8 @@ getCurrent settings@UpdateSettings{..} istatus = do
117117 join $ atomicModifyIORef' istatus $ turnToAuto a tid
118118 return a
119119 where
120− increment (AutoUpdated a cnt tid) = (AutoUpdated a (succ cnt) tid, Return a)
121− increment (ManualUpdates i) = (ManualUpdates (succ i), act)
120+ increment (AutoUpdated a cnt tid) = (AutoUpdated a (cnt + 1) tid, Return a)
121+ increment (ManualUpdates i) = (ManualUpdates (i + 1), act)
122122 where
123123 act = if i > updateSpawnThreshold then Spawn else Manual
124124