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

GHCup.GHC

Description

 
Synopsis

Documentation

installGHCBindist Source #

Like installGHCBin, except takes the DownloadInfo as argument instead of looking it up from GHCupDownloads.

installPackedGHC Source #

Arguments

:: (MonadMask m, MonadCatch m, MonadReader env m, HasDirs env, HasPlatformReq env, HasSettings env, MonadThrow m, HasLog env, MonadIO m, MonadUnliftIO m, MonadFail m, MonadResource m) 
=> FilePath

Path to the packed GHC bindist

-> Maybe TarDir

Subdir of the archive

-> InstallDirResolved 
-> Version

The GHC version

-> Bool

Force install

-> [Text]

additional configure args for bindist

-> Excepts '[BuildFailed, UnknownArchive, TarDirDoesNotExist, DirNotEmpty, ArchiveResult, ProcessError, MergeFileTreeError] m () 

Install a packed GHC distribution. This only deals with unpacking and the GHC build system and nothing else.

installUnpackedGHC Source #

Arguments

:: (MonadReader env m, HasPlatformReq env, HasDirs env, HasSettings env, MonadThrow m, HasLog env, MonadIO m, MonadUnliftIO m, MonadMask m, MonadResource m, MonadFail m) 
=> GHCupPath

Path to the unpacked GHC bindist (where the configure script resides)

-> InstallDirResolved

Path to install to

-> Version

The GHC version

-> Bool

Force install

-> [Text]

additional configure args for bindist

-> Excepts '[ProcessError, MergeFileTreeError] m () 

Install an unpacked GHC distribution. This only deals with the GHC build system and nothing else.

installGHCBin Source #

Installs GHC into ~/.ghcup/ghc/<ver> and places the following symlinks in ~/.ghcup/bin:

  • ghc-x.y.z -> ../ghc/x.y.z/bin/ghc
  • ghc-x.y -> ../ghc/x.y.z/bin/ghc (if x.y.z is the latest x.y version)

setGHC :: (MonadReader env m, HasDirs env, HasLog env, MonadThrow m, MonadFail m, MonadIO m, MonadCatch m, MonadMask m, MonadUnliftIO m) => GHCTargetVersion -> SetGHC -> Maybe FilePath -> Excepts '[NotInstalled] m GHCTargetVersion Source #

Set GHC symlinks in ~/.ghcup/bin for the requested GHC version. The behavior depends on SetGHC:

  • SetGHCOnly: ~/.ghcup/bin/ghc -> ~/.ghcup/ghc/<ver>/bin/ghc
  • SetGHC_XY: ~/.ghcup/bin/ghc-X.Y -> ~/.ghcup/ghc/<ver>/bin/ghc
  • SetGHC_XYZ: ~/.ghcup/bin/ghc-<ver> -> ~/.ghcup/ghc/<ver>/bin/ghc

Additionally creates a ~/.ghcup/share -> ~/.ghcup/ghc/<ver>/share symlink for SetGHCOnly constructor.

rmGHCVer :: (MonadReader env m, HasDirs env, MonadThrow m, HasLog env, MonadIO m, MonadFail m, MonadCatch m, MonadMask m, MonadUnliftIO m) => GHCTargetVersion -> Excepts '[NotInstalled, UninstallFailed] m () Source #

Delete a ghc version and all its symlinks.

This may leave GHCup without a "set" version. Will try to fix the ghc-x.y symlink after removal (e.g. to an older version).

postGHCInstall :: (MonadReader env m, HasDirs env, HasLog env, MonadThrow m, MonadFail m, MonadIO m, MonadCatch m, MonadMask m, MonadUnliftIO m) => GHCTargetVersion -> Excepts '[NotInstalled] m () Source #

Creates ghc-x.y.z and ghc-x.y symlinks. This is used for both installing from source and bindist.