factor out untilTrue

This commit is contained in:
Joey Hess 2011-12-02 16:10:52 -04:00
parent fb68a7881f
commit e19dc85547
4 changed files with 29 additions and 38 deletions

View file

@ -71,8 +71,6 @@ checkKey key = do
then return $ Right False
else return . Right =<< checkKey' us
checkKey' :: [URLString] -> Annex Bool
checkKey' [] = return False
checkKey' (u:us) = do
checkKey' us = untilTrue us $ \u -> do
showAction $ "checking " ++ u
e <- liftIO $ Url.exists u
if e then return e else checkKey' us
liftIO $ Url.exists u