| Copyright | (c) Julian Ospald 2020 |
|---|---|
| License | LGPL-3.0 |
| Maintainer | hasufell@hasufell.de |
| Stability | experimental |
| Portability | portable |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
GHCup.HLS
Description
Synopsis
- data HLSVer
- installHLSBindist :: (MonadMask m, MonadCatch m, MonadReader env m, HasPlatformReq env, HasDirs env, HasSettings env, HasLog env, MonadResource m, MonadIO m, MonadUnliftIO m, MonadFail m) => DownloadInfo -> Version -> InstallDir -> Bool -> Excepts '[AlreadyInstalled, CopyError, DigestError, ContentLengthError, GPGError, DownloadFailed, NoDownload, NotInstalled, UnknownArchive, TarDirDoesNotExist, ArchiveResult, FileAlreadyExistsError, ProcessError, DirNotEmpty, UninstallFailed, MergeFileTreeError] m ()
- isLegacyHLSBindist :: FilePath -> IO Bool
- installHLSUnpacked :: (MonadMask m, MonadUnliftIO m, MonadReader env m, MonadFail m, HasLog env, HasDirs env, HasSettings env, MonadCatch m, MonadIO m, MonadResource m, HasPlatformReq env) => FilePath -> InstallDirResolved -> Version -> Bool -> Excepts '[ProcessError, CopyError, FileAlreadyExistsError, NotInstalled, MergeFileTreeError] m ()
- installHLSUnpackedLegacy :: (MonadReader env m, MonadFail m, HasLog env, MonadCatch m, MonadIO m) => FilePath -> InstallDirResolved -> Version -> Bool -> Excepts '[CopyError, FileAlreadyExistsError] m ()
- installHLSBin :: (MonadMask m, MonadCatch m, MonadReader env m, HasPlatformReq env, HasGHCupInfo env, HasDirs env, HasSettings env, HasLog env, MonadResource m, MonadIO m, MonadUnliftIO m, MonadFail m) => Version -> InstallDir -> Bool -> Excepts '[AlreadyInstalled, CopyError, DigestError, ContentLengthError, GPGError, DownloadFailed, NoDownload, NotInstalled, UnknownArchive, TarDirDoesNotExist, ArchiveResult, FileAlreadyExistsError, ProcessError, DirNotEmpty, UninstallFailed, MergeFileTreeError] m ()
- compileHLS :: (MonadMask m, MonadCatch m, MonadReader env m, HasDirs env, HasSettings env, HasPlatformReq env, HasGHCupInfo env, HasLog env, MonadResource m, MonadIO m, MonadUnliftIO m, MonadFail m) => HLSVer -> [Version] -> Maybe Int -> Maybe [VersionPattern] -> InstallDir -> Maybe (Either FilePath URI) -> Maybe URI -> Bool -> Maybe (Either FilePath [URI]) -> [Text] -> Excepts '[NoDownload, GPGError, DownloadFailed, DigestError, ContentLengthError, UnknownArchive, TarDirDoesNotExist, ArchiveResult, BuildFailed, NotInstalled] m Version
- setHLS :: (MonadReader env m, HasDirs env, HasLog env, MonadIO m, MonadMask m, MonadFail m, MonadUnliftIO m) => Version -> SetHLS -> Maybe FilePath -> Excepts '[NotInstalled] m ()
- unsetHLS :: (MonadMask m, MonadReader env m, HasDirs env, MonadIO m) => m ()
- rmHLSVer :: (MonadMask m, MonadReader env m, HasDirs env, MonadThrow m, HasLog env, MonadIO m, MonadFail m, MonadCatch m, MonadUnliftIO m) => Version -> Excepts '[NotInstalled, UninstallFailed] m ()
- getCabalVersion :: (MonadIO m, MonadFail m) => FilePath -> m Version
Documentation
Constructors
| SourceDist Version | |
| GitDist GitBranch | |
| HackageDist Version | |
| RemoteDist URI |
Arguments
| :: (MonadMask m, MonadCatch m, MonadReader env m, HasPlatformReq env, HasDirs env, HasSettings env, HasLog env, MonadResource m, MonadIO m, MonadUnliftIO m, MonadFail m) | |
| => DownloadInfo | |
| -> Version | |
| -> InstallDir | isolated install path, if user passed any |
| -> Bool | Force install |
| -> Excepts '[AlreadyInstalled, CopyError, DigestError, ContentLengthError, GPGError, DownloadFailed, NoDownload, NotInstalled, UnknownArchive, TarDirDoesNotExist, ArchiveResult, FileAlreadyExistsError, ProcessError, DirNotEmpty, UninstallFailed, MergeFileTreeError] m () |
Like 'installHLSBin, except takes the DownloadInfo as
argument instead of looking it up from GHCupDownloads.
Arguments
| :: (MonadMask m, MonadUnliftIO m, MonadReader env m, MonadFail m, HasLog env, HasDirs env, HasSettings env, MonadCatch m, MonadIO m, MonadResource m, HasPlatformReq env) | |
| => FilePath | Path to the unpacked hls bindist (where the executable resides) |
| -> InstallDirResolved | Path to install to |
| -> Version | |
| -> Bool | |
| -> Excepts '[ProcessError, CopyError, FileAlreadyExistsError, NotInstalled, MergeFileTreeError] m () |
Install an unpacked hls distribution.
installHLSUnpackedLegacy Source #
Arguments
| :: (MonadReader env m, MonadFail m, HasLog env, MonadCatch m, MonadIO m) | |
| => FilePath | Path to the unpacked hls bindist (where the executable resides) |
| -> InstallDirResolved | Path to install to |
| -> Version | |
| -> Bool | is it a force install |
| -> Excepts '[CopyError, FileAlreadyExistsError] m () |
Install an unpacked hls distribution (legacy).
installHLSBin :: (MonadMask m, MonadCatch m, MonadReader env m, HasPlatformReq env, HasGHCupInfo env, HasDirs env, HasSettings env, HasLog env, MonadResource m, MonadIO m, MonadUnliftIO m, MonadFail m) => Version -> InstallDir -> Bool -> Excepts '[AlreadyInstalled, CopyError, DigestError, ContentLengthError, GPGError, DownloadFailed, NoDownload, NotInstalled, UnknownArchive, TarDirDoesNotExist, ArchiveResult, FileAlreadyExistsError, ProcessError, DirNotEmpty, UninstallFailed, MergeFileTreeError] m () Source #
Installs hls binaries haskell-language-server-<ghcver>
into ~/.ghcup/bin/, as well as haskell-languager-server-wrapper.
Arguments
| :: (MonadMask m, MonadCatch m, MonadReader env m, HasDirs env, HasSettings env, HasPlatformReq env, HasGHCupInfo env, HasLog env, MonadResource m, MonadIO m, MonadUnliftIO m, MonadFail m) | |
| => HLSVer | |
| -> [Version] | |
| -> Maybe Int | |
| -> Maybe [VersionPattern] | |
| -> InstallDir | |
| -> Maybe (Either FilePath URI) | |
| -> Maybe URI | |
| -> Bool | |
| -> Maybe (Either FilePath [URI]) | patches |
| -> [Text] | additional args to cabal install |
| -> Excepts '[NoDownload, GPGError, DownloadFailed, DigestError, ContentLengthError, UnknownArchive, TarDirDoesNotExist, ArchiveResult, BuildFailed, NotInstalled] m Version |
setHLS :: (MonadReader env m, HasDirs env, HasLog env, MonadIO m, MonadMask m, MonadFail m, MonadUnliftIO m) => Version -> SetHLS -> Maybe FilePath -> Excepts '[NotInstalled] m () Source #
Set the haskell-language-server symlinks.
rmHLSVer :: (MonadMask m, MonadReader env m, HasDirs env, MonadThrow m, HasLog env, MonadIO m, MonadFail m, MonadCatch m, MonadUnliftIO m) => Version -> Excepts '[NotInstalled, UninstallFailed] m () Source #
Delete a hls version. Will try to fix the hls symlinks after removal (e.g. setting it to an older version).