Skip to content

Commit 3fdc778

Browse files
authored
Create index.md
1 parent 70c332c commit 3fdc778

File tree

1 file changed

+12
-0
lines changed
  • message-index/messages/GHC-58008

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: Pattern matching on GADTs without MonoLocalBinds is fragile
3+
summary: Pattern matching on GADTs without MonoLocalBinds is fragile
4+
introduced: 9.6.1
5+
severity: warning
6+
---
7+
8+
This warning is triggered on pattern matching involving GADTs, if `MonoLocalBinds` is disabled. Type inference can be fragile in this case.
9+
See the OutsideIn(X) paper and Let-generalisation for more details.
10+
To resolve this warning, you can enable `MonoLocalBinds` or an extension implying it (`GADTs` or `TypeFamilies`).
11+
The warning is also triggered when matching on GADT-like pattern synonyms (i.e. pattern synonyms containing equalities in provided constraints).
12+
In previous versions of GHC (9.2 and below), it was an error to pattern match on a GADT if neither `GADTs` nor `TypeFamilies` were enabled.

0 commit comments

Comments
 (0)