2.1. Version 9.14.2¶
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.1.1. Compiler¶
-fdiagnostics-as-jsonoutput now includes the rendered diagnostic message, in the same format GHC would produce without the flag (#26173)Fixed the orientation of
HsWrappercomposition (<.>) (#26350)Fixed LLVM linking of Intel BMI intrinsics
pdep{8,16}andpext{8,16}(#26065)Improved compiler performance by making
OccAnalstricter, reducing residency and improving compile timesFixed a shadowing bug with implicit parameters (#26451)
Pass the
+evex512attribute to LLVM 18+ when-mavx512fis set (#26410)Fixed a bug in the Cmm register-conflict analysis where an assignment’s left-hand side register was not accounted for, which could generate incorrect code (#26550)
Fixed a register allocator bug where the format of a spilled register was not updated after reassignment, which could corrupt vector register contents (#26542)
Fixed the order of spill/reload instructions emitted by the AArch64 native code generator (#26537)
Reduced allocations during recompilation checking by using
OsPathwhen checking file modification timesReduced memory usage of the package database by using
OsPathinstead ofFilePathinPkgDbRefandUnitDatabaseReinstated the Template Haskell level check when reporting out-of-scope identifiers, fixing misleading errors caused by staging errors (#26099)
Fixed a compiler panic when computing reachability to a module graph node that does not exist (#26568)
Fixed an incorrect optimisation that folded multiplication, division, or remainder by an out-of-range power-of-2 literal into a shift (#25664)
Bumped the maximum supported LLVM version to 21
Enabled a Cmm comparison-folding optimisation on all architectures, previously restricted to x86/x86-64 (#26664)
Fixed five register allocation bugs relating to register formats, some of which could corrupt vector register contents when spilling and reloading (#26411, #26526)
Fixed associated type family changes not triggering recompilation in dependent modules (#26183)
Fixed LLVM backend
pdep/pexthandling for i386 targets (#26450)Fixed a missing InVar->OutVar lookup in
SetLevels(#26681)Fixed data family instance type class instance changes not triggering recompilation (#26705)
Improved case merging by floating join points out of
DEFAULTalternatives (#26709)Fixed scoping errors in the type-class specialiser (#26682)
Don’t re-use stack slots for growing registers (#26668)
Fixed PPC NCG shift right operations at smaller than word sizes (#26519)
Fixed split sections for the LLVM backend (#26770)
Fixed non-determinism in
TyLitMapby using deterministic maps for strings (#26846)Fixed a subtle bug in
GHC.Core.Utils.mkTickthat could generate type-incorrect code (#26772)Fixed a long-standing interaction between ticks and casts in
Eliminate Identity CaseFixed non-determinism in
WithHsDocIdentifiersbinary instance by using a stable sort (#26858)Fixed cast worker/wrapper incorrectly firing on INLINE functions (#26903)
Fixed negative type literals bypassing the renamer check via
RequiredTypeArguments, causing the compiler to hang (#26861)Fixed a bug where
mergeCaseAltscould move a tick in between a join point and its jump, producing invalid Core (#26642, #26693, #26929)Fixed the Haddock documentation for
GHC.Prim(#26954)Fixed demand analysis giving an absent demand to an argument that was still used by the function’s stable unfolding, which could cause a run-time crash (#26416)
Fixed
capiwrappers failing to compile with newer GCC/Clang by collapsing chains of void pointers to a singlevoid*(#26852)Fixed an infinite loop in the type checker triggered by deep subsumption (#26823)
Fixed a segfault caused by refining the
DEFAULTalternative for dictionaries of unary typeclasses (#27071)The driver now recognises
.dyn_ofiles as object files when passed on the command line, fixing plugins compiled with this suffix (#24486)Fixed a regression that caused overloaded functions to no longer be specialised as effectively as in previous releases, hurting runtime performance (#26831)
Fixed the
Datainstance forModuleNameto give a non-bottomtoConstrimplementation (#27129)Fixed
-dsuppress-uniquesto also suppress the unique of free variables shown in demand signatures (#27106)Fix “failed to detect OverLit” panic in the pattern-match checker (#25926, #27124)
Introduce a cache of home module name providers (#27055)
On AArch64, use a logical instead of an arithmetic right shift for the unsigned right shift (
MO_U_Shr) at 8/16 bit word size (#26979)Fixed spurious incomplete record selector warnings for bare record field projections such as
.fld(#26686)Fixed the simplifier firing rules or inlinings that are not active throughout the whole activation range of a RULE or stable unfolding when simplifying its right-hand side (#26323)
Fixed a compiler loop caused by not taking the current simplifier phase into account when computing the phase range used to simplify the right-hand side of a RULE or stable unfolding (#26826)
Fixed a QuickLook instantiation bug that could cause the typechecker to reject programs using the
($)operator that are accepted when using explicit parentheses (#26543)Fix a token leak in the
-jsemjobserver shutdown path (#27253)Update to semaphore-compat 2.0.0 (
-jsemprotocol v2) (#25087)Fixed a compiler panic when trimming the continuation for bottoming functions (#27261)
Fixed
mkTickto avoid attaching profiling ticks to coercions, preventing a compiler panic (#27121)Added a deprecation warning for static forms that mention nested let-bound variables, ahead of a breaking change in a future release (#26718)
Avoid AArch64 register clobbering bug in MUL2 (#27046)
Fixed the RISC-V code generator to zero-extend the result of
castFloatToWord32(#27300)Fixed the RISC-V code generator to treat registers
d28-d31(ft8-ft11) as caller-saved (#27306)Fixed the RISC-V code generator to set the correct rounding mode when emitting
truncate(#27303)AArch64 code generation: use
SXTWinstead ofSXTHforW32sign extension (#26978)Fix incorrect overflow bit for
MUL2on AArch64 for sub-W64operands (#27047)Eliminate redundant thunks introduced by tag inference (#27005)
Fix exponential-time desugaring of nested
caseexpressions. The scrutinee is no longer desugared a second time when recording long-distance information for the pattern-match checker (#27383, #20251)Under
ExplicitLevelImports, imported types are now subject to the same level (staging) checks as values (#26098)Reference the correct package in error messages when trying to import a reexported module from a hidden package (#27417)
Fix invalid cmm basic block output when proc-point splitting is enabled (wasm/llvm/unregisterised) (#27447)
Fix a CorePrep miscompilation that could project a field out of an absent dictionary, resulting in a segfault (#25924)
Fix two crashes that could happen in a multithreaded setting when profiling (#27123)
Fix getStgArgFromTrivialArg panic in CoreToStg (#27182)
Don’t drop cost centres around variables of type IO () (#27225)
Another fix for another getStgArgFromTrivialArg panic in CoreToStg (#27386)
Make the order of usages deterministic (#26877)
Fix the interaction of ExplicitLevelImports with qualified imports (#26616, #27385)
Rename ZonkAny to UnusedType and add pretty printing logic for it (#27390)
2.1.2. GHCi¶
Added the
-fimport-loaded-targetsflag, which automatically imports all loaded targets into the GHCi session (#26866)Added support for custom external interpreter commands, allowing GHC API clients to extend the external interpreter with their own message handlers (#26652)
Fix regression to allow loading modules into the GHCi after startup (#27202)
Fixed the GHCi prompt and session home units to use a consistent package database stack, avoiding spurious ambiguous-import errors for home unit dependencies (#27202)
Fixed the order in which
:infolists instances, which previously depended on the order in which interface files happened to be loaded (#27532)
2.1.3. Template Haskell¶
Fixed implicit lifting to use a precise level check (#26088)
2.1.4. Runtime System¶
Fixed an incorrect cast in
SIZED_BIN_OP_TY_INTin the bytecode interpreter (#26287)Removed unnecessary Cabal flags
Used computed goto for instruction dispatch in the bytecode interpreter, improving interpreter performance (#12953)
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)Fixed an ABI mismatch in calls to the variadic
barffunction, both in compiler-generated code and hand-written Cmm (#22882)Reclaimed slop space opportunistically in
shrinkMutableByteArray#, reducing heap fragmentation.Use
INFO_TABLE_CONSTRforstg_dummy_ret_closure(#26745)Don’t use CAS without
PARALLEL_GConSwitch prim to use modern atomic compiler builtins (#26729)
The runtime linker now supports COMMON symbols (#6107)
Fixed a potential crash when decoding stack snapshots, caused by an invalid pointer left in a GC-visible slot (#27009)
Fixed a missing profiling header in the
origin_thunkstack frame info table, which could cause corruption when the frame was copied by the garbage collector (#27007)Fixed a stack alignment bug on x86 that could cause segfaults or corrupted registers when using AVX/AVX-512 vector code (#26595, #26822)
Fixed a race condition where a cloned-stack request could be mishandled after its target thread migrated to another capability (#27008)
Fixed a race condition between
flushEventLogandstartEventLogging/endEventLoggingthat could corrupt the eventlog (#27082)Windows: fixed crashes and memory leaks in the legacy I/O manager’s handling of asynchronous I/O results (#26341)
Add rts Message to set/unset TSO flags (#27131)
Fixed several missing i386 relocation types in the RTS’s runtime linker (#25260)
Fix several black hole handling bugs that could lead to deadlocks or crashes in multithreaded programs. These could show up as the program hanging or “END_TSO_QUEUE object entered” errors (#26922, #26936)
Rethrow exceptions in overlapped IO when using the WinIO IO manager (#27283)
Fix “unknown/strange object 24 crash” in compacting GC (#27434)
2.1.5. Code Generation¶
PPC NCG: generate the clear-right instruction at architecture width for all
MachOpwidths (#24145)PPC NCG: Use libcall for 64-bit
cmpxchgon 32-bit PowerPC (#23969)NCG for PPC: add pattern for
CmmRegOfftoiselExpr64(#26828)AArch64: fixed a register allocation bug where
MOVK’s destination register was not marked as both read and written, which could clobber live values (#26980)Fix module finalizers on multiple platforms (#27072)
Fix miscompiled %load_relaxed primop, add missing %store_relaxed (#27483)
Fix redundant AP thunk codegen when not using -ticky-ap-thunk (#27502)
2.1.6. Bytecode Compiler¶
Improved bytecode loading performance by caching
MallocStringsrequests for repeated breakpoint strings, avoiding redundant remote heap allocation (#26995)Fixed the
SLIDEbytecode instruction crashing when sliding off the end of a stack chunk (#27001)Removed the size limit on unboxed tuples supported by the bytecode interpreter on 64-bit platforms (#26946)
2.1.7. base library¶
Added
@sinceannotation toSystem.Info.fullCompilerVersion(#26973)
2.1.8. ghc-heap library¶
Fix invalid srtlen field returned by peekItbl when no tables-next-to-code (#27465)
2.1.9. ghc-internal library¶
Fixed a crash when decoding a captured stack containing a bytecode object with an empty payload bitmap (#26640)
2.1.10. ghc-experimental library¶
Fixed
GHC.Exception.Backtrace.ExperimentalmoduleAdded an optional
SrcLocto theStackAnnotationclass inGHC.Stack.Annotation.Experimental(#26806)Added a cumulative
gc_sync_elapsed_nscounter toRTSStats(#26944)Exposed
decodeStackWithIpeand related stack-decoding helpers fromghc-experimental(#27065)
2.1.11. ghc-pkg¶
Removed
traceIdfromghc-pkgexecutableImprove performance of ghc-pkg list command (#27275)
2.1.12. JavaScript Backend¶
The JavaScript backend now supports more than 128 registers, fixing runtime
ReferenceErrorfailures for functions taking very many arguments (#26558)
2.1.13. Wasm Backend¶
2.1.14. Packaging and Build System¶
Added
hpcto release scriptHadrian now places user-supplied arguments after package arguments, making it easier to override default package arguments in
UserSettings.hs(#25821)Use a response file to invoke GHC when analysing dependencies
Bumped
haskelinesubmodule to 0.8.4.1Removed a build-system hack that forced
-fno-PICon RTS objects on i386, restoring compatibility with modern toolchains (#26792)Added
ghc-{experimental,internal}.cabalto the list of dependencies of the doc target (#26738)Fixed runtime error during
users_guidebuild with Sphinx 9.1.0 (#26810)Bumped
textsubmodule to 2.1.4Bumped
transformerssubmodule to 0.6.3.0Bumped
Cabalsubmodule to 3.16.1.0Bumped
deepseqsubmodule to 1.5.2.0Bumped
directorysubmodule to 1.3.10.1.Bumped
exceptionssubmodule to 0.10.12.The build system now accepts version 2.2 of the
happyparser generator.Hadrian now builds profiled dynamic objects with
-dynamic-too, improving build parallelism (#27010)Fixed the
--targetsupport check inconfigureto use the stage0 C compiler instead of$CC(#26999)Installed the
rts/Types.hheader when using the JavaScript backend, fixing use ofHsFFI.h(#27033)Removed the package hash from Haddock documentation directory paths, making it easier for downstream packages to link to them (#26635)
bump submodule to v1.6.29.0 (#27144)
Bumped
processsubmodule to 1.6.30.0Fixed a validate-build failure of the runtime system with GCC 16 (#27366)
Hadrian no longer leaves stale .conf files in its package databases when rebuilding in the same build root with different settings (e.g. another flavour, or when hashes change with +hash-unit-ids) (#26661)