summaryrefslogtreecommitdiff
path: root/Logs/Presence.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-03-16 01:59:07 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-03-16 01:59:07 -0400
commit184a69171d5d983ee2f08cce28011d235f44cc5c (patch)
treeff85fc620618b55c8cbed0d8c99212e73004f5b5 /Logs/Presence.hs
parentc0c9991c9f5322aef05f4c97d2c3f3bdc3101e46 (diff)
removed another 10 lines via ifM
Diffstat (limited to 'Logs/Presence.hs')
-rw-r--r--Logs/Presence.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/Logs/Presence.hs b/Logs/Presence.hs
index 372af37d5..933426718 100644
--- a/Logs/Presence.hs
+++ b/Logs/Presence.hs
@@ -99,10 +99,9 @@ type LogMap = M.Map String LogLine
{- Inserts a log into a map of logs, if the log has better (ie, newer)
- information than the other logs in the map -}
mapLog :: LogLine -> LogMap -> LogMap
-mapLog l m =
- if better
- then M.insert i l m
- else m
+mapLog l m
+ | better = M.insert i l m
+ | otherwise = m
where
better = maybe True newer $ M.lookup i m
newer l' = date l' <= date l