on master help sign in
Stop saying "here" in parse error messages

When an anonymous function is enclosed in [] or () these errors would appear on the closing brace, so switching to say "I was expecting to see an arrow NEXT" makes it clearer that it wasn't necessarily expecting to see the arrow HERE in this exact location!

commit2bc07b6bc7f4c81ae2178a16b642e1285ececbd9 authorEvan Czaplicki <evancz@users.noreply.github.com> dateMon 6 May 2019, 19:10 (7 years ago) parent7441684
1 file changed+4−4
compiler/src/Reporting/Error/Syntax.hs+4−4
compiler/src/Reporting/Error/Syntax.hs+4−4
@@ -1461,7 +1461,7 @@ toFuncReport source name func startRow startCol =
14611461 Report.toCodeSnippet source surroundings (Just region)
14621462 (
14631463 D.reflow $
1464− "I was expecting to see an arrow here:"
1464+ "I just saw the beginning of an anonymous function, so I was expecting to see an arrow next:"
14651465 ,
14661466 D.fillSep $
14671467 ["The","syntax","for","anonymous","functions","is"
@@ -1479,7 +1479,7 @@ toFuncReport source name func startRow startCol =
14791479 Report.toCodeSnippet source surroundings (Just region)
14801480 (
14811481 D.reflow $
1482− "I just saw the start of an anonymous function, so I was expecting to see an argument here:"
1482+ "I just saw the beginning of an anonymous function, so I was expecting to see an argument next:"
14831483 ,
14841484 D.stack
14851485 [ D.fillSep
@@ -1502,7 +1502,7 @@ toFuncReport source name func startRow startCol =
15021502 Report.toCodeSnippet source surroundings (Just region)
15031503 (
15041504 D.reflow $
1505− "I was expecting to see an arrow here:"
1505+ "I just saw the beginning of an anonymous function, so I was expecting to see an arrow next:"
15061506 ,
15071507 D.stack
15081508 [ D.fillSep $
@@ -1527,7 +1527,7 @@ toFuncReport source name func startRow startCol =
15271527 Report.toCodeSnippet source surroundings (Just region)
15281528 (
15291529 D.reflow $
1530− "I was expecting to see the body of your anonymous function here:"
1530+ "I was expecting to see the body of your anonymous function next:"
15311531 ,
15321532 D.stack
15331533 [ D.fillSep $