Skip to content

Commit 771b243

Browse files
committed
Add ghc 8.8.3
1 parent b948166 commit 771b243

File tree

2 files changed

+132
-0
lines changed

2 files changed

+132
-0
lines changed

Diff for: 8.8.3/ghc/ghc.nuspec

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Do not remove this test for UTF-8: if ??? doesn?t appear as greek uppercase omega letter enclosed in quotation marks, you should use an editor that supports UTF-8, not this one. -->
3+
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
4+
<metadata>
5+
<!-- Read this before publishing packages to chocolatey.org: https://github.com/chocolatey/chocolatey/wiki/CreatePackages -->
6+
<id>ghc</id>
7+
<title>GHC</title>
8+
<version>8.8.3</version>
9+
<authors>GHC Team</authors>
10+
<owners>Tamar Christina</owners>
11+
<summary>GHC is a state-of-the-art, open source, compiler and interactive environment for the functional language Haskell.</summary>
12+
<description>Highlights:
13+
• GHC supports the entire Haskell 2010 language plus a wide variety of extensions.
14+
• GHC has particularly good support for concurrency and parallelism, including support for Software Transactional Memory (STM).
15+
• GHC generates fast code, particularly for concurrent programs. Take a look at GHC's performance on The Computer Language Benchmarks Game.
16+
• GHC works on several platforms including Windows, Mac, Linux, most varieties of Unix, and several different processor architectures. There are detailed instructions for porting GHC to a new platform.
17+
• GHC has extensive optimisation capabilities, including inter-module optimisation.
18+
• GHC compiles Haskell code either directly to native code or using LLVM as a back-end. GHC can also generate C code as an intermediate target for porting to new platforms. The interactive environment compiles Haskell to bytecode, and supports execution of mixed bytecode/compiled programs.
19+
• Profiling is supported, both by time/allocation and various kinds of heap profiling.
20+
• GHC comes with several libraries, and thousands more are available on Hackage.
21+
22+
There's an important change to path handling for Windows starting with 8.6.1.
23+
These changes mean that Haskell programs are no longer constraint to `MAX_PATH`. So passing a long path to `openFile` will just work.
24+
There are a few caveats to this such as you can't access `COM` devices via `COM1` etc anymore and instead need to use the full path `\\.\COM1` etc.
25+
This is all documented https://downloads.haskell.org/~ghc/8.6.5/docs/html/users_guide/win32-dlls.html#windows-file-paths
26+
</description>
27+
<projectUrl>https://www.haskell.org/ghc/</projectUrl>
28+
<tags>ghc haskell</tags>
29+
<copyright>Copyright 2017, The University Court of the University of Glasgow.</copyright>
30+
<licenseUrl>https://www.haskell.org/ghc/license</licenseUrl>
31+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
32+
<!-- Important note about https://cdn.rawgit.com: Files are cached permanently after the first request. Use commit URLs when updating the icon. -->
33+
<iconUrl>http://upload.wikimedia.org/wikipedia/commons/thumb/1/1c/Haskell-Logo.svg/2000px-Haskell-Logo.svg.png</iconUrl>
34+
<dependencies>
35+
<dependency id="cabal" version="3.0.0.0" />
36+
</dependencies>
37+
<releaseNotes>https://github.com/ghc/ghc/blob/ghc-8.8/docs/users_guide/8.8.3-notes.rst</releaseNotes>
38+
<docsUrl>https://downloads.haskell.org/~ghc/8.8.3/docs/html/</docsUrl>
39+
<mailingListUrl>https://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</mailingListUrl>
40+
<bugTrackerUrl>https://ghc.haskell.org/trac/ghc/</bugTrackerUrl>
41+
<projectSourceUrl>https://www.haskell.org/ghc/</projectSourceUrl>
42+
</metadata>
43+
<files>
44+
<file src="tools\**" target="tools" />
45+
</files>
46+
</package>

Diff for: 8.8.3/ghc/tools/chocolateyInstall.ps1

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
$version = '8.8.3'
2+
$packageName = 'ghc'
3+
$url = 'https://downloads.haskell.org/~ghc/8.6.5/ghc-8.6.5-i386-unknown-mingw32.tar.xz'
4+
$url64 = 'https://downloads.haskell.org/~ghc/8.8.3/ghc-8.8.3-x86_64-unknown-mingw32.tar.xz'
5+
6+
$is32 = (Get-OSArchitectureWidth 32) -or $env:chocolateyForceX86 -eq 'true'
7+
8+
if($is32)
9+
{
10+
Write-Host "# # ####### ####### ### ##### #######"
11+
Write-Host "## # # # # # # # # "
12+
Write-Host "# # # # # # # # # "
13+
Write-Host "# # # # # # # # ##### "
14+
Write-Host "# # # # # # # # # "
15+
Write-Host "# ## # # # # # # # "
16+
Write-Host "# # ####### # ### ##### #######"
17+
Write-Host ""
18+
Write-Host " GHC HQ have not produced a 32 bit binary for Windows again."
19+
Write-Host " I will now install GHC 8.6.5 instead. If you find this"
20+
Write-Host " unacceptable please let them know that 32-bits is important"
21+
Write-Host " by creating an issue at https://gitlab.haskell.org/ghc/ghc/issues"
22+
Write-Host ""
23+
}
24+
25+
$binRoot = $(Split-Path -parent $MyInvocation.MyCommand.Definition)
26+
$packageFullName = Join-Path $binRoot ($packageName + '-' + $version)
27+
$binPackageDir = Join-Path $packageFullName "bin"
28+
29+
$tmpPath = Join-Path $env:chocolateyPackageFolder tmp
30+
$tarFile = $packageName + "Install"
31+
$tarPath = Join-Path $tmpPath $tarFile
32+
$tmpFile = Join-Path $binRoot ($tarFile + "~")
33+
34+
Get-ChocolateyWebFile -PackageName $packageName -FileFullPath $tarPath `
35+
-Url $url -ChecksumType sha256 -Checksum 2a8fb73080ed4335f7a172fe6cf9da1a2faa51fdb72817c50088292f497fc57a `
36+
-Url64bit $url64 -ChecksumType64 sha256 -Checksum64 bbae62018f80dd64781fa0c37ef9333ecf3c8c4fe925ec70601a54d1cccaa395
37+
Get-ChocolateyUnzip -fileFullPath $tarPath -destination $binRoot
38+
Get-ChocolateyUnzip -fileFullPath $tmpFile -destination $binRoot
39+
rm $tmpFile # Clean up temporary file
40+
41+
Install-ChocolateyPath "$binPackageDir"
42+
43+
Write-Host "Hiding shims for `'$binRoot`'."
44+
$files = get-childitem $binRoot -include *.exe -recurse
45+
46+
foreach ($file in $files) {
47+
#generate an ignore file
48+
New-Item "$file.ignore" -type file -force | Out-Null
49+
}
50+
51+
if (($null -ne $Env:GITHUB_ACTIONS) -and ("" -ne $Env:GITHUB_ACTIONS)) {
52+
Write-Host "::add-path::$binPackageDir"
53+
}
54+
55+
if (($null -ne $Env:TRAVIS) -and ("" -ne $Env:TRAVIS)) {
56+
Write-Host "Configuring Travis aliases."
57+
# We need to fix up refreshenv for Travis
58+
$rc = $Env:HOME + "/.bashrc"
59+
60+
Add-Content $rc "function refreshenv
61+
{
62+
powershell -NonInteractive - <<\EOF
63+
Import-Module -Force `"`$env:ChocolateyInstall\helpers\chocolateyProfile.psm1`"
64+
`$pref = `$ErrorActionPreference
65+
`$ErrorActionPreference = 'SilentlyContinue'
66+
Update-SessionEnvironment
67+
`$ErrorActionPreference = `$pref
68+
# Round brackets in variable names cause problems with bash
69+
Get-ChildItem env:* | %{
70+
if (!(`$_.Name.Contains('('))) {
71+
`$value = `$_.Value
72+
if (`$_.Name -eq 'PATH') {
73+
`$value = `$value -replace ';',':'
74+
}
75+
Write-Output (`"export `" + `$_.Name + `"='`" + `$value + `"'`")
76+
}
77+
} | Out-File -Encoding ascii $env:TEMP\refreshenv.sh
78+
EOF
79+
80+
source `"$env:TEMP/refreshenv.sh`"
81+
}
82+
83+
alias RefreshEnv=refreshenv"
84+
85+
Write-Host "Ok, updated ~/.bashrc, source to use refreshenv."
86+
}

0 commit comments

Comments
 (0)