[Ubuntu] Rework haskell.sh to install Cabal using GHCup (#2636)

* reworked haskell installation

* added comment

* resolved comments and added symlink

* fixed haskell.sh

* update haskell.sh

* update installation

* added error suppressing

* reverted ghc intallation

* added comments

Co-authored-by: Nikita Bykov <v-nibyko@microsoft.com>
This commit is contained in:
Nikita Bykov
2021-02-19 10:20:15 +03:00
committed by GitHub
parent c881c3cab7
commit 2c96d280ed
4 changed files with 30 additions and 7 deletions

View File

@@ -219,6 +219,12 @@ function Get-GHCVersion {
return "GHC $ghcVersion"
}
function Get-GHCupVersion {
$(ghcup --version) -match "version v(?<version>\d+(\.\d+){2,})" | Out-Null
$ghcVersion = $Matches.version
return "GHCup $ghcVersion"
}
function Get-CabalVersion {
$(cabal --version | Out-String) -match "cabal-install version (?<version>\d+\.\d+\.\d+\.\d+)" | Out-Null
$cabalVersion = $Matches.version