# GHC 9.6.1 is now available

**URL:** <https://discourse.haskell.org/t/ghc-9-6-1-is-now-available/5972>\
**Category:** Announcements\
**Created:** [March 12, 2023, 2:08am UTC](https://discourse.haskell.org/t/ghc-9-6-1-is-now-available/5972 "2023-03-12T02:08:23Z")\
**Posts on this page:** 13\
**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:** [March 12, 2023, 2:08am UTC](https://discourse.haskell.org/t/ghc-9-6-1-is-now-available/5972/1 "2023-03-12T02:08:23Z")

</div>

The GHC team is very pleased to announce the availability of GHC 9.6.1.  
As usual, binaries and source distributions are available at  
[downloads.haskell.org](https://downloads.haskell.org/ghc/9.6.1/).

Beginning with GHC 9.6.1, GHC can be built as a cross-compiler to  
WebAssembly and JavaScript. This is an important step towards robust  
support for compiling Haskell to the Web, but there are a few caveats to be  
aware of in the 9.6 series:

- Both the Javascript and WebAssembly backends are still at an early  
stage of development and are present in this release as a technology preview

- Using GHC as a cross-compiler is not as easy as we would like it to  
be; in particular, there are challenges related to Template Haskell

- GHC is not yet run-time retargetable; a given GHC binary targets  
exactly one platform, and both WebAssembly and JavaScript are considered  
platforms for this purpose. Cross-compilers must be built from source by  
their users

We hope to lift all of these limitations in future releases.

Additionally, 9.6.1 includes:

- Significant latency improvements in the non-moving garbage collector

- Efficient runtime support for delimited continuations

- Improvements in compiler error messages

- Numerous improvements in the compiler’s memory usage

See the [release notes](https://downloads.haskell.org/ghc/9.6.1/docs/users_guide/9.6.1-notes.html) for a comprehensive accounting of changes in this  
release.

As always, one can find a migration guide to aid in transitioning from older  
releases on the [GHC Wiki](https://gitlab.haskell.org/ghc/ghc/-/wikis/migration/9.6). We have also recently started  
extending our release process to cover a wider set of Linux distributions. In  
particular, we now offer Rocky 8 and Ubuntu 20.04 binary distributions which  
cover RedHat-derivative and distributions using older `glibc` releases (namely  
2.27), respectively.

Thanks to everyone who has contributed code, documentation, testing, and  
tickets to this release process. As this release represents upstream GHC’s  
first step towards supporting web targets, we are very excited to have this  
release out the door!

Cheers,

- Ben

---

<div class="post-metadata">

**Author:** ![hasufell](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/hasufell/32/1250_2.png) [@hasufell](https://discourse.haskell.org/u/hasufell)\
**Post date:** [March 12, 2023, 10:56am UTC](https://discourse.haskell.org/t/ghc-9-6-1-is-now-available/5972/2 "2023-03-12T10:56:40Z")

</div>

Unofficial FreeBSD bindist (with native gmp backend, because there seems to be a hadrian bug when building with libgmp): [Index of /ghcup/unofficial-bindists/ghc/9.6.1/](https://downloads.haskell.org/~ghcup/unofficial-bindists/ghc/9.6.1/)

metadata updated: [Add GHC 9.6.1 proper · haskell/ghcup-metadata@c58f03c · GitHub](https://github.com/haskell/ghcup-metadata/commit/c58f03c71d03e3315b4230c0252a460fd69fad78)

---

<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:** [March 12, 2023, 12:44pm UTC](https://discourse.haskell.org/t/ghc-9-6-1-is-now-available/5972/3 "2023-03-12T12:44:21Z")

</div>

I have updated Stack’s default `setup-info` dictionary for these binary distributions, and added GHC 9.6.1’s global hints to `global-hints.yaml` . (As there is no ‘Fedora 27’ version of GHC 9.6.1, Stack uses the ‘Debian 10’ version for Linux/x86\_64 systems where `tinfo6` is present and the `libc6` version is pre-2.32.)

---

<div class="post-metadata">

**Author:** ![hasufell](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/hasufell/32/1250_2.png) [@hasufell](https://discourse.haskell.org/u/hasufell)\
**Post date:** [March 12, 2023, 1:39pm UTC](https://discourse.haskell.org/t/ghc-9-6-1-is-now-available/5972/4 "2023-03-12T13:39:54Z")

</div>

> [@mpilgrem](#):
>
> Stack uses the ‘Debian 10’ version for Linux/x86\_64 systems where `tinfo6` is present and the `libc6` version is pre-2.32

The fedora substitute is Rocky8, which is [more portable](https://gitlab.haskell.org/ghc/ghc/-/wikis/platforms/linux).

---

<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:** [March 12, 2023, 1:49pm UTC](https://discourse.haskell.org/t/ghc-9-6-1-is-now-available/5972/5 "2023-03-12T13:49:46Z")

</div>

In that case, I’ll change Stack’s default `setup-info` to refer to the ‘Rocky 8’ version of GHC 9.6.1 where it would have referred to the ‘Fedora 27’ version.

---

<div class="post-metadata">

**Author:** ![janus](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/janus/32/1060_2.png) [@janus](https://discourse.haskell.org/u/janus)\
**Post date:** [April 1, 2023, 5:26pm UTC](https://discourse.haskell.org/t/ghc-9-6-1-is-now-available/5972/6 "2023-04-01T17:26:31Z")

</div>

Why is Rocky 8 more portable than Debian 10?

The Rocky 8 build used binutils 2.30, Debian 10 used binutils 2.26.

The other versions are the same according to that table.

Given that the Debian 10 version is older, wouldn’t that mean that the Debian 10 build is more portable?

---

<div class="post-metadata">

**Author:** ![hasufell](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/hasufell/32/1250_2.png) [@hasufell](https://discourse.haskell.org/u/hasufell)\
**Post date:** [April 1, 2023, 5:59pm UTC](https://discourse.haskell.org/t/ghc-9-6-1-is-now-available/5972/7 "2023-04-01T17:59:54Z")

</div>

Debian messes with libraries and spams stderr of GHC on non-debian distributions, e.g. [https://bugzilla.redhat.com/show\_bug.cgi?id=1875587](https://bugzilla.redhat.com/show_bug.cgi?id=1875587)

That is part of “portability” too.

---

<div class="post-metadata">

**Author:** ![jzwood](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/jzwood/32/2946_2.png) [@jzwood](https://discourse.haskell.org/u/jzwood)\
**Post date:** [April 3, 2023, 11:10pm UTC](https://discourse.haskell.org/t/ghc-9-6-1-is-now-available/5972/8 "2023-04-03T23:10:52Z")

</div>

Forgive me if this is a stupid question but how would I go about using GHC 9.6.1 in a project that uses Stack to produce a JavaScript artifact?

Pre the release of 9.6.1 I did compile GHC from source and was able to translate a single very simple Haskell script into a node runnable artifact but I have no idea how to use this compiler to compile an actual project – Cabal, Stack, or otherwise.

Any suggestions or advice greatly appreciated. Nothing is too obvious to mention, ie TMLI5.

---

<div class="post-metadata">

**Author:** ![jodak](https://avatars.discourse-cdn.com/v4/letter/j/7ab992/32.png) [@jodak](https://discourse.haskell.org/u/jodak)\
**Post date:** [April 4, 2023, 1:24am UTC](https://discourse.haskell.org/t/ghc-9-6-1-is-now-available/5972/9 "2023-04-04T01:24:16Z")

</div>

Since there are different ghc binaries for different linux distributions, I assume ghc links against the libraries in the [list already linked by @hasufell](https://gitlab.haskell.org/ghc/ghc/-/wikis/platforms/linux). Are these libraries really all required? I don’t know, but could it be that gcc, binutils, glibc and tinfo are needed for the C compiler backend? Maybe they are obsolete, since ghc now uses LLVM. Also ncurses might be statically linked, since it has the X11 License. Maybe there could be a single binary for all distributions?

---

<div class="post-metadata">

**Author:** ![hasufell](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/hasufell/32/1250_2.png) [@hasufell](https://discourse.haskell.org/u/hasufell)\
**Post date:** [April 4, 2023, 9:32am UTC](https://discourse.haskell.org/t/ghc-9-6-1-is-now-available/5972/10 "2023-04-04T09:32:01Z")

</div>

- [#17878: Fully static GHC Linux builds for releases? · Issues · Glasgow Haskell Compiler / GHC · GitLab](https://gitlab.haskell.org/ghc/ghc/-/issues/17878)
- [https://downloads.haskell.org/~ghc/9.6.1/ghc-9.6.1-x86\_64-alpine3\_12-linux-static.tar.xz](https://downloads.haskell.org/~ghc/9.6.1/ghc-9.6.1-x86_64-alpine3_12-linux-static.tar.xz)

There are problems with using fully static bindists with cabal though. Feel free to try.

---

<div class="post-metadata">

**Author:** ![noinia](https://avatars.discourse-cdn.com/v4/letter/n/cab0a1/32.png) [@noinia](https://discourse.haskell.org/u/noinia)\
**Post date:** [April 4, 2023, 9:03pm UTC](https://discourse.haskell.org/t/ghc-9-6-1-is-now-available/5972/11 "2023-04-04T21:03:26Z")

</div>

From what I understand you’ll still need to

1. compile a specific version of GHC-9.6.1 yourself that is targeted to produce javascript output
2. tell stack to use your specific version of ghc. You can do so by setting system-ghc: yes in your stack.config file, and
3. making sure that the path to ghc (i.e. the “system-ghc” as considered by stack) is your particular build of ghc that produces javascript.

(and then “simply” call stack build on your project).

I believe the plan/hope is to have some sort of flag in ghc-9.8 that you can set to produce javascript output rather than having to recompile a specific version of ghc from scratch to do so.

---

<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:** [May 1, 2023, 5:44pm UTC](https://discourse.haskell.org/t/ghc-9-6-1-is-now-available/5972/12 "2023-05-01T17:44:55Z")

</div>

If you are using GHC 9.6.1 on Windows with a dependency on the `network` package, you will need to bump to the newly-released `network-3.1.2.9` to avoid a glitch.

---

<div class="post-metadata">

**Author:** ![sclv](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/sclv/32/71_2.png) [@sclv](https://discourse.haskell.org/u/sclv)\
**Post date:** [May 1, 2023, 8:06pm UTC](https://discourse.haskell.org/t/ghc-9-6-1-is-now-available/5972/13 "2023-05-01T20:06:47Z")

</div>

Thanks for this fix! This was a tricky one: [Don't declare `_GNU_SOURCE` on Windows · Issue #551 · haskell/network · GitHub](https://github.com/haskell/network/issues/551)
