diff options
Diffstat (limited to 'compiler/GHC/Tc/Errors/Types.hs')
-rw-r--r-- | compiler/GHC/Tc/Errors/Types.hs | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/compiler/GHC/Tc/Errors/Types.hs b/compiler/GHC/Tc/Errors/Types.hs index bce545eade..8188146d26 100644 --- a/compiler/GHC/Tc/Errors/Types.hs +++ b/compiler/GHC/Tc/Errors/Types.hs @@ -2730,15 +2730,24 @@ data TcRnMessage where -} TcRnInterfaceLookupError :: !Name -> !SDoc -> TcRnMessage - {-| TcRnOrPatBindsVariables is an error that happens when an - or-pattern binds variables or has dictionary or evidence biders, e.g. (one of A, B x). + {-| TcRnOrPatBindsVariables is an error that happens when + a pattern nested in an or-pattern binds variables, e.g. (one of A; B x). Test case: testsuite/tests/typecheck/should_fail/Or3 -} TcRnOrPatBindsVariables - :: Pat GhcTc -- the or-pattern - -> Bool -- True => pattern contains just (type) variables; False => pattern contains other dictionary/evidence binders + :: Pat GhcRn -- the or-pattern + -> TcRnMessage + + {-| TcRnOrPatHasVisibleTyApps is an error that happens when + a pattern nested in an or-pattern uses a visible type application e.g. (one of Just @Int _). + + Test case: + todo + -} + TcRnOrPatHasVisibleTyApps + :: Pat GhcRn -- the or-pattern -> TcRnMessage {- | TcRnUnsatisfiedMinimalDef is a warning that occurs when a class instance |