ghcup-0.1.14.2: ghc toolchain installer
Copyright(c) Julian Ospald 2020
LicenseLGPL-3.0
Maintainerhasufell@hasufell.de
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

GHCup.Download

Description

Module for handling all download related functions.

Generally we support downloading via:

  • curl (default)
  • wget
  • internal downloader (only when compiled)
Synopsis

Documentation

download Source #

Arguments

:: (MonadMask m, MonadReader AppState m, MonadThrow m, MonadLogger m, MonadIO m) 
=> DownloadInfo 
-> Path Abs

destination dir

-> Maybe (Path Rel)

optional filename

-> Excepts '[DigestError, DownloadFailed] m (Path Abs) 

Tries to download from the given http or https url and saves the result in continuous memory into a file. If the filename is not provided, then we: 1. try to guess the filename from the url path 2. otherwise create a random file

The file must not exist.

downloadCached Source #

Download into tmpdir or use cached version, if it exists. If filename is omitted, infers the filename from the url.

getCurlOpts :: IO [ByteString] Source #

Get additional curl args from env. This is an undocumented option.

getWgetOpts :: IO [ByteString] Source #

Get additional wget args from env. This is an undocumented option.