darcs-2.8.4: a distributed, interactive, smart revision control system

Safe Haskell | Safe-Inferred

URL.Request

Synopsis

- data UrlRequest = UrlRequest {
  - url :: String
  - file :: FilePath
  - cachable :: Cachable
  - priority :: Priority
  }
- data Cachable
  - = Cachable
  - | Uncachable
  - | MaxAge !CInt
- data UrlState = UrlState {
  - inProgress :: Map String (FilePath, [FilePath], Cachable)
  - 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
- deleteQ :: Eq a => a -> Q a -> Q a
- elemQ :: Eq a => a -> Q a -> Bool
- emptyQ :: Q a
- nullQ :: Q a -> Bool
- data Priority
  - = High
  - | Low
- data ConnectionError
  - = CouldNotResolveHost
  - | CouldNotConnectToServer
  - | OperationTimeout

# Documentation

data UrlRequest

Constructors

UrlRequest |
Fields url :: String file :: FilePath cachable :: Cachable priority :: Priority

data Cachable

Constructors

Cachable |
Uncachable |
MaxAge !CInt |

Instances

Eq Cachable |
Show Cachable |

data UrlState

Constructors

UrlState |
Fields inProgress :: Map String (FilePath, [FilePath], Cachable) waitToStart :: Q String pipeLength :: Int randomJunk :: String

data Q a

Constructors

Q [a] [a] |

readQ :: Q a -> Maybe (a, Q a)

insertQ :: a -> Q a -> Q a

pushQ :: 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

Constructors

High |
Low |

Instances

Eq Priority |

data ConnectionError

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.

Constructors

CouldNotResolveHost |
CouldNotConnectToServer |
OperationTimeout |

Instances

Eq ConnectionError |
Read ConnectionError |
Show ConnectionError |