summaryrefslogtreecommitdiff
path: root/docs/users_guide/9.2.1-notes.rst
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2021-03-05 19:43:23 -0500
committerRyan Scott <ryan.gl.scott@gmail.com>2021-03-05 19:45:25 -0500
commit7ee44d589a94c9cf7d352cab9424f2e78504f0ee (patch)
tree0a6cda5819e65693dd3d6e2d8e2326e63d3136ab /docs/users_guide/9.2.1-notes.rst
parent31e265c1df948d1bcc82d08affe995fd1d1c1438 (diff)
downloadhaskell-wip/T19457.tar.gz
Document operator sections' interaction with subsumptionwip/T19457
This resolves #19457 by making a note of breaking changes (introduced in GHC 9.2) to the way that GHC typechecks operator sections where the operator has nested `forall`s or contexts in its type signature.
Diffstat (limited to 'docs/users_guide/9.2.1-notes.rst')
-rw-r--r--docs/users_guide/9.2.1-notes.rst15
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/users_guide/9.2.1-notes.rst b/docs/users_guide/9.2.1-notes.rst
index 5e0bf1c317..521427b4d9 100644
--- a/docs/users_guide/9.2.1-notes.rst
+++ b/docs/users_guide/9.2.1-notes.rst
@@ -65,6 +65,21 @@ Language
record pattern synonyms. In particular, it is possible for a single module
to define multiple pattern synonyms using the same field names.
+* Because of simplifications to the way that GHC typechecks operator sections,
+ operators with nested ``forall``\ s or contexts in their type signatures might
+ not typecheck when used in a section. For instance, the ``g`` function below,
+ which was accepted in previous GHC releases, will no longer typecheck: ::
+
+ f :: a -> forall b. b -> a
+ f x _ = x
+
+ g :: a -> a
+ g = (`f` "hello")
+
+ ``g`` can be made to typecheck once more by eta expanding it to
+ ``\x -> x \`f\` "hello"``. For more information, see
+ :ref:`simple-subsumption`.
+
Compiler
~~~~~~~~