HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulecabal-install-3.12.1.0Haskell2010

Distribution.Client.FetchUtils

Functions for fetching packages

  • 1 type
  • 9 values

fetching packages

3 declarations

specifically for repo packages

fetching packages asynchronously

Fork off an async action to download the given packages (by location).

The downloads are initiated in order, so you can arrange for packages that will likely be needed sooner to be earlier in the list.

The body action is passed a map from those packages (identified by their location) to a completion var for that package. So the body action should lookup the location and use waitAsyncFetchPackage to get the result.

Synchronous exceptions raised by the download actions are delivered via waitAsyncFetchPackage.

Expect to find a download in progress in the given AsyncFetchMap and wait on it to finish.

If the download failed with an exception then this will be thrown.

Note: This function is supposed to be idempotent, as our install plans can now use the same tarball for many builds, e.g. different components and/or qualified goals, and these all go through the download phase so we end up using waitAsyncFetchPackage twice on the same package. C.f. #4461.

fetching other things

1 declaration