From 771052a85e3a000911e8a438012e61b3caf9c1a8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 16 Mar 2012 12:28:17 -0400 Subject: optimize monadic || (||) used applicative style runs both conditions rather than short circuiting. Add an orM that properly short-circuits. --- Utility/Url.hs | 4 ---- 1 file changed, 4 deletions(-) (limited to 'Utility/Url.hs') diff --git a/Utility/Url.hs b/Utility/Url.hs index 8a8d732a3..86d66d83b 100644 --- a/Utility/Url.hs +++ b/Utility/Url.hs @@ -9,7 +9,6 @@ module Utility.Url ( URLString, check, exists, - canDownload, download, get ) where @@ -44,9 +43,6 @@ exists url = where size = liftM Prelude.read . lookupHeader HdrContentLength . rspHeaders -canDownload :: IO Bool -canDownload = (||) <$> inPath "wget" <*> inPath "curl" - {- Used to download large files, such as the contents of keys. - - Uses wget or curl program for its progress bar. (Wget has a better one, -- cgit v1.2.3