diff options
author | Joey Hess <joey@kitenet.net> | 2011-07-15 12:47:14 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-07-15 12:47:14 -0400 |
commit | 6c396a256c93464d726c66a95132536941871ee8 (patch) | |
tree | 7f934c9eae22a9cfd3fb1672ebd7bf6870439c81 /Command/InitRemote.hs | |
parent | 185f0b687081f47d059cc0503f4f6b671868f753 (diff) |
finished hlint pass
Diffstat (limited to 'Command/InitRemote.hs')
-rw-r--r-- | Command/InitRemote.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Command/InitRemote.hs b/Command/InitRemote.hs index 15962ad99..9859308e5 100644 --- a/Command/InitRemote.hs +++ b/Command/InitRemote.hs @@ -24,7 +24,7 @@ import Messages command :: [Command] command = [repoCommand "initremote" (paramPair paramName $ - paramOptional $ paramRepeating $ paramKeyValue) seek + paramOptional $ paramRepeating paramKeyValue) seek "sets up a special (non-git) remote"] seek :: [CommandSeek] @@ -32,7 +32,7 @@ seek = [withWords start] start :: CommandStartWords start ws = do - when (null ws) $ needname + when (null ws) needname (u, c) <- findByName name let fullconfig = M.union config c @@ -69,7 +69,7 @@ findByName name = do maybe generate return $ findByName' name m where generate = do - uuid <- liftIO $ genUUID + uuid <- liftIO genUUID return (uuid, M.insert nameKey name M.empty) findByName' :: String -> M.Map UUID R.RemoteConfig -> Maybe (UUID, R.RemoteConfig) @@ -85,7 +85,7 @@ findByName' n m = if null matches then Nothing else Just $ head matches remoteNames :: Annex [String] remoteNames = do m <- RemoteLog.readRemoteLog - return $ catMaybes $ map ((M.lookup nameKey) . snd) $ M.toList m + return $ mapMaybe (M.lookup nameKey . snd) $ M.toList m {- find the specified remote type -} findType :: R.RemoteConfig -> Annex (R.RemoteType Annex) |