This commit is contained in:
Joey Hess 2011-11-11 01:52:58 -04:00
parent b327227ba5
commit 637b5feb45
26 changed files with 71 additions and 102 deletions

View file

@ -55,7 +55,7 @@ showLog shower = unlines . map showpair . M.toList
unwords [fromUUID k, shower v]
parseLog :: (String -> Maybe a) -> String -> Log a
parseLog parser = M.fromListWith best . catMaybes . map parse . lines
parseLog parser = M.fromListWith best . mapMaybe parse . lines
where
parse line
| null ws = Nothing