aboutsummaryrefslogtreecommitdiff
path: root/Types/Remote.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2014-12-11 15:32:42 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2014-12-11 15:33:42 -0400
commitc4ff79b1a460a3526c6772ab754cb34e5f7f3dd2 (patch)
tree80bea71f1d453348cb2d0a92ce10e463aab9259e /Types/Remote.hs
parent4e88f7e9af6a776347649047f2473e470a729ed9 (diff)
Expand checkurl to support recommended filename, and multi-file-urls
This commit was sponsored by an anonymous bitcoiner.
Diffstat (limited to 'Types/Remote.hs')
-rw-r--r--Types/Remote.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Types/Remote.hs b/Types/Remote.hs
index baa857906..4d17abf95 100644
--- a/Types/Remote.hs
+++ b/Types/Remote.hs
@@ -25,6 +25,7 @@ import Types.UUID
import Types.GitConfig
import Types.Availability
import Types.Creds
+import Types.UrlContents
import Config.Cost
import Utility.Metered
import Git.Types
@@ -104,11 +105,10 @@ data RemoteA a = Remote {
getInfo :: a [(String, String)],
-- Some remotes can download from an url (or uri).
claimUrl :: Maybe (URLString -> a Bool),
- -- Checks that the url is accessible, and gets the size of its
- -- content. Returns Nothing if the url is accessible, but
- -- its size cannot be determined inexpensively.
+ -- Checks that the url is accessible, and gets information about
+ -- its contents, without downloading the full content.
-- Throws an exception if the url is inaccessible.
- checkUrl :: URLString -> a (Maybe Integer)
+ checkUrl :: Maybe (URLString -> a UrlContents)
}
instance Show (RemoteA a) where