2.2. Version 9.2.2

The significant changes to the various parts of the compiler are listed in the following sections.

The LLVM backend of this release is to be used with LLVM 9, 10, 11, or 12.

2.2.1. Compiler

  • Numerous improvements in compiler performance.
  • A fix for GHC’s handling of the XDG Base Directory Specification (#6077, #20684, #20669, #20660):
    • For the package database previously in ~/.ghc/<arch-ver>, we will continue to use the old path if it exists. For example, if the ~/.ghc/x86_64-linux-9.4.1 directory exists, GHC will use that for its user package database. If this directory does not exist, we will use $XDG_DATA_HOME/ghc/x86_64-linux-9.4.1. This is in order to give tooling like cabal time to migrate
    • For GHCi configuration files previously located in ~/.ghc/ like ghci.conf and ghci_history, we will first check if they exist in ~/.ghc and use those if they do. However, we will create new files like ghci_history only in $XDG_DATA_HOME/ghc. So if you don’t have a previous GHC installation which created ~/.ghc/ghci_history, the history file will be written to $XDG_DATA_HOME/ghc. If you already have an older GHC installation which wrote ~/.ghc/ghci_history, then GHC will continue to write the history to that file.
  • Fix bug in CPR analysis’s treatment of join points which may result in runtime crashes (#18824).
  • Link against libatomic for atomic operations on platforms where this is necessary (#19119).
  • Fix bootstrapping of compiler with GHC 9.2 and later (#19631)
  • Silence non-actionable warnings regarding missed specialisations of class methods (#19592).
  • Fix a race condition in the registration of ticky-ticky profiling counters, potentially resulting in hangs when ticky-ticky is used in a threaded application (#20451).
  • Introduce a flag, -Wunicode-bidirectional-format-characters, to warn if Unicode bidirectional formatting are found in Haskell source files.
  • Improve the pattern match checker’s handling of unlifted data types, eliminating spurious warnings from impossible branches (#20631).
  • Fix a compiler crash due to incorrect in-scope set (#20639)
  • Don’t use implicit lifting when deriving a Lift instances, fixing #20688.
  • Unbox unlifted datatypes fields (#20663).
  • Introduce a flag, -fcheck-prim-bounds, which adds dynamic bounds checks in the code generated for array primops (#20769).
  • Ensure that the indexWord8ArrayAs<Type># family of array primops are lowered correctly on platforms which do not support unaligned memory access (#21015, #20987).
  • Fix a potential bug where common-block elimination may common-up incompatible load operations (#21016)
  • Eliminate the ghc library’s dependence on parsec (#21033).
  • Introduced -fcompact-unwind , enabling the generation of compact unwinding information on Apple Darwin targets (#11829).
  • Fix a bug where some exception closures could be inappropriately garbage collected, resulting in crashes (#21141)
  • Fix a variety of bugs in the AArch64 code generator’s handling of sub-word-size values (#19993, #20637, #20638).

2.2.2. GHCi

  • Fix bug in handling of GHC environment files which lead to unintentional resetting of GHCi’s package state (#19650)

2.2.3. Core libraries

  • Fix a few bugs in WinIO which might result in heap corruption (#21048).
  • Fix an interaction between WinIO and deadlock detection, resulting in programs potentially hanging in IO (#18382)
  • Add CTYPE pragmas to all foreign type wrappers (e.g. Foreign.C.Types), ensuring that correct signatures are generated for capi foreign imports (#15531).
  • Fix incorrect implementation of Data.Type.Ord.<: (TODO)
  • Bump stm to release 2.5.0.2 (#20575)
  • Avoid using Apple Darwin’s broken one-shot kqueue implementation (#20662)

2.2.4. Build system and packaging

  • Fix generation of binary distribution for cross-compilers with Hadrian (#20267)
  • Don’t rely on non-POSIX realpath utility in Hadrian’s binary distribution installation Makefile (#19963)

2.2.5. Runtime system

  • #20577
  • Teach runtime linker to resolve special iconv_ symbols on FreeBSD (#20354)
  • Fix garbage collector statistics produced when run -qn 1 (#19685).
  • Fix the reporting of elapsed GC time when using the non-moving garbage collector. (#20751)
  • Fix a bug where the memory-mapping base address was not updated after creating a mapping, resulting in linking failures (#20734)
  • Eliminate a case in the linker which would result in memory mappings that were simultaneously writable and executable (#20814).
  • Seed environ in the runtime system’s symbol table, ensuring that environment is correctly propagated to loaded objects (#20861 and related tickets)
  • Introduce a new flag, --null-eventlog-writer, allowing the eventlog to be enabled while suppressing the usual .eventlog file output. This can be useful when running programs with a custom eventlog writer.

2.2.6. 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.2.2 The compiler itself
Cabal 3.6.3.0 Dependency of ghc-pkg utility
Win32 2.12.0.1 Dependency of ghc library
array 0.5.4.0 Dependency of ghc library
base 4.16.1.0 Core library
binary 0.8.9.0 Dependency of ghc library
bytestring 0.11.3.0 Dependency of ghc library
containers 0.6.5.1 Dependency of ghc library
deepseq 1.4.6.1 Dependency of ghc library
directory 1.3.6.2 Dependency of ghc library
exceptions 0.10.4 Dependency of ghc and haskeline library
filepath 1.4.2.2 Dependency of ghc library
ghc-boot-th 9.2.2 Internal compiler library
ghc-boot 9.2.2 Internal compiler library
ghc-compact 0.1.0.0 Core library
ghc-heap 9.2.2 GHC heap-walking library
ghc-prim 0.8.0 Core library
ghci 9.2.2 The REPL interface
haskeline 0.8.2 Dependency of ghci executable
hpc 0.6.1.0 Dependency of hpc executable
integer-gmp 1.1 Core library
libiserv 9.2.2 Internal compiler library
mtl 2.2.2 Dependency of Cabal library
parsec 3.1.15.0 Dependency of Cabal library
pretty 1.1.3.6 Dependency of ghc library
process 1.6.13.2 Dependency of ghc library
stm 2.5.0.2 Dependency of haskeline library
template-haskell 2.18.0.0 Core library
terminfo 0.4.1.5 Dependency of haskeline library
text 1.2.5.0 Dependency of Cabal library
time 1.11.1.1 Dependency of ghc library
transformers 0.5.6.2 Dependency of ghc library
unix 2.7.2.2 Dependency of ghc library
xhtml 3000.2.2.1 Dependency of haddock executable