New issue

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

Single-line comments beginning next to some symbols trig parse errors #339

Closed
eeue56 opened this Issue Aug 9, 2015 · 1 comment

Comments

Projects
None yet
1 participant
@eeue56
Contributor

eeue56 commented Aug 9, 2015

Using the single line comment syntax -- before symbols such as <| or |> makes Elm think that it's a name instead of commenting out the rest of the line.

Example:

main = show <| zip [1, 2, 3] [4, 5, 6] --<| 5 + 6

will throw the following error:

NAMING ERROR
Cannot find variable `--<|`

7|   show <| zip [1, 2, 3] [4, 5, 6] --<| 5 + 6
Maybe you want one of the following?

    <|
    Basics.<|

Expected behaviour:

It should comment out the rest of the line. If this isn't possible due to the valid use of - within names, then the error throw should be more descriptive - perhaps something along the lines of "If you are trying to comment out the rest of the line, put a space between -- and the symbol <|"

@eeue56

This comment has been minimized.

Show comment
Hide comment
@eeue56

eeue56 Aug 9, 2015

Contributor

Duplicate of elm/compiler#894, unneeded

Contributor

eeue56 commented Aug 9, 2015

Duplicate of elm/compiler#894, unneeded

@eeue56 eeue56 closed this Aug 9, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment