2.4. Version 9.12.4

The significant changes to the various parts of the compiler are listed in the following sections. See the migration guide on the GHC Wiki for specific guidance on migrating programs to this release.

2.4.1. Compiler

  • Fixed a bug in CSE where the in-scope set was not properly maintained (#25468)

  • Fixed matchExpectedFunTys to use tcMkScaledFunTys (#26277)

  • Fixed parenBreakableList usage in ppHsContext for better pretty-printing of contexts

  • Improved error messages for bad record updates to allow out-of-scope data constructors (#26391)

  • Fixed a missing InVar->OutVar lookup in SetLevels (#26681)

  • Fixed split sections on Windows (#26696, #26494)

  • Fixed split sections for the LLVM backend (#26770)

  • Don’t re-use stack slots for growing registers (#26668)

  • Fixed cast worker/wrapper incorrectly firing on INLINE functions (#26903)

  • Fixed non-determinism in TyLitMap by using deterministic maps for strings (#26846)

  • Fixed non-determinism in WithHsDocIdentifiers binary instance by using a stable sort (#26858)

  • Added -mcmodel=medium module flag to generated LLVM IR on LoongArch

  • Pass the mcmodel=medium parameter to CC via GHC on LoongArch

  • Pass the +evex512 attribute to LLVM 18+ when -mavx512f is set (#26410)

  • Improved error handling in getPackageArchives (#26383)

  • Fixed a shadowing bug in implicit parameters (#26451)

  • Fixed a subtle bug in GHC.Core.Utils.mkTick that could generate type-incorrect code (#26772)

  • Fixed a long-standing interaction between ticks and casts in Eliminate Identity Cases

  • NamedDefaults: require the class to be standard or have an in-scope default declaration (#25775, #25778)

  • NamedDefaults: allow named defaults for poly-kinded unary classes such as Typeable (#25882)

  • Improved compiler performance by making OccAnal stricter, reducing residency and improving compile times

  • Fixed two critical Cmm register bugs affecting spill/reload behavior with vector types (#26542, #26550)

  • Fixed the order of spill/reload instructions in the native code generator (#26537)

  • Fixed five register allocation bugs relating to register formats, preventing data corruption when spilling and reloading vector registers (#26411, #26526)

  • Fixed PPC NCG shift right operations at smaller than word sizes (#26519)

  • Fixed associated type family changes not triggering recompilation in dependent modules (#26183)

  • Fixed data family instance type class instance changes not triggering recompilation (#26705)

  • Fixed negative type literals bypassing the renamer check via RequiredTypeArguments, causing the compiler to hang (#26861)

  • Fixed scoping errors in the type-class specialiser (#26682)

  • Fixed sign extension and casting for LLVM bit manipulation operations (#20645, #26109)

  • Fixed LLVM linking of Intel BMI intrinsics pdep{8,16} and pext{8,16} (#26065)

2.4.2. Runtime System

  • Fixed a deadlock with eventlog flush interval and RTS shutdown (#26573)

  • Handle 16-bit overflow of ELF section header string table (#26603)

  • Fixed object file format detection in loadArchive (#26630)

  • Use INFO_TABLE_CONSTR for stg_dummy_ret_closure (#26745)

  • Fixed lost wakeups in threadPaused for threads blocked on black holes (#26324)

  • Fixed stg_AP_STACK to push the correct update frame (#26324)

  • Fixed potential loop in heap reservation logic on certain kernels (#26151)

  • The runtime linker now supports COMMON symbols (#6107)

  • Don’t use CAS without PARALLEL_GC on

  • Switch prim to use modern atomic compiler builtins (#26729)

  • Removed obsolete CC_SUPPORTS_TLS, HAS_VISIBILITY_HIDDEN, COMPILING_WINDOWS_DLL, and __GNUC__-related logic

  • Removed the -O3 pragma hack in Hash.c

  • Removed unnecessary Cabal flags

2.4.3. Code Generation

  • NCG for PPC: add pattern for CmmRegOff to iselExpr64 (#26828)

  • PPC NCG: Use libcall for 64-bit cmpxchg on 32-bit PowerPC (#23969)

2.4.4. Bytecode Compiler

  • Use 32 bits for breakpoint index (#26325)

2.4.5. base library

  • Expose Backtraces constructor and fields (#26049)

  • Added @since annotation to System.Info.fullCompilerVersion (#26973)

  • Store StackTrace and StackSnapshot in Backtraces, deferring decoding until display

  • Evaluate backtraces for error exceptions at the moment they are thrown (CLC proposal #383, #26751)

2.4.6. ghc-experimental library

  • Fixed GHC.Exception.Backtrace.Experimental module

  • Added ability to customise the collection of exception annotations

2.4.7. ghc-pkg

  • Removed traceId from ghc-pkg executable

2.4.8. ghc-toolchain

  • Dropped ld.gold from merge object command

2.4.9. Packaging and Build System

  • Added hpc to release script

  • Use a response file to invoke GHC when analysing dependencies

  • Fixed GHC.Platform.Host generation for cross stage1 (#26449)

  • Fixed runtime error during users_guide build with Sphinx 9.1.0 (#26810)

  • Added ghc-{experimental,internal}.cabal to the list of dependencies of the doc target (#26738)

  • Updated libffi to 3.5.2

  • Bumped directory submodule to 1.3.10.1

  • Bumped exceptions submodule to 0.10.12

  • Bumped file-io submodule to 0.1.6

  • Bumped filepath submodule to 1.5.5.0

  • Bumped haskeline submodule to 0.8.4.1

  • Bumped mtl submodule to 2.3.2

  • Bumped os-string submodule to 2.0.10

  • Bumped text submodule to 2.1.4

  • Bumped transformers submodule to 0.6.3.0

  • Bumped unix submodule to 2.8.8.0

  • Bumped Win32 submodule to 2.14.2.1

2.4.10. Wasm Backend

  • Fixed dyld handling for forward declared GOT.func items (#26430)

  • Ensure setKeepCAFs() is called in GHCi (#26106)

  • Prevent bundlers from resolving import("node:timers")

  • Use import.meta.main for proper distinction of Node.js main modules (#26916)

2.4.11. Included libraries

The package database provided with this distribution also contains a number of packages other than GHC itself. See the changelogs provided with these packages for further change information.

Package Version Reason for inclusion

ghc

9.12.4

The compiler itself

Cabal-syntax

3.14.2.0

Dependency of ghc-pkg utility

Cabal

3.14.2.0

Dependency of ghc-pkg utility

Win32

2.14.2.1

Dependency of ghc library

array

0.5.8.0

Dependency of ghc library

base

4.21.2.0

Core library

binary

0.8.9.3

Dependency of ghc library

bytestring

0.12.2.0

Dependency of ghc library

containers

0.7

Dependency of ghc library

deepseq

1.5.1.0

Dependency of ghc library

directory

1.3.10.1

Dependency of ghc library

exceptions

0.10.12

Dependency of ghc and haskeline library

file-io

0.1.6

Dependency of directory library

filepath

1.5.5.0

Dependency of ghc library

ghc-boot-th

9.12.4

Internal compiler library

ghc-boot

9.12.4

Internal compiler library

ghc-compact

0.1.0.0

Core library

ghc-experimental

9.1204.0

Core library

ghc-heap

9.12.4

GHC heap-walking library

ghc-internal

9.1204.0

Core library

ghc-platform

0.1.0.0

Internal library

ghc-prim

0.13.0

Core library

ghci

9.12.4

The REPL interface

haskeline

0.8.4.1

Dependency of ghci executable

hpc

0.7.0.2

Dependency of hpc executable

integer-gmp

1.1

Core library

mtl

2.3.2

Dependency of Cabal library

os-string

2.0.10

Dependency of filepath library

parsec

3.1.18.0

Dependency of Cabal library

pretty

1.1.3.6

Dependency of ghc library

process

1.6.26.1

Dependency of ghc library

semaphore-compat

1.0.0

Dependency of ghc library

stm

2.5.3.1

Dependency of haskeline library

template-haskell

2.23.0.0

Core library

terminfo

0.4.1.7

Dependency of haskeline library

text

2.1.4

Dependency of Cabal library

time

1.14

Dependency of ghc library

transformers

0.6.3.0

Dependency of ghc library

unix

2.8.8.0

Dependency of ghc library

xhtml

3000.2.2.1

Dependency of haddock executable

haddock-api

2.32.0

Dependency of haddock executable

haddock-library

1.11.0

Dependency of haddock executable