Skip to content

Commit e907d55

Browse files
authored
Merge pull request #355 from gilramir/errmsg
Fix error messages that still say "when ... of"
2 parents 54277a2 + 8e19b5a commit e907d55

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

compiler/src/Reporting/Error/Syntax.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3988,7 +3988,7 @@ noteForCaseError =
39883988
[ D.toSimpleNote $
39893989
"Here is an example of a valid `when` expression for reference.",
39903990
D.vcat $
3991-
[ D.indent 4 $ D.fillSep [D.cyan "when", "maybeWidth", D.cyan "of"],
3991+
[ D.indent 4 $ D.fillSep [D.cyan "when", "maybeWidth", D.cyan "is"],
39923992
D.indent 6 $ D.fillSep [D.blue "Just", "width", "->"],
39933993
D.indent 8 $ D.fillSep ["width", "+", D.dullyellow "200"],
39943994
"",
@@ -4007,7 +4007,7 @@ noteForCaseIndentError =
40074007
"Sometimes I get confused by indentation, so try to make your `when` look\
40084008
\ something like this:",
40094009
D.vcat $
4010-
[ D.indent 4 $ D.fillSep [D.cyan "when", "maybeWidth", D.cyan "of"],
4010+
[ D.indent 4 $ D.fillSep [D.cyan "when", "maybeWidth", D.cyan "is"],
40114011
D.indent 6 $ D.fillSep [D.blue "Just", "width", "->"],
40124012
D.indent 8 $ D.fillSep ["width", "+", D.dullyellow "200"],
40134013
"",

compiler/src/Reporting/Error/Type.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ toPatternReport source localizer patternRegion category tipe expected =
188188
tipe
189189
expectedType
190190
(addPatternCategory "The first pattern is trying to match" category)
191-
"But the expression between `when` and `of` is:"
191+
"But the expression between `when` and `is` is:"
192192
[ D.reflow $
193193
"These can never match! Is the pattern the problem? Or is it the expression?"
194194
]

0 commit comments

Comments
 (0)