summaryrefslogtreecommitdiff
path: root/docs/users_guide/9.4.1-notes.rst
diff options
context:
space:
mode:
authorJakob Bruenker <jakob.bruenker@gmail.com>2022-03-21 00:14:25 +0100
committerJakob Bruenker <jakob.bruenker@gmail.com>2022-03-31 17:45:37 +0200
commita9c0c69b42657d39f26ab822241900ba0f308dc3 (patch)
treefd59a5e49146ee436e04137b313d8e4178c2bed0 /docs/users_guide/9.4.1-notes.rst
parentdda46e2da13268c239db3290720b014cef00c01d (diff)
downloadhaskell-wip/T20768.tar.gz
Implement \cases (Proposal 302)wip/T20768
This commit implements proposal 302: \cases - Multi-way lambda expressions. This adds a new expression heralded by \cases, which works exactly like \case, but can match multiple apats instead of a single pat. Updates submodule haddock to support the ITlcases token. Closes #20768
Diffstat (limited to 'docs/users_guide/9.4.1-notes.rst')
-rw-r--r--docs/users_guide/9.4.1-notes.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/users_guide/9.4.1-notes.rst b/docs/users_guide/9.4.1-notes.rst
index 39ab943356..0bb8b21eee 100644
--- a/docs/users_guide/9.4.1-notes.rst
+++ b/docs/users_guide/9.4.1-notes.rst
@@ -41,6 +41,12 @@ Language
re-exported from ``Prelude``. When ``(~)`` is not in scope, its use results
in a warning (:ghc-flag:`-Wtype-equality-out-of-scope`).
+- GHC Proposal `#302 <https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0302-cases.rst>`_ has been implemented.
+ This means under ``-XLambdaCase``, a new expression heralded by ``\cases`` is
+ available, which works like ``\case`` but can match on multiple patterns.
+ This means constructor patterns with arguments have to parenthesized here,
+ just like in lambda expressions.
+
- There were previously cases around functional dependencies and injective
type families where the result of type inference would depend on the order
of constraints, as written in a source file. These cases are fundamentally ambiguous.