This depends on the 7-Zip. You must add the 7z to the $Env:Path
.
Download and load ghcups to PowerShell.
> Install-Module ghcups
> Import-Module ghcups
Confirm its info.
> Get-Module ghcups
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Manifest 1.0 ghcups {Clear-Cabal, Clear-Ghc, Install-Cabal, Install-Ghc...}
Show help. Add the -Full
option for more details.
> Get-Help Set-Ghc
NAME
Set-Ghc
SYNOPSIS
Sets the version or variant of GHC to the Path environment variable of the current session.
SYNTAX
Set-Ghc [-Ghc] <String> [<CommonParameters>]
DESCRIPTION
RELATED LINKS
ghcups.yaml is the local configuration file. ghcups searches it in the current directory and its parents recursively until $Env:USERPROFILE
or the root. The user global configuration file is $Env:APPDATA
\ghcups\config.yaml, and the system global one is $Env:ProgramData
\ghcups\config.yaml.
This is a sample of ghcups.yaml and config.yaml.
ghc:
HEAD: somewhere\directory\which\contains\ghc
fix-some-issue: other\directory
cabal:
HEAD: somewhere\directory\which\contains\cabal
Write-GhcupsConfigTemplate
function creates ghcups.yaml with the template.
When you want to check the loaded configuration, use Show-GhcupsConfig
function.
You can set $Env:GhcupsInstall
to specify the directory where GHCs and Cabals are installed. The default is $Env:APPDATA
\ghcups.
Install-Ghc
- Installs the specified GHC.
Uninstall-Ghc
- Uninstalls the specified GHC.
Set-Ghc
- Sets the version or variant of GHC to the Path environment variable of the current session.
Clear-Ghc
- Removes all GHC values from the Path environment variable of the current session.
Show-Ghc
- Shows the GHCs which are specified by the ghcups.yaml and config.yaml, which is installed by the Ghcups and which is not yet installed..
Install-Cabal
- Installs the specified Cabal.
Uninstall-Cabal
- Uninstalls the specified Cabal.
Set-Cabal
- Sets the version or variant of Cabal to the Path environment variable of the current session.
Clear-Cabal
- Removes all Cabal values from the Path environment variable of the current session.
Show-Cabal
- Shows the Cabals which is specified by the ghcups.yaml and config.yaml, which is installed by the Ghcups and which is not yet installed..
Write-GhcupsConfigTemplate
- Creates the ghcups.yaml with the default contents.
Show-GhcupsConfig
- Shows the loaded configurations which are re-generated to YAML.