.. _release-9-16-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. Language ~~~~~~~~ - Fix a bug introduced in GHC 9.10 where GHC would erroneously accept infix uses of promoted data constructors without enabling :extension:`DataKinds`. As a result, you may need to enable :extension:`DataKinds` in code that did not previously require it. - ``Type`` and ``Constraint`` are now (at last) completely distinct types, just as much as ``Int`` and ``Bool``. For example, you can now write:: type family F a type instance F Type = Int type instance F Constraint = Bool which was previously rejected with "Conflicting family instance declarations". - The extension :extension:`ExplicitNamespaces` now allows namespace-specified wildcards ``type ..`` and ``data ..`` in import and export lists. - Implicit parameters and ``ImpredicativeTypes``. GHC now knows that if ``?foo::S`` is coecible to ``?foo::T`` only if ``S`` is coercible to ``T``. Example (from :ghc-ticket:`#26737`):: {-# LANGUAGE ImplicitParams, ImpredicativeTypes #-} newtype N = MkN Int test :: ((?foo::N) => Bool) -> ((?foo::Int) => Bool) test = coerce This is achieved by arranging that ``?foo :: T`` has a representational role for ``T``. - Implement ``-XQualifiedStrings`` (`proposal `_) Compiler ~~~~~~~~ - Code coverage's (:ghc-flag:`-fhpc`) treatment of record fields now extends beyond record fields accessed via :extension:`RecordWildCards` and :extension:`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. - Pattern synonyms can now be suggested as valid hole fits (except, of course, if they are unidirectional). - GHC uses the information from the definition of a *closed* type family to generate some extra functional dependencies for type equalities involving that type family. As a consequence: * typechecking will succeed a bit more often (see :ghc-ticket:`23162`) * pattern-match incompleteness checking is a bit smarter, giving fewer false warnings (see :ghc-ticket:`#22652`) - When multiple ``-msse*`` flags are given, the maximum version takes effect. For example, ``-msse4.2 -msse2`` is now equivalent to ``-msse4.2``. Previously, only the last flag took effect. - Some x86 architecture flags now imply other flags. For example, :ghc-flag:`-mavx` now implies :ghc-flag:`-msse4.2`, and :ghc-flag:`-mavx512f` now implies :ghc-flag:`-mfma` in addition to :ghc-flag:`-mavx2`. Refer to the users' guide for more details about each individual flag. - The flag ``-fhide-source-paths`` is enabled by default at verbosity level 1 and below by default. This improves the readability of the compiler output, as we transition from: .. code-block:: text [ 1 of 139] Compiling Distribution.Compat.Binary ( src/Distribution/Compat/Binary.hs, /home/tchoutri/Code/cabal/dist-newstyle/build/x86_64-linux/ghc-9.12.2/Cabal-syntax-3.17.0.0/build/Distribution/Compat/Binary.o, /home/tchoutri/Code/cabal/dist-newstyle/build/x86_64-linux/ghc-9.12.2/Cabal-syntax-3.17.0.0/build/Distribution/Compat/Binary.dyn_o ) [ 2 of 139] Compiling Distribution.Compat.Exception ( src/Distribution/Compat/Exception.hs, /home/tchoutri/Code/cabal/dist-newstyle/build/x86_64-linux/ghc-9.12.2/Cabal-syntax-3.17.0.0/build/Distribution/Compat/Exception.o, /home/tchoutri/Code/cabal/dist-newstyle/build/x86_64-linux/ghc-9.12.2/Cabal-syntax-3.17.0.0/build/Distribution/Compat/Exception.dyn_o ) [ 3 of 139] Compiling Distribution.Compat.Newtype ( src/Distribution/Compat/Newtype.hs, /home/tchoutri/Code/cabal/dist-newstyle/build/x86_64-linux/ghc-9.12.2/Cabal-syntax-3.17.0.0/build/Distribution/Compat/Newtype.o, /home/tchoutri/Code/cabal/dist-newstyle/build/x86_64-linux/ghc-9.12.2/Cabal-syntax-3.17.0.0/build/Distribution/Compat/Newtype.dyn_o ) [ 4 of 139] Compiling Distribution.Compat.Semigroup ( src/Distribution/Compat/Semigroup.hs, /home/tchoutri/Code/cabal/dist-newstyle/build/x86_64-linux/ghc-9.12.2/Cabal-syntax-3.17.0.0/build/Distribution/Compat/Semigroup.o, /home/tchoutri/Code/cabal/dist-newstyle/build/x86_64-linux/ghc-9.12.2/Cabal-syntax-3.17.0.0/build/Distribution/Compat/Semigroup.dyn_o ) [ 5 of 139] Compiling Distribution.PackageDescription.Utils ( src/Distribution/PackageDescription/Utils.hs, /home/tchoutri/Code/cabal/dist-newstyle/build/x86_64-linux/ghc-9.12.2/Cabal-syntax-3.17.0.0/build/Distribution/PackageDescription/Utils.o, /home/tchoutri/Code/cabal/dist-newstyle/build/x86_64-linux/ghc-9.12.2/Cabal-syntax-3.17.0.0/build/Distribution/PackageDescription/Utils.dyn_o ) [ 6 of 139] Compiling Distribution.Utils.Base62 ( src/Distribution/Utils/Base62.hs, /home/tchoutri/Code/cabal/dist-newstyle/build/x86_64-linux/ghc-9.12.2/Cabal-syntax-3.17.0.0/build/Distribution/Utils/Base62.o, /home/tchoutri/Code/cabal/dist-newstyle/build/x86_64-linux/ghc-9.12.2/Cabal-syntax-3.17.0.0/build/Distribution/Utils/Base62.dyn_o ) [ 7 of 139] Compiling Distribution.Utils.MD5 ( src/Distribution/Utils/MD5.hs, /home/tchoutri/Code/cabal/dist-newstyle/build/x86_64-linux/ghc-9.12.2/Cabal-syntax-3.17.0.0/build/Distribution/Utils/MD5.o, /home/tchoutri/Code/cabal/dist-newstyle/build/x86_64-linux/ghc-9.12.2/Cabal-syntax-3.17.0.0/build/Distribution/Utils/MD5.dyn_o ) to .. code-block:: text [ 1 of 139] Compiling Distribution.Compat.Binary [ 2 of 139] Compiling Distribution.Compat.Exception [ 3 of 139] Compiling Distribution.Compat.Newtype [ 4 of 139] Compiling Distribution.Compat.Semigroup [ 5 of 139] Compiling Distribution.PackageDescription.Utils [ 6 of 139] Compiling Distribution.Utils.Base62 [ 7 of 139] Compiling Distribution.Utils.MD5 See :ghc-ticket:`25345`. - Add several options for x86 extensions: :ghc-flag:`-mavx512bw`, :ghc-flag:`-mavx512dq`, :ghc-flag:`-mavx512vl`, and :ghc-flag:`-mgfni`. GHCi ~~~~ 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 :rts-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. - The default for :rts-flag:`--eventlog-flush-interval=⟨seconds⟩` has changed from being disabled to being enabled with a flush inverval of 5 seconds. Cmm ~~~ ``base`` library ~~~~~~~~~~~~~~~~ - Updated to `Unicode 17.0.0 `_. ``ghc-prim`` library ~~~~~~~~~~~~~~~~~~~~ ``ghc`` library ~~~~~~~~~~~~~~~ ``ghc-heap`` library ~~~~~~~~~~~~~~~~~~~~ ``ghc-experimental`` library ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - New SIMD primops for bitwise logical operations on 128-wide vectors. ``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. 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:: 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/filepath/filepath.cabal: Dependency of ``ghc`` library compiler/ghc.cabal: The compiler itself libraries/ghci/ghci.cabal: The REPL interface 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-heap/ghc-heap.cabal: GHC heap-walking library libraries/ghc-prim/ghc-prim.cabal: Core library utils/haddock/haddock-api/haddock-api.cabal: Dependency of ``haddock`` executable utils/haddock/haddock-library/haddock-library.cabal: Dependency of ``haddock`` executable 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/parsec/parsec.cabal: Dependency of ``Cabal`` library libraries/pretty/pretty.cabal: Dependency of ``ghc`` library libraries/process/process.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 libraries/os-string/os-string.cabal: Dependency of ``filepath`` library libraries/file-io/file-io.cabal: Dependency of ``directory`` library