FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Misleading lex error when forgetting to access qualified identifier · Issue #3801 · purescript/purescript · GitHub

Misleading lex error when forgetting to access qualified identifier #3801

Description

This is a small nit, but the lex error when forgetting to access a qualified identifier seems a bit misleading. I think we could probably make this particular error more specific for the actual cause, which (imo) is likely that the user forgot to finish what they were typing. (For example, today I was looking around my file for strange whitespace characters without realizing I had just forgotten to finish what I was typing!)

For example, in the following code:

bar :: Int
bar = Foo. 

You get the lex error
Illegal whitespace character U+0020

@natefaubion suggested we could have an error that says Whitespace not allowed in qualified identifier or similar.

You get a similar error for when you forget to access an unqualified identifier, such as

bar :: Int
bar = foo.

resulting in
Unexpected or mismatched indentation

(I'm not sure if the second one is as easy to clean up, but I think the first example is relatively straightforward)

Has anyone else had a similar experience, or have a suggestion for a more specific error message?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL