summaryrefslogtreecommitdiff
path: root/docs/users_guide/9.2.1-notes.rst
blob: 516bf3656375465dac557ea053c0ea2c0e0752fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.. _release-9-2-1:

Version 9.2.1
==============

Language
~~~~~~~~

* :extension:`ImpredicativeTypes`: Finally, polymorphic types have become first class!
  GHC 9.2 includes a full implementation of the Quick Look approach to type inference for
  impredicative types, as described in in the paper
  `A quick look at impredicativity
  <https://www.microsoft.com/en-us/research/publication/a-quick-look-at-impredicativity/>`__
 (Serrano et al, ICFP 2020).  More information here: :ref:`impredicative-polymorphism`.
 This replaces the old (undefined, flaky) behaviour of the :extension:`ImpredicativeTypes` extension.

Compiler
~~~~~~~~

- New '-Wredundant-bang-patterns' flag that enables checks for "dead" bangs.
  For instance, given this program: ::

      f :: Bool -> Bool
      f True = False
      f !x   = x

  GHC would report that the bang on ``x`` is redundant and can be removed
  since the argument was already forced in the first equation. For more
  details see :ghc-flag:`-Wredundant-bang-patterns`