summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSasha Bogicevic <sasa.bogicevic@pm.me>2022-07-20 10:27:41 +0200
committerSasha Bogicevic <sasa.bogicevic@pm.me>2022-07-25 20:12:07 +0200
commitb5772bcc0a65715a9ec4ca972e114cc84b6cf5e5 (patch)
tree2aebcb30cb2a615454ec6c3d553dc01176eec8de
parent30682a45b942992629fd637a8035fa6894007623 (diff)
downloadhaskell-wip/21101.tar.gz
21101 Error message text for invalid record wildcard matchwip/21101
-rw-r--r--compiler/GHC/Tc/Errors/Ppr.hs15
1 files changed, 8 insertions, 7 deletions
diff --git a/compiler/GHC/Tc/Errors/Ppr.hs b/compiler/GHC/Tc/Errors/Ppr.hs
index 44babfcded..c09f74477e 100644
--- a/compiler/GHC/Tc/Errors/Ppr.hs
+++ b/compiler/GHC/Tc/Errors/Ppr.hs
@@ -232,14 +232,15 @@ instance Diagnostic TcRnMessage where
-> mkSimpleDecorated $ text "character literal out of range: '\\" <> char c <> char '\''
TcRnIllegalWildcardsInConstructor con
-> mkSimpleDecorated $
- vcat [ text "Illegal `..' notation for constructor" <+> quotes (ppr con)
- , nest 2 (text "The constructor has no labelled fields") ]
- vcat [text "The data constructor" <+> quotes (ppr con) <+> "does not have named record fields,\
- \so a pattern match" <+> quotes (ppr con) <+> " { .. } is incorrect."
+ vcat [ text "The data constructor"
+ <+> quotes (ppr con)
+ <+> text "does not have named record fields, so a pattern match"
+ <+> quotes (ppr con)
+ <+> text " { .. } is incorrect."
, text "Possible fixes:"
- , nest 2 (text "* Replace the pattern '" <+> quotes (ppr con) <+> "'{ .. }' with" <+> quotes (ppr con))
- , nest 2 (text "* Replace the pattern '" <+> quotes (ppr con) <+> "'{ .. }' with" <+> quotes (ppr con) <+> "{}")
- , nest 4 (text "This version works even if you add/remove fields to " <+> quotes (ppr con) <+> "later")
+ , nest 2 (text "* Replace the pattern '" <+> quotes (ppr con) <+> text "'{ .. }' with" <+> quotes (ppr con))
+ , nest 2 (text "* Replace the pattern '" <+> quotes (ppr con) <+> text "'{ .. }' with" <+> quotes (ppr con) <+> text "{}")
+ , nest 4 (text "This version works even if you add/remove fields to " <+> quotes (ppr con) <+> text "later")
]