diff options
author | Joey Hess <joey@kitenet.net> | 2011-11-11 01:52:58 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-11-11 01:52:58 -0400 |
commit | 637b5feb45013f69f3aacbafeb796de666d3faa3 (patch) | |
tree | 17e5506c3715be46318d15dd76ec474641faffe2 /Logs | |
parent | b327227ba596d4fc5012138d03390c3eb861b808 (diff) |
lint
Diffstat (limited to 'Logs')
-rw-r--r-- | Logs/Remote.hs | 2 | ||||
-rw-r--r-- | Logs/Trust.hs | 4 | ||||
-rw-r--r-- | Logs/UUID.hs | 2 | ||||
-rw-r--r-- | Logs/UUIDBased.hs | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/Logs/Remote.hs b/Logs/Remote.hs index e2b04bf47..8d15f3151 100644 --- a/Logs/Remote.hs +++ b/Logs/Remote.hs @@ -30,7 +30,7 @@ remoteLog = "remote.log" {- Adds or updates a remote's config in the log. -} configSet :: UUID -> RemoteConfig -> Annex () configSet u c = do - ts <- liftIO $ getPOSIXTime + ts <- liftIO getPOSIXTime Annex.Branch.change remoteLog $ showLog showConfig . changeLog ts u c . parseLog parseConfig diff --git a/Logs/Trust.hs b/Logs/Trust.hs index 8c4507dcb..cb91861fd 100644 --- a/Logs/Trust.hs +++ b/Logs/Trust.hs @@ -47,7 +47,7 @@ parseTrust :: String -> Maybe TrustLevel parseTrust s | length w > 0 = Just $ parse $ head w -- back-compat; the trust.log used to only list trusted repos - | otherwise = Just $ Trusted + | otherwise = Just Trusted where w = words s parse "1" = Trusted @@ -62,7 +62,7 @@ showTrust Trusted = "1" {- Changes the trust level for a uuid in the trustLog. -} trustSet :: UUID -> TrustLevel -> Annex () trustSet uuid@(UUID _) level = do - ts <- liftIO $ getPOSIXTime + ts <- liftIO getPOSIXTime Annex.Branch.change trustLog $ showLog showTrust . changeLog ts uuid level . parseLog parseTrust Annex.changeState $ \s -> s { Annex.trustmap = Nothing } diff --git a/Logs/UUID.hs b/Logs/UUID.hs index 77cfb5ce0..da611d7bf 100644 --- a/Logs/UUID.hs +++ b/Logs/UUID.hs @@ -34,7 +34,7 @@ logfile = "uuid.log" {- Records a description for a uuid in the log. -} describeUUID :: UUID -> String -> Annex () describeUUID uuid desc = do - ts <- liftIO $ getPOSIXTime + ts <- liftIO getPOSIXTime Annex.Branch.change logfile $ showLog id . changeLog ts uuid desc . parseLog Just diff --git a/Logs/UUIDBased.hs b/Logs/UUIDBased.hs index 9609d7321..42908ab1d 100644 --- a/Logs/UUIDBased.hs +++ b/Logs/UUIDBased.hs @@ -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 |