From e19dc8554723a148e6b809da4989a747f3aa925e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 2 Dec 2011 16:10:52 -0400 Subject: factor out untilTrue --- Remote/Web.hs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'Remote/Web.hs') diff --git a/Remote/Web.hs b/Remote/Web.hs index 64fcd51aa..5871ae8da 100644 --- a/Remote/Web.hs +++ b/Remote/Web.hs @@ -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 -- cgit v1.2.3