GHC 9.12.1-rc1 is now available

The GHC developers are very pleased to announce the availability
of the release candidate for GHC 9.12.1. Binary distributions, source
distributions, and documentation are available at downloads.haskell.org.

We hope to have this release available via ghcup shortly.

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

  • The new language extension OrPatterns allowing you to combine multiple
    pattern clauses into one.

  • The MultilineStrings language extension to allow you to more easily write
    strings spanning multiple lines in your source code.

  • Improvements to the OverloadedRecordDot extension, allowing the built-in
    HasField class to be used for records with fields of non lifted representations.

  • The NamedDefaults language extension has been introduced allowing you to
    define defaults for typeclasses other than Num.

  • More deterministic object code output, controlled by the -fobject-determinism
    flag, which improves determinism of builds a lot (though does not fully do so)
    at the cost of some compiler performance (1-2%). See #12935 for the details

  • GHC now accepts type syntax in expressions as part of GHC Proposal #281.

  • The WASM backend now has support for TemplateHaskell.

  • … and many more

A full accounting of changes can be found in the release notes.
As always, GHC’s release status, including planned future releases, can
be found on the GHC Wiki status.

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 if you see
anything amiss.

Cheers,
Zubin

22 Likes

I get the following errors on MacOS 15.1.1:

$ runghc hello.hs
ghc: can’t find a package database at /Users/avie/.cabal/store/ghc-9.12.0.20241128/package.db
avie@Mac ghc-9.12.0.20241128-aarch64-apple-darwin % ghci hello.hs
$ ghci hello.hs
Loaded package environment from /Users/avie/.ghc/aarch64-darwin-9.12.0.20241128/environments/default
GHCi, version 9.12.0.20241128: Glasgow Haskell Compiler — The Glasgow Haskell Compiler :? for help
ghc-9.12.0.20241128: can’t find a package database at /Users/avie/.cabal/store/ghc-9.12.0.20241128/package.db
avie@Mac ghc-9.12.0.20241128-aarch64-apple-darwin % ghc -O hello.hs
$ ghc -O hello.hs
Loaded package environment from /Users/avie/.ghc/aarch64-darwin-9.12.0.20241128/environments/default
ghc-9.12.0.20241128: can’t find a package database at /Users/avie/.cabal/store/ghc-9.12.0.20241128/package.db

Should I file a bug?

1 Like

Please do! Which version of cabal-install are you using?

I was using 3.10.1. I moved to 3.12.1 and I still get the same errors. I’ll file a bug later today or tomorrow

bug filed: #25538: ghc 9.12.1-alpha1 doesn't work after installation · Issues · Glasgow Haskell Compiler / GHC · GitLab

2 Likes