# GHC 9.8.1-alpha2 is now available

**URL:** <https://discourse.haskell.org/t/ghc-9-8-1-alpha2-is-now-available/7258>\
**Category:** Announcements\
**Created:** [August 10, 2023, 3:10pm UTC](https://discourse.haskell.org/t/ghc-9-8-1-alpha2-is-now-available/7258 "2023-08-10T15:10:04Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![bgamari](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/bgamari/32/3599_2.png) [@bgamari](https://discourse.haskell.org/u/bgamari)\
**Post date:** [August 10, 2023, 3:10pm UTC](https://discourse.haskell.org/t/ghc-9-8-1-alpha2-is-now-available/7258/1 "2023-08-10T15:10:04Z")

</div>

The GHC developers are very pleased to announce the availability of the  
second alpha prerelease of GHC 9.8.1. Binary distributions, source  
distributions, and documentation are available at [downloads.haskell.org](https://downloads.haskell.org/ghc/9.8.1-alpha2).

GHC 9.8 will bring a number of new features and improvements, including:

- Preliminary support the [`TypeApplications` language extension](https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0425-decl-invis-binders.rst),  
allowing types to be bound in type declarations.

- Support for the [`ExtendedLiterals` extension](https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0451-sized-literals.rst), providing  
more consistent support for non-word-sized numeric literals in the surface  
language

- Improved rewrite rule matching behavior, allowing limited matching of  
higher-order patterns

- Better support for user-defined warnings by way of the [`WARNING`  
pragma](https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0541-warning-pragmas-with-categories.rst)

- The introduction of the new [`GHC.TypeError.Unsatisfiable`](https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0433-unsatisfiable.rst)  
constraint, allowing more predictable user-defined type errors

- Implementation of the [export deprecation proposal](https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0134-deprecating-exports-proposal.rst),  
allowing module exports to be marked with `DEPRECATE` pragmas

- The addition of [build semaphore support](https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0540-jsem.rst) for parallel compilation,  
allowing better use of parallelism across GHC builds

- More efficient representation of info table provenance information,  
reducing binary sizes by nearly 80% in some cases when  
`-finfo-table-map` is in use

A full accounting of changes can be found in the [release notes](https://downloads.haskell.org/ghc/9.8.1-alpha2/docs/users_guide/9.8.1-notes.html).  
This alpha includes roughly two dozen bug-fixes relative to alpha 1.

We would like to thank GitHub, IOG, the Zw3rk stake pool,  
Well-Typed, Tweag I/O, Serokell, Equinix, SimSpace, the Haskell  
Foundation, and other anonymous contributors whose on-going financial  
and in-kind support has facilitated GHC maintenance and release  
management over the years. Finally, this release would not have been  
possible without the hundreds of open-source contributors whose work  
comprise this release.

As always, do give this release a try and open a [ticket](https://gitlab.haskell.org/ghc/ghc/-/issues/new) if you see  
anything amiss.

---

<div class="post-metadata">

**Author:** ![mpilgrem](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/mpilgrem/32/2529_2.png) [@mpilgrem](https://discourse.haskell.org/u/mpilgrem)\
**Post date:** [August 10, 2023, 7:07pm UTC](https://discourse.haskell.org/t/ghc-9-8-1-alpha2-is-now-available/7258/2 "2023-08-10T19:07:43Z")

</div>

EDIT: It was, indeed, ‘just me’. Thanks for the responses.

I having difficulty unpacking [https://downloads.haskell.org/ghc/9.8.1-alpha2/ghc-9.8.0.20230809-x86\_64-unknown-mingw32.tar.xz](https://downloads.haskell.org/ghc/9.8.1-alpha2/ghc-9.8.0.20230809-x86_64-unknown-mingw32.tar.xz) on Windows 11 (with Long Filepaths enabled) with 7-Zip 23.01. I get (`t` is test integrity of archive):

```nohighlight
&"C:\Program Files\7-Zip\7z.exe" t ghc-9.8.0.20230809-x86_64-unknown-mingw32.tar.xz

7-Zip 23.01 (x64) : Copyright (c) 1999-2023 Igor Pavlov : 2023-06-20

Scanning the drive for archives:
1 file, 122943861 bytes (118 MiB)

Testing archive: ghc-9.8.0.20230809-x86_64-unknown-mingw32.tar.xz
--
Path = ghc-9.8.0.20230809-x86_64-unknown-mingw32.tar.xz
Type = xz
Method = LZMA2:26
Characteristics = BlockPackSize BlockUnpackSize

ERROR: Unexpected end of data : ghc-9.8.0.20230809-x86_64-unknown-mingw32.tar

Sub items Errors: 1

Archives with Errors: 1

Sub items Errors: 1

```

Can anyone here reproduce that problem? If it is not ‘just me’, I’ll raise an issue.

---

<div class="post-metadata">

**Author:** ![bgamari](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/bgamari/32/3599_2.png) [@bgamari](https://discourse.haskell.org/u/bgamari)\
**Post date:** [August 10, 2023, 7:12pm UTC](https://discourse.haskell.org/t/ghc-9-8-1-alpha2-is-now-available/7258/3 "2023-08-10T19:12:10Z")

</div>

Interesting, can you confirm that the `sha256sum` of the archive is as follows:

```haskell
$ sha256sum ghc-9.8.0.20230809-x86_64-unknown-mingw32.tar.xz
eadf5f37adf2ed127c896035908a1b25c0a9cd8d1b2706feb9cde44d453fe911 ghc-9.8.0.20230809-x86_64-unknown-mingw32.tar.xz

```

I am able to extract this archive.

---

<div class="post-metadata">

**Author:** ![nonexistent](https://avatars.discourse-cdn.com/v4/letter/n/d07c76/32.png) [@nonexistent](https://discourse.haskell.org/u/nonexistent)\
**Post date:** [August 10, 2023, 7:14pm UTC](https://discourse.haskell.org/t/ghc-9-8-1-alpha2-is-now-available/7258/4 "2023-08-10T19:14:26Z")

</div>

I also have no issues extracting the archive (sha256 matches above), with 7-Zip 23.01 on Win11

---

<div class="post-metadata">

**Author:** ![mpilgrem](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/mpilgrem/32/2529_2.png) [@mpilgrem](https://discourse.haskell.org/u/mpilgrem)\
**Post date:** [August 10, 2023, 7:15pm UTC](https://discourse.haskell.org/t/ghc-9-8-1-alpha2-is-now-available/7258/5 "2023-08-10T19:15:19Z")

</div>

Something is up, because I get:

```nohighlight
(Get-FileHash ghc-9.8.0.20230809-x86_64-unknown-mingw32.tar.xz -Algorithm SHA256).Hash.ToLower()
58959fc994e03cd4175d603a5640708b027b8827adf8e5575f635c8e1f0aad7c

```

I’ll try downloading the file again …

---

<div class="post-metadata">

**Author:** ![bgamari](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/bgamari/32/3599_2.png) [@bgamari](https://discourse.haskell.org/u/bgamari)\
**Post date:** [August 10, 2023, 7:15pm UTC](https://discourse.haskell.org/t/ghc-9-8-1-alpha2-is-now-available/7258/6 "2023-08-10T19:15:47Z")

</div>

I also fetched the [indicated tarball](https://downloads.haskell.org/ghc/9.8.1-alpha2/ghc-9.8.0.20230809-x86_64-unknown-mingw32.tar.xz) and confirmed that it has the expected SHA. However, the CDN does make it hard to know for certain whether you are getting the same file as me.

---

<div class="post-metadata">

**Author:** ![mpilgrem](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/mpilgrem/32/2529_2.png) [@mpilgrem](https://discourse.haskell.org/u/mpilgrem)\
**Post date:** [August 10, 2023, 7:21pm UTC](https://discourse.haskell.org/t/ghc-9-8-1-alpha2-is-now-available/7258/7 "2023-08-10T19:21:44Z")

</div>

Thanks for the responses. Second time around I got a file with the correct SHA256 hash and it works.

---

<div class="post-metadata">

**Author:** ![mpilgrem](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/mpilgrem/32/2529_2.png) [@mpilgrem](https://discourse.haskell.org/u/mpilgrem)\
**Post date:** [August 10, 2023, 7:58pm UTC](https://discourse.haskell.org/t/ghc-9-8-1-alpha2-is-now-available/7258/8 "2023-08-10T19:58:42Z")

</div>

I now have another problem, which appears to me likely to be a combination of what Stack does (unpack to a temporary directory with a long-ish filepath, using `7z`) and a [known bug](https://sourceforge.net/p/sevenzip/discussion/45797/thread/a9a0f02618/) in `7z.exe` related to long filepaths formed by prefixing a filepath to an archive item’s filepath. The problem manifests as (with some reformatting for clarity …):

```nohighlight
...
Everything is Ok

Size: 3318026240
Compressed: 324553756
[debug] Process finished in 4694ms:

C:\Users\mike\AppData\Local\Programs\stack\x86_64-windows\7z.exe
x 
-oC:\Users\mike\AppData\Local\Programs\stack\x86_64-windows\ghc-9.8.0.20230809-tmp-1d97bad0cb294661\ 
-y 
C:\Users\mike\AppData\Local\Programs\stack\x86_64-windows\ghc-9.8.0.20230809.tar.xz

[info] Extracting ghc-9.8.0.20230809.tar...

[debug] Run process:
C:\Users\mike\AppData\Local\Programs\stack\x86_64-windows\7z.exe
x 
-oC:\Users\mike\AppData\Local\Programs\stack\x86_64-windows\ghc-9.8.0.20230809-tmp-1d97bad0cb294661\ 
-y 
C:\Users\mike\AppData\Local\Programs\stack\x86_64-windows\ghc-9.8.0.20230809-tmp-1d97bad0cb294661\ghc-9.8.0.20230809.tar

Extracted 15 files

ERROR: Cannot open output file :
  The filename, directory name, or volume label syntax is incorrect. :
    C:\Users\mike\AppData\Local\Programs\stack\x86_64-windows\ghc-9.8.0.20230809-tmp-1d97bad0cb294661\\ghc-9.8.0.20230809-x86_64-unknown-mingw32\lib\x86_64-windows-ghc-9.8.0.20230809\base-4.19.0.0-4848\GHC\Unicode\Internal\Char\UnicodeData\SimpleLowerCaseMapping.hi
... [and so on for items that have long filepaths]

```

The long name for `ghc-9.8.0-20230809`, which gets repeated three times, means the filepaths are just creeping past the 260 character count.

EDIT: I’ll add an issue to Stack’s repository. The solution, I think, is for Stack to choose a temporary directory with a shorter filepath.

---

<div class="post-metadata">

**Author:** ![bgamari](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/bgamari/32/3599_2.png) [@bgamari](https://discourse.haskell.org/u/bgamari)\
**Post date:** [August 10, 2023, 8:28pm UTC](https://discourse.haskell.org/t/ghc-9-8-1-alpha2-is-now-available/7258/9 "2023-08-10T20:28:36Z")

</div>

> [@mpilgrem](#):
>
> EDIT: I’ll add an issue to Stack’s repository. The solution, I think, is for Stack to choose a temporary directory with a shorter filepath.

Yes, this sounds like a reasonable workaround to me.

---

<div class="post-metadata">

**Author:** ![mpilgrem](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/mpilgrem/32/2529_2.png) [@mpilgrem](https://discourse.haskell.org/u/mpilgrem)\
**Post date:** [August 11, 2023, 1:06pm UTC](https://discourse.haskell.org/t/ghc-9-8-1-alpha2-is-now-available/7258/10 "2023-08-11T13:06:30Z")

</div>

For anyone exploring GHC 9.8.1 with Stack on Windows, the long filepath wrinkle above is now fixed in the `master` branch version of Stack (if you are not using GHCup to manage Stack itself, `stack upgrade --source-only --git`).

---

<div class="post-metadata">

**Author:** ![mpilgrem](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/mpilgrem/32/2529_2.png) [@mpilgrem](https://discourse.haskell.org/u/mpilgrem)\
**Post date:** [August 12, 2023, 9:15pm UTC](https://discourse.haskell.org/t/ghc-9-8-1-alpha2-is-now-available/7258/11 "2023-08-12T21:15:27Z")

</div>

I have a question:

- on Hackage, `text-2.0.2` has `Data.Text.Array.ByteArray` as a data constructor of `Data.Text.Array.Array` - see [Data.Text.Array](https://hackage.haskell.org/package/text-2.0.2/docs/Data-Text-Array.html)

- The library Haddocks with GHC 9.8.0.20230809 has `type Array = ByteArray` - see [Data.Text.Array](https://downloads.haskell.org/ghc/9.8.1-alpha2/docs/libraries/text-2.0.2-2ffa/Data-Text-Array.html)

Is the `text-2.0.2` that ships with GHC 9.8.0.20230809 different from the `text-2.0.2` on Hackage?

---

<div class="post-metadata">

**Author:** ![mpilgrem](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/mpilgrem/32/2529_2.png) [@mpilgrem](https://discourse.haskell.org/u/mpilgrem)\
**Post date:** [August 13, 2023, 8:06pm UTC](https://discourse.haskell.org/t/ghc-9-8-1-alpha2-is-now-available/7258/12 "2023-08-13T20:06:55Z")

</div>

With a few minor patches of dependencies, and a lot of `allow-newer-deps` to overcome the restriction of upper bounds, I was able to build Stack with Stack on Alpine Linux 3.18 (on WSL 2) using GHC 9.8.0.20230809, including with `--flag stack:static`. My experiment is in the `ghc-9.8.0.20230809` branch of Stack’s repository.

For me that is good news, because I think it means that, once GHC 9.8.1 is released, I can both: (a) move Stack on from GHC 9.2.7; and (b) release statically linked versions of Stack for Linux.

---

<div class="post-metadata">

**Author:** ![Bodigrim](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/bodigrim/32/1457_2.png) [@Bodigrim](https://discourse.haskell.org/u/Bodigrim)\
**Post date:** [August 13, 2023, 8:51pm UTC](https://discourse.haskell.org/t/ghc-9-8-1-alpha2-is-now-available/7258/13 "2023-08-13T20:51:12Z")

</div>

> [@mpilgrem](#):
>
> Is the `text-2.0.2` that ships with GHC 9.8.0.20230809 different from the `text-2.0.2` on Hackage?

Yes, this is correct.

---

<div class="post-metadata">

**Author:** ![ocramz](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/ocramz/32/3713_2.png) [@ocramz](https://discourse.haskell.org/u/ocramz)\
**Post date:** [August 18, 2023, 7:06pm UTC](https://discourse.haskell.org/t/ghc-9-8-1-alpha2-is-now-available/7258/14 "2023-08-18T19:06:57Z")

</div>

Kind of OT but… cannot help but wonder how will GHC 10 look like
