add a UUIDDesc type containing a ByteString
Groundwork for handling uuid.log using ByteString
This commit is contained in:
parent
b781fbcccf
commit
894716512d
21 changed files with 94 additions and 74 deletions
|
@ -150,13 +150,13 @@ showLog outputter cs = forM_ cs $ \c -> do
|
|||
sequence_ $ compareChanges (outputter keyname)
|
||||
[(changetime c, new, old)]
|
||||
|
||||
mkOutputter :: M.Map UUID String -> TimeZone -> LogOptions -> FilePath -> Outputter
|
||||
mkOutputter :: UUIDDescMap -> TimeZone -> LogOptions -> FilePath -> Outputter
|
||||
mkOutputter m zone o file
|
||||
| rawDateOption o = normalOutput lookupdescription file show
|
||||
| gourceOption o = gourceOutput lookupdescription file
|
||||
| otherwise = normalOutput lookupdescription file (showTimeStamp zone)
|
||||
where
|
||||
lookupdescription u = fromMaybe (fromUUID u) $ M.lookup u m
|
||||
lookupdescription u = maybe (fromUUID u) (fromUUIDDesc) (M.lookup u m)
|
||||
|
||||
normalOutput :: (UUID -> String) -> FilePath -> (POSIXTime -> String) -> Outputter
|
||||
normalOutput lookupdescription file formattime logchange ts us =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue