diff options
Diffstat (limited to 'Logs/MapLog.hs')
-rw-r--r-- | Logs/MapLog.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Logs/MapLog.hs b/Logs/MapLog.hs index d5bb67f68..097439ac5 100644 --- a/Logs/MapLog.hs +++ b/Logs/MapLog.hs @@ -18,6 +18,7 @@ import Data.Time.Clock.POSIX import Common import Logs.TimeStamp +import Logs.Line data TimeStamp = Unknown | Date POSIXTime deriving (Eq, Ord, Show) @@ -38,7 +39,7 @@ showMapLog fieldshower valueshower = unlines . map showpair . M.toList unwords ["0", fieldshower f, valueshower v] parseMapLog :: Ord f => (String -> Maybe f) -> (String -> Maybe v) -> String -> MapLog f v -parseMapLog fieldparser valueparser = M.fromListWith best . mapMaybe parse . lines +parseMapLog fieldparser valueparser = M.fromListWith best . mapMaybe parse . splitLines where parse line = do let (ts, rest) = splitword line |