2.1. Version 9.16.1

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. Language

  • Fix a bug introduced in GHC 9.10 where GHC would erroneously accept infix uses of promoted data constructors without enabling DataKinds. As a result, you may need to enable DataKinds in code that did not previously require it.

2.1.2. Compiler

  • Code coverage’s (-fhpc) treatment of record fields now extends beyond record fields accessed via RecordWildCards and NamedFieldPuns, and also handles access to nested record fields. That is, in a pattern such as Foo{bar = Bar{baz = b}} both bar and baz will now be marked as covered if b is evaluated. Note that this currently only works when record fields (or values contained within them) are bound to variables. The very similar pattern Foo{bar = Bar{baz = 42}} will will not yet mark bar or baz as covered.

2.1.3. GHCi

2.1.4. Runtime system

  • Add a new poll I/O manager, based on the classic unix poll() API. It is available in the single-threaded RTS on posix platforms. The select I/O manager remains the default for this combination for now, but this default may change in future releases. The new I/O manager can be selected via the runtime flag --io-manager=(name).

    Compared to the select I/O manager, this one has slightly less severe restrictions on the number of sockets/pipes that can be waited on, though it still scales poorly for waiting on socket/pipe readiness. It does however scale much better for thread timers (such as threadDelay), and improves timer precision on 32bit Linux and 32bit FreeBSD from milliseconds to microseconds.

    This I/O manager introduces new infrastructure for I/O managers that is intended to be used in future for a new generation of in-RTS I/O managers, using more scalable platform-specific APIs (such as epoll, io_uring and kqueue). This first one, based on poll(), is merely intended to be portable.

2.1.5. Cmm

2.1.6. base library

2.1.7. ghc-prim library

2.1.8. ghc library

2.1.9. ghc-heap library

2.1.10. ghc-experimental library

2.1.11. template-haskell library

  • We have added the addDependentDirectory function to match addDependentFile, which adds a directory to the list of dependencies that the recompilation checker will look at to determine if a module needs to be recompiled.

2.1.12. 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.15

The compiler itself

Cabal-syntax

3.16.0.0

Dependency of ghc-pkg utility

Cabal

3.16.0.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.22.0.0

Core library

binary

0.8.9.3

Dependency of ghc library

bytestring

0.12.2.0

Dependency of ghc library

containers

0.8

Dependency of ghc library

deepseq

1.5.1.0

Dependency of ghc library

directory

1.3.10.0

Dependency of ghc library

exceptions

0.10.9

Dependency of ghc and haskeline library

file-io

0.1.5

Dependency of directory library

filepath

1.5.4.0

Dependency of ghc library

ghc-boot-th

9.15

Internal compiler library

ghc-boot

9.15

Internal compiler library

ghc-compact

0.1.0.0

Core library

ghc-heap

9.15

GHC heap-walking library

ghc-prim

0.13.1

Core library

ghci

9.15

The REPL interface

haskeline

0.8.3.0

Dependency of ghci executable

hpc

0.7.0.2

Dependency of hpc executable

integer-gmp

1.1

Core library

mtl

2.3.1

Dependency of Cabal library

os-string

2.0.7

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

stm

2.5.3.1

Dependency of haskeline library

template-haskell

2.24.0.0

Core library

terminfo

0.4.1.7

Dependency of haskeline library

text

2.1.3

Dependency of Cabal library

time

1.15

Dependency of ghc library

transformers

0.6.1.2

Dependency of ghc library

unix

2.8.7.0

Dependency of ghc library

xhtml

3000.2.2.1

Dependency of haddock executable

haddock-api

2.30.0

Dependency of haddock executable

haddock-library

1.11.0

Dependency of haddock executable