2.1. Version 9.10.1

2.1.1. Language

  • Part 1 of GHC Proposal #281 “Visible forall in types of terms” has been implemented. The following code is now accepted by GHC:

    idv :: forall a -> a -> a
    idv (type a) (x :: a) = x
    
    x = idv (type Int) 42
    

    This feature is guarded behind RequiredTypeArguments and ExplicitNamespaces.

2.1.2. Compiler

  • GHC Proposal #516 has been implemented. It introduces a warning -Wincomplete-record-selectors which warns about when an invocation of a record selector may fail due to being applied to a constructor for which it is not defined.

    For example

    data T = T1 | T2 { x :: Int }
    f :: T -> Int
    f a = x a + 1 -- emit a warning here, since `f T1` will fail
    

    Unlike -Wpartial-fields this produces a warning about incomplete selectors at use sites instead of definition sites, so it is useful in cases when the library does intend for incomplete record selectors to be used but only in specific circumstances (e.g. when other cases are handled by previous pattern matches).

  • The -finfo-table-map-with-stack and -finfo-table-map-with-fallback flags have been introduced. These flags include STACK info tables and info tables with default source location information in the info table map, respectively. They are implied by the -finfo-table-map flag. The corresponding negative flags (-fno-info-table-map-with-stack, -fno-info-table-map-with-fallback) are useful for omitting these info tables from the info table map and reducing the size of executables containing info table profiling information. In a test on the Agda codebase, the size of the build results was reduced by about 10% when these info tables were omitted.

  • Fixed a bug where compiling with both -ddump-timings and -ddump-to-file did not suppress printing timings to the console. See #20316.

  • Defaulting plugins can now propose solutions to entangled sets of type variables. This allows defaulting of multi-parameter type classes. See #23832.

2.1.3. GHCi

2.1.4. Runtime system

  • Internal fragmentation incurred by the non-moving GC’s allocator has been reduced for small objects. In one real-world application, this has reduced resident set size by about 20% and modestly improved run-time. See #23340. --nonmoving-dense-allocator-count=⟨count⟩ has been added to fine-tune this behaviour.

2.1.5. base library

2.1.6. ghc-prim library

2.1.7. ghc library

2.1.8. ghc-heap library

2.1.9. ghc-experimental library

2.1.10. template-haskell library

  • Extend Pat with TypeP and Exp with TypeE, introduce functions typeP and typeE (Template Haskell support for GHC Proposal #281).

2.1.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.9 The compiler itself
Cabal-syntax 3.11.0.0 Dependency of ghc-pkg utility
Cabal 3.11.0.0 Dependency of ghc-pkg utility
Win32 2.13.4.0 Dependency of ghc library
array 0.5.6.0 Dependency of ghc library
base 4.19.0.0 Core library
binary 0.8.9.1 Dependency of ghc library
bytestring 0.11.5.1 Dependency of ghc library
containers 0.6.7 Dependency of ghc library
deepseq 1.5.0.0 Dependency of ghc library
directory 1.3.8.1 Dependency of ghc library
exceptions 0.10.7 Dependency of ghc and haskeline library
filepath 1.4.100.4 Dependency of ghc library
ghc-boot-th 9.9 Internal compiler library
ghc-boot 9.9 Internal compiler library
ghc-compact 0.1.0.0 Core library
ghc-heap 9.9 GHC heap-walking library
ghc-prim 0.10.0 Core library
ghci 9.9 The REPL interface
haskeline 0.8.2.1 Dependency of ghci executable
hpc 0.7.0.0 Dependency of hpc executable
integer-gmp 1.1 Core library
mtl 2.3.1 Dependency of Cabal library
parsec 3.1.16.1 Dependency of Cabal library
pretty 1.1.3.6 Dependency of ghc library
process 1.6.17.0 Dependency of ghc library
stm 2.5.1.0 Dependency of haskeline library
template-haskell 2.21.0.0 Core library
terminfo 0.4.1.6 Dependency of haskeline library
text 2.1 Dependency of Cabal library
time 1.12.2 Dependency of ghc library
transformers 0.6.1.0 Dependency of ghc library
unix 2.8.2.1 Dependency of ghc library
xhtml 3000.2.2.1 Dependency of haddock executable