.. _release-8-10-5:
Release notes for version 8.10.5
================================

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

Like previous releases in the 8.10 series, the :ghc-flag:`LLVM backend <-fllvm>`
of this release is to be used with LLVM 9.

General bug fixes
-----------------

- First-class support for Apple M1 hardware using GHC's LLVM ARM backend

- Fix a bug where code may be unloaded prematurely when using the parallel
  garbage collector (see :ghc-ticket:`19417`)

- Fix a bug where the linker may during shutdown unload code before
  libraries' ``atexit`` handlers have a chance to run (:ghc-ticket:`19297`).

- Improve code layout by distiguishing conditional and unconditional branches
  (:ghc-ticket:`18053`).

- Add ``hs-boot`` file support for :ghc-flag:`-ddump-minimal-imports`
  (:ghc-ticket:`18497`).

- Ensure ``hs-boot`` files are built before source files in GHCs ``-M`` mode
  (:ghc-ticket:`14482`)

- Fix a long standing GHC API bug affecting clients like HLS where async
  exceptions used to cancel threads during typechecking would be caught by the
  Template Haskell evaluator and reported as compile errors (:ghc-ticket:`19410`).

- Improve error messages when looking up packages fails (:ghc-ticket:`19370`).

- Fix a number of quirks in GC accounting (:ghc-ticket:`19147`)

- Fix a code generation bug which could result in entry of unlifted objects
  in some programs using unboxed sums (:ghc-ticket:`19645`).

- Ensure that POSIX signals are not delivered to the ticker thread when using
  the pthread itimer implementation.

- Fix a specialiser bug which could result in the construction of
  recursive dictionaries in some programs (:ghc-ticket:`17151`).

- Bump ``containers`` to 0.6.4.1

- Do not treat :ghc-flag:`-Winferred-safe-imports` warnings as errors.

- Fix a bug where typechecker plugins could be run with an inconsistent
  typechecker environment (:ghc-ticket:`19191`).

- Fix a simplifier bug which lead to an exponential blow up and excessive
  memory usage in certain cases (:ghc-ticket:`18923`, :ghc-ticket:`18140`, :ghc-ticket:`10421`, :ghc-ticket:`18282`, :ghc-ticket:`13253`)

Portability fixes
-----------------

- Fix a number of linking portability issues affecting Apple's macOS Big Sur.

- Use the pthread-based itimer implemention under FreeBSD by default

- Enable large-file support in ``base``\'s the OFD file locking
  implementation, avoiding :ghc-ticket:`17950`.

- Ensure that Darwin binary distributions do not depend upon ``utimensat``
  (:ghc-ticket:`17895`).

- Remove a number of older autoconf idioms from the ``configure`` script,
  improving support in newer environments.

Known issues
------------

- A long-standing bug (:ghc-ticket:`16893`) which can cause some applications
  of ``unsafeCoerce`` to segmentation fault is only partially fixed in this
  release. This release only avoids this issue in the uses of ``unsafeCoerce``
  in ``Data.Typeable.Internal``, which was the proximate cause of
  :ghc-ticket:`16893`.

  However, it is possible that this bug could manifest in user-code using
  ``unsafeCoerce`` to perform dynamic type checks. See the :ghc-ticket:`ticket
  <16893>` for details.

  We expect that this issue will be fixed in the next major release of GHC.

- A long-standing bug (:ghc-ticket:`17760`) where some uses of the ``touch#``
  primop can be dropped by the simplifier is present in this release. This bug
  will be fixed in GHC 9.0.1. In the meantime, see the :ghc-ticket:`ticket
  <17760>` for mitigations.


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/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 ``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
    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/libiserv/libiserv.cabal:       Internal compiler 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



