on master help sign in
Improve error messages for unknown operators a bit
f38d2bfEvan Czaplicki
compiler/src/Reporting/Error/Canonicalize.hs+3−3
@@ -461,7 +461,7 @@ toReport source err =
461 Report.toCodeSnippet source region Nothing
461 Report.toCodeSnippet source region Nothing
462 (
462 (
463 H.reflow $
463 H.reflow $
464− "I do not recognize this (**) operator:"
464+ "I do not recognize the (**) operator:"
465 ,
465 ,
466 H.reflow $
466 H.reflow $
467 "Switch to (^) for exponentiation. Or switch to (*) for multiplication."
467 "Switch to (^) for exponentiation. Or switch to (*) for multiplication."
@@ -474,13 +474,13 @@ toReport source err =
474 H.nearbyNames N.toString op (Set.toList locals)
474 H.nearbyNames N.toString op (Set.toList locals)
475
475
476 format altOp =
476 format altOp =
477− H.dullyellow $ "(" <> altOp <> ")"
477+ H.green $ "(" <> altOp <> ")"
478 in
478 in
479 Report.Report "UNKNOWN OPERATOR" region suggestions $
479 Report.Report "UNKNOWN OPERATOR" region suggestions $
480 Report.toCodeSnippet source region Nothing
480 Report.toCodeSnippet source region Nothing
481 (
481 (
482 H.reflow $
482 H.reflow $
483− "I do not recognize this (" ++ N.toString op ++ ") operator."
483+ "I do not recognize the (" ++ N.toString op ++ ") operator."
484 ,
484 ,
485 H.fillSep $
485 H.fillSep $
486 ["Is","there","an","`import`","and","`exposing`","entry","for","it?"]
486 ["Is","there","an","`import`","and","`exposing`","entry","for","it?"]