@@ -467,6 +467,25 @@ toReport source err =
467 "Switch to (^) for exponentiation. Or switch to (*) for multiplication."
467 "Switch to (^) for exponentiation. Or switch to (*) for multiplication."
470+ else if op == "%" then
471+ Report.Report "UNKNOWN OPERATOR" region [] $
472+ Report.toCodeSnippet source region Nothing
475+ "Elm does not use (%) as the remainder operator:"
479+ "If you want the behavior of (%) like in JavaScript, switch to:\
480+ \ <https://package.elm-lang.org/packages/elm-lang/core/latest/Basics#remainderBy>"
482+ "If you want modular arithmatic like in math, switch to:\
483+ \ <https://package.elm-lang.org/packages/elm-lang/core/latest/Basics#modBy>"
485+ "The difference is how things work when negative numbers are involved."
472 suggestions =
491 suggestions =