Skip to content
Snippets Groups Projects
Forked from Glasgow Haskell Compiler / GHC
Loading
Code owners
9.10.1-notes.rst 5.45 KiB

.. _release-9-10-1:

Version 9.10.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 :extension:`RequiredTypeArguments` and :extension:`ExplicitNamespaces`.

Compiler
~~~~~~~~

- GHC Proposal `#516
`_
has been implemented. It introduces a warning :ghc-flag:`-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 :ghc-flag:`-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 :ghc-flag:`-finfo-table-map-with-stack` and
:ghc-flag:`-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 :ghc-flag:`-finfo-table-map` flag. The corresponding negative flags
(:ghc-flag:`-fno-info-table-map-with-stack`,
:ghc-flag:`-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 :ghc-flag:`-ddump-timings` and :ghc-flag:`-ddump-to-file` did not
suppress printing timings to the console. See :ghc-ticket:`20316`.

GHCi
~~~~

Runtime system
~~~~~~~~~~~~~~

``base`` library
~~~~~~~~~~~~~~~~

``ghc-prim`` library
~~~~~~~~~~~~~~~~~~~~

``ghc`` library
~~~~~~~~~~~~~~~

``ghc-heap`` library
~~~~~~~~~~~~~~~~~~~~

``template-haskell`` library
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

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