summaryrefslogtreecommitdiff
path: root/Logs/UUIDBased.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-12-15 16:59:48 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-12-15 16:59:48 -0400
commitb7e0d39abbc9a09c21c6f0103ad6c9f4547f81fe (patch)
tree89bc230e00bb09e045adfa3342e75459ef4a9ef3 /Logs/UUIDBased.hs
parent817b1936e6dac3831721e8f07400181d87f365ca (diff)
remove some partial functions
A few were too hard to get rid of, and safe since the code does check for an empty line.
Diffstat (limited to 'Logs/UUIDBased.hs')
-rw-r--r--Logs/UUIDBased.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/Logs/UUIDBased.hs b/Logs/UUIDBased.hs
index 04b12887d..b09d93f90 100644
--- a/Logs/UUIDBased.hs
+++ b/Logs/UUIDBased.hs
@@ -64,15 +64,15 @@ parseLog parser = M.fromListWith best . mapMaybe parse . lines
where
makepair v = Just (toUUID u, LogEntry ts v)
ws = words line
- u = head ws
- end = last ws
+ u = Prelude.head ws
+ t = Prelude.last ws
ts
- | tskey `isPrefixOf` end =
- pdate $ tail $ dropWhile (/= '=') end
+ | tskey `isPrefixOf` t =
+ pdate $ drop 1 $ dropWhile (/= '=') t
| otherwise = Unknown
info
| ts == Unknown = drop 1 ws
- | otherwise = drop 1 $ init ws
+ | otherwise = drop 1 $ beginning ws
pdate s = case parseTime defaultTimeLocale "%s%Qs" s of
Nothing -> Unknown
Just d -> Date $ utcTimeToPOSIXSeconds d