codeworld icon indicating copy to clipboard operation
codeworld copied to clipboard

User accidentally uses a unicode long dash instead of ASCII dash to type a comment

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

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

Message:

program.hs:5:34-38: error:
    • Missing punctuation before this expression.
      Perhaps you forgot a comma, an operator, or a bracket.
    • To multiply, please use the * operator.
      For example: base * image
    • To apply a function, add parentheses around the argument.
      For example: base(image)

codeworld-feedback avatar Feb 20 '23 15:02 codeworld-feedback

Interesting. This person has used −− instead of -- to introduce a comment, and got a syntax error as a result. Perhaps we can do something, either by sanitizing non-ASCII characters that are very similar to ASCII in copy and paste, or at least an explanatory error message, to indicate what the problem is.

cdsmith avatar Feb 20 '23 21:02 cdsmith