diff options
author | Joey Hess <joey@kitenet.net> | 2010-11-22 15:46:57 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-11-22 15:46:57 -0400 |
commit | 57adb0347bf4eb71ab846a2947680a20263449a2 (patch) | |
tree | eb9df0ec57462a2a45bf2ff0d6c1d05d5677634f /Backend.hs | |
parent | fd11b5a3e5355a68f182a60eda7916d57e141366 (diff) |
hlint tweaks
Remotes.hs next, and also Backend/* and Command/*
Diffstat (limited to 'Backend.hs')
-rw-r--r-- | Backend.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Backend.hs b/Backend.hs index f24347ca8..01a7298b4 100644 --- a/Backend.hs +++ b/Backend.hs @@ -45,21 +45,21 @@ import Messages list :: Annex [Backend] list = do l <- Annex.backends -- list is cached here - if (not $ null l) + if not $ null l then return l else do bs <- Annex.supportedBackends g <- Annex.gitRepo let defaults = parseBackendList bs $ Git.configGet g "annex.backends" "" backendflag <- Annex.flagGet "backend" - let l' = if (not $ null backendflag) + let l' = if not $ null backendflag then (lookupBackendName bs backendflag):defaults else defaults Annex.backendsChange l' return l' where parseBackendList bs s = - if (null s) + if null s then bs else map (lookupBackendName bs) $ words s @@ -71,7 +71,7 @@ lookupBackendName bs s = Nothing -> error $ "unknown backend " ++ s maybeLookupBackendName :: [Backend] -> String -> Maybe Backend maybeLookupBackendName bs s = - if ((length matches) /= 1) + if 1 /= length matches then Nothing else Just $ head matches where matches = filter (\b -> s == Internals.name b) bs |