.. _release-9-12-3:

Version 9.12.3
==============

The significant changes to the various parts of the compiler are listed in the
following sections. See the `migration guide
<https://gitlab.haskell.org/ghc/ghc/-/wikis/migration/9.12>`_ on the GHC Wiki
for specific guidance on migrating programs to this release.

Compiler
~~~~~~~~

- Fixed re-exports of ``MkSolo`` and ``MkSolo#`` (:ghc-ticket:`25182`)
- Fixed the behavior of ``Language.Haskell.TH.mkName "FUN"`` (:ghc-ticket:`25174`)
- Fixed miscompilation involving ``zonkEqTypes`` on ``AppTy/AppTy`` (:ghc-ticket:`26256`)
- Fixed CprAnal to detect recursive newtypes (:ghc-ticket:`25944`)
- Fixed specialisation of incoherent instances (:ghc-ticket:`25883`)
- Fixed bytecode generation for ``tagToEnum# <LITERAL>`` (:ghc-ticket:`25975`)
- Fixed bytecode generation for unsaturated data constructor workers (:ghc-ticket:`23210`)
- Fixed panic with EmptyCase and RequiredTypeArguments (:ghc-ticket:`25004`)
- Fixed EmptyCase panic in tcMatches with invisible forall (:ghc-ticket:`25960`)
- Fixed ``tyConStupidTheta`` to handle ``PromotedDataCon`` (:ghc-ticket:`25739`)
- Fixed unused import warnings for duplicate record fields (:ghc-ticket:`24035`)
- Fixed lexing of ``"\^\"`` (:ghc-ticket:`25937`)
- Fixed string gap collapsing (:ghc-ticket:`25784`)
- Fixed tabs in string gaps (:ghc-ticket:`26415`)
- Fixed lexing of comments in multiline strings (:ghc-ticket:`25609`)
- Made unexpected LLVM versions a warning rather than an error (:ghc-ticket:`25915`)
- Disabled ``-fprof-late-overloaded-calls`` for join points to avoid invalid transformations
- Fixed bugs in ``integerRecipMod`` and ``integerPowMod`` (:ghc-ticket:`26017`)
- Fixed ``naturalAndNot`` for NB/NS case (:ghc-ticket:`26230`)
- Fixed ``ds_ev_typeable`` to use ``mkTrAppChecked`` (:ghc-ticket:`25998`)
- Fixed GHC settings to always unescape escaped spaces (:ghc-ticket:`25204`)
- Fixed issue with HasCallStack constraint caching (:ghc-ticket:`25529`)
- Fixed archive member size writing logic in ``GHC.SysTools.Ar`` (:ghc-ticket:`26120`, :ghc-ticket:`22586`)
- Added support for synchronous JSFFI exports for the wasm backend (:ref:`wasm-jsffi`)

Runtime System
~~~~~~~~~~~~~~

- Fixed ``MessageBlackHole.link`` to always be a valid closure
- Fixed handling of WHITEHOLE in ``messageBlackHole`` (:ghc-ticket:`26205`)
- Fixed handling of WHITEHOLEs in ``scavenge_one`` (:ghc-ticket:`26204`)
- Fixed ``rts_clearMemory`` logic when sanity checks are enabled (:ghc-ticket:`26011`)
- Fixed underflow frame lookups in the bytecode interpreter (:ghc-ticket:`25750`)
- Fixed overflows and reentrancy in interpreter statistics calculation (:ghc-ticket:`25756`)
- Fixed INTERP_STATS profiling code (:ghc-ticket:`25695`)
- Removed problematic ``n_free`` variable from nonmovingGC (:ghc-ticket:`26186`)
- Fixed incorrect format specifiers in era profiling
- Improved documentation of SLIDE and PACK bytecode instructions
- Eliminated redundant ``SLIDE x 0`` bytecode instructions
- Fixed compile issues on powerpc64 ELF v1
- Various fixes of wasm-specific logic in the RTS

Code Generation
~~~~~~~~~~~~~~~

- Fixed LLVM built-in variable predicate (was checking ``$llvm`` instead of ``@llvm``)
- Fixed linkage of built-in arrays for LLVM (:ghc-ticket:`25769`)
- Fixed code generation for SSE vector operations (:ghc-ticket:`25859`)
- Fixed ``bswap64`` code generation on i386 (:ghc-ticket:`25601`)
- Fixed sub-word arithmetic right shift on AArch64 (:ghc-ticket:`26061`)
- Fixed LLVM vector literal emission to include type information
- Fixed LLVM version detection
- Fixed typo in ``padLiveArgs`` that caused segfaults (:ghc-ticket:`25770`, :ghc-ticket:`25773`)
- Fixed constant-folding for Word->Float bitcasts
- Added surface syntax for Word/Float bitcast operations
- Fixed ``MOVD`` format in x86 NCG for ``unpackInt64X2#``
- Added ``-finter-module-far-jumps`` flag for AArch64
- Fixed RV64 J instruction handling for non-local jumps (:ghc-ticket:`25738`)
- Reapplied division by constants optimization
- Fixed TNTC to set CmmProc entry_label properly (:ghc-ticket:`25565`)

Linker
~~~~~~

- Improved efficiency of proddable blocks structure (:ghc-ticket:`26009`)
- Fixed Windows DLL loading to avoid redundant ``LoadLibraryEx`` calls (:ghc-ticket:`26009`)
- Fixed incorrect use of ``break`` in nested for loop (:ghc-ticket:`26052`)
- Fixed linker to not fail due to ``RTLD_NOW`` (:ghc-ticket:`25943`)
- Dropped obsolete Windows XP compatibility checks
- Fix the Windows runtime linker to copy DLL path strings before inserting
  them into the cache, preventing use-after-free issues (:ghc-ticket:`26613`)

GHCi
~~~~

- Fixed ``mkTopLevEnv`` to use ``loadInterfaceForModule`` instead of ``loadSrcInterface`` (:ghc-ticket:`25951`)

Template Haskell
~~~~~~~~~~~~~~~~

- Added explicit export lists to all remaining template-haskell modules

Build system
~~~~~~~~~~~~~~~~

- Exposed all of Backtraces' internals for ghc-internal (:ghc-ticket:`26049`)
- Fixed cross-compilation configuration override (:ghc-ticket:`26236`)

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.

.. ghc-package-list::

    compiler/ghc.cabal:                                  The compiler itself
    libraries/array/array.cabal:                         Dependency of ``ghc`` library
    libraries/base/base.cabal:                           Core library
    libraries/binary/binary.cabal:                       Dependency of ``ghc`` library
    libraries/bytestring/bytestring.cabal:               Dependency of ``ghc`` library
    libraries/Cabal/Cabal/Cabal.cabal:                   Dependency of ``ghc-pkg`` utility
    libraries/Cabal/Cabal-syntax/Cabal-syntax.cabal:     Dependency of ``ghc-pkg`` utility
    libraries/containers/containers/containers.cabal:    Dependency of ``ghc`` library
    libraries/deepseq/deepseq.cabal:                     Dependency of ``ghc`` library
    libraries/directory/directory.cabal:                 Dependency of ``ghc`` library
    libraries/exceptions/exceptions.cabal:               Dependency of ``ghc`` and ``haskeline`` library
    libraries/file-io/file-io.cabal:                     Dependency of ``directory`` library
    libraries/filepath/filepath.cabal:                   Dependency of ``ghc`` library
    libraries/ghc-boot/ghc-boot.cabal:                   Internal compiler library
    libraries/ghc-boot-th/ghc-boot-th.cabal:             Internal compiler library
    libraries/ghc-compact/ghc-compact.cabal:             Core library
    libraries/ghc-experimental/ghc-experimental.cabal:   Core library
    libraries/ghc-heap/ghc-heap.cabal:                   GHC heap-walking library
    libraries/ghci/ghci.cabal:                           The REPL interface
    libraries/ghc-internal/ghc-internal.cabal:           Core library
    libraries/ghc-platform/ghc-platform.cabal:           Internal library
    libraries/ghc-prim/ghc-prim.cabal:                   Core library
    libraries/haskeline/haskeline.cabal:                 Dependency of ``ghci`` executable
    libraries/hpc/hpc.cabal:                             Dependency of ``hpc`` executable
    libraries/integer-gmp/integer-gmp.cabal:             Core library
    libraries/mtl/mtl.cabal:                             Dependency of ``Cabal`` library
    libraries/os-string/os-string.cabal:                 Dependency of ``filepath`` library
    libraries/parsec/parsec.cabal:                       Dependency of ``Cabal`` library
    libraries/pretty/pretty.cabal:                       Dependency of ``ghc`` library
    libraries/process/process.cabal:                     Dependency of ``ghc`` library
    libraries/semaphore-compat/semaphore-compat.cabal:   Dependency of ``ghc`` library
    libraries/stm/stm.cabal:                             Dependency of ``haskeline`` library
    libraries/template-haskell/template-haskell.cabal:   Core library
    libraries/terminfo/terminfo.cabal:                   Dependency of ``haskeline`` library
    libraries/text/text.cabal:                           Dependency of ``Cabal`` library
    libraries/time/time.cabal:                           Dependency of ``ghc`` library
    libraries/transformers/transformers.cabal:           Dependency of ``ghc`` library
    libraries/unix/unix.cabal:                           Dependency of ``ghc`` library
    libraries/Win32/Win32.cabal:                         Dependency of ``ghc`` library
    libraries/xhtml/xhtml.cabal:                         Dependency of ``haddock`` executable
    utils/haddock/haddock-api/haddock-api.cabal:         Dependency of ``haddock`` executable
    utils/haddock/haddock-library/haddock-library.cabal: Dependency of ``haddock`` executable
