[Git][ghc/ghc][wip/or-pats] Change error texts
David (@knothed)
gitlab at gitlab.haskell.org
Mon Dec 12 16:00:36 UTC 2022
David pushed to branch wip/or-pats at Glasgow Haskell Compiler / GHC
Commits:
72fab280 by David Knothe at 2022-12-12T17:00:29+01:00
Change error texts
- - - - -
4 changed files:
- compiler/GHC/Parser/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- testsuite/tests/parser/should_fail/Or2.stderr
- testsuite/tests/typecheck/should_fail/Or3.stderr
Changes:
=====================================
compiler/GHC/Parser/Errors/Ppr.hs
=====================================
@@ -524,7 +524,7 @@ instance Diagnostic PsMessage where
, text "but it is not" ]
PsErrOrPatNeedsTwoAlternatives pat
- -> mkSimpleDecorated $ vcat [text "Or-pattern needs at least two alternatives:" <+> ppr (unLoc pat)]
+ -> mkSimpleDecorated $ vcat [text "An or-pattern needs at least two alternatives:" <+> ppr (unLoc pat)]
PsErrIllegalOrPat pat
-> mkSimpleDecorated $ vcat [text "Illegal or-pattern:" <+> ppr (unLoc pat)]
=====================================
compiler/GHC/Tc/Errors/Ppr.hs
=====================================
@@ -1154,8 +1154,8 @@ instance Diagnostic TcRnMessage where
TcRnReportCustomQuasiError _ msg -> mkSimpleDecorated $ text msg
TcRnInterfaceLookupError _ sdoc -> mkSimpleDecorated sdoc
TcRnOrPatBindsVariables pat vars -> case vars of
- True -> mkSimpleDecorated $ text "Or-pattern may not bind variables:" <+> ppr pat
- False -> mkSimpleDecorated $ text "Or-pattern may not bind (type) variable, dictionary or equality constraints:" <+> ppr pat
+ True -> mkSimpleDecorated $ text "An or-pattern may not bind variables:" <+> ppr pat
+ False -> mkSimpleDecorated $ text "An or-pattern may not bind (type) variables nor type class or equality constraints:" <+> ppr pat
TcRnUnsatisfiedMinimalDef mindef
-> mkSimpleDecorated $
vcat [text "No explicit implementation for"
=====================================
testsuite/tests/parser/should_fail/Or2.stderr
=====================================
@@ -1,3 +1,3 @@
Or2.hs:6:4: error: [GHC-96152]
- Or-pattern needs at least two alternatives: one of 4
+ An or-pattern needs at least two alternatives: one of 4
=====================================
testsuite/tests/typecheck/should_fail/Or3.stderr
=====================================
@@ -1,14 +1,14 @@
Or3.hs:12:6: error: [GHC-81303]
- Or-pattern may not bind (type) variable, dictionary or equality constraints: one of G2,
- G1
+ An or-pattern may not bind (type) variables nor type class or equality constraints: one of G2,
+ G1
Or3.hs:19:8: error: [GHC-81303]
- Or-pattern may not bind (type) variable, dictionary or equality constraints: one of IsInt1 {},
- IsInt2 {}
+ An or-pattern may not bind (type) variables nor type class or equality constraints: one of IsInt1 {},
+ IsInt2 {}
Or3.hs:22:4: error: [GHC-81303]
- Or-pattern may not bind variables: one of Left a, Right a
+ An or-pattern may not bind variables: one of Left a, Right a
Or3.hs:25:15: error: [GHC-81303]
- Or-pattern may not bind variables: one of _, x
+ An or-pattern may not bind variables: one of _, x
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/72fab2802f79756af7f9e240131e6f243733634e
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/72fab2802f79756af7f9e240131e6f243733634e
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20221212/a3b5f437/attachment-0001.html>
More information about the ghc-commits
mailing list