Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data UrlRequest = UrlRequest {}
- data Cachable
- = Cachable
- | Uncachable
- | MaxAge !CInt
- data UrlState = UrlState {
- inProgress :: Map String InProgressStatus
- waitToStart :: Q String
- pipeLength :: Int
- randomJunk :: String
- data Q a = Q [a] [a]
- readQ :: Q a -> Maybe (a, Q a)
- insertQ :: a -> Q a -> Q a
- pushQ :: a -> Q a -> Q a
- addUsingPriority :: Priority -> a -> Q a -> Q a
- deleteQ :: Eq a => a -> Q a -> Q a
- elemQ :: Eq a => a -> Q a -> Bool
- emptyQ :: Q a
- nullQ :: Q a -> Bool
- data Priority
- data ConnectionError
Documentation
data UrlRequest Source #
A UrlRequest object contains a url to get, the file into which the contents at the given url should be written, the cachability of this request and the request's priority.
Instances
A UrlState object contains a map of url -> InProgressStatus, a Q of urls waiting to be started, the current pipe length and the unique junk to create unique filenames.
UrlState | |
|
Q represents a prioritised queue, with two-tier priority. The left list contains higher priority items than the right list.
Q [a] [a] |
readQ :: Q a -> Maybe (a, Q a) Source #
readQ
will try and take an element from the Q, preferring elements from
the high priority list.
addUsingPriority :: Priority -> a -> Q a -> Q a Source #
Return a function for adding an element based on the priority.
deleteQ :: Eq a => a -> Q a -> Q a Source #
deleteQ
removes any instances of a given element from the Q.
data ConnectionError Source #
Data type to represent a connection error. The following are the codes from libcurl which map to each of the constructors: * 6 -> CouldNotResolveHost : The remote host was not resolved. * 7 -> CouldNotConnectToServer : Failed to connect() to host or proxy. * 28 -> OperationTimeout: the specified time-out period was reached.
Instances
Eq ConnectionError Source # | |
Defined in Darcs.Util.Download.Request (==) :: ConnectionError -> ConnectionError -> Bool # (/=) :: ConnectionError -> ConnectionError -> Bool # | |
Read ConnectionError Source # | |
Defined in Darcs.Util.Download.Request | |
Show ConnectionError Source # | |
Defined in Darcs.Util.Download.Request showsPrec :: Int -> ConnectionError -> ShowS # show :: ConnectionError -> String # showList :: [ConnectionError] -> ShowS # |