diff options
Diffstat (limited to 'Logs')
-rw-r--r-- | Logs/Chunk/Pure.hs | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/Logs/Chunk/Pure.hs b/Logs/Chunk/Pure.hs index 09e871c38..9bbfb868c 100644 --- a/Logs/Chunk/Pure.hs +++ b/Logs/Chunk/Pure.hs @@ -5,7 +5,13 @@ - Licensed under the GNU GPL version 3 or higher. -} -module Logs.Chunk.Pure where +module Logs.Chunk.Pure + ( ChunkSize + , ChunkCount + , ChunkLog + , parseLog + , showLog + ) where import Common.Annex import Logs.MapLog @@ -21,12 +27,15 @@ parseLog :: String -> ChunkLog parseLog = parseMapLog fieldparser valueparser where fieldparser s = - let (u,sz) = separate (== ':') s + let (u,sz) = separate (== sep) s in (,) <$> pure (toUUID u) <*> readish sz valueparser = readish showLog :: ChunkLog -> String showLog = showMapLog fieldshower valueshower where - fieldshower (u, sz) = fromUUID u ++ ':' : show sz + fieldshower (u, sz) = fromUUID u ++ sep : show sz valueshower = show + +sep :: Char +sep = ':' |