codeworld icon indicating copy to clipboard operation
codeworld copied to clipboard

Error for misplaced equal sign can be more descriptive

Open codeworld-feedback opened this issue 4 years ago • 1 comments
trafficstars

Program: https://code.world/#Pjq5_rYGZkWwz0CsSvJQkTg

Message:

program.hs:1:43: error:
    parse error on input =
    An equation does not fit here. Is this line indented incorrectly?

codeworld-feedback avatar Oct 23 '21 18:10 codeworld-feedback

The error occurs because of an '=' sign that's part of a previous equation. The problem isn't indentation, but rather a missing newline. The error could say something like "A group of equations must be on different lines, all indented the same amount." Worth thinking about.

cdsmith avatar Oct 26 '21 17:10 cdsmith