We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In the human encoding, comments start with --. Meanwhile, - is allowed in names, making -- a valid name.
--
-
This leads to weird errors like "Error: 1: 1: name -- is referred to but does not exist" in the following program.
main := --
Users might also expect the following program to compile, but it doesn't.
-- := unit main := --
It seems the best option to make the syntax of comments and names distinct from each other. How does Haskell handle this?
The text was updated successfully, but these errors were encountered:
It looks like the actual bug is that if -- ends a line with nothing following it, it is parsed as a name rather than as a comment signifier.
But yes, we should document that -- is not a valid name.
Sorry, something went wrong.
We should add -- to the list of reserved symbols that are not NAMEs.
Edit: Actually any string that matches .*\-\-.* should not be a NAME.
.*\-\-.*
No branches or pull requests
In the human encoding, comments start with
--
. Meanwhile,-
is allowed in names, making--
a valid name.This leads to weird errors like "Error: 1: 1: name
--
is referred to but does not exist" in the following program.Users might also expect the following program to compile, but it doesn't.
It seems the best option to make the syntax of comments and names distinct from each other. How does Haskell handle this?
The text was updated successfully, but these errors were encountered: