Skip to content
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

Fix slow parsing of tuple patterns and types #51

Open
siddharth-krishna opened this issue Jul 11, 2023 · 0 comments
Open

Fix slow parsing of tuple patterns and types #51

siddharth-krishna opened this issue Jul 11, 2023 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@siddharth-krishna
Copy link
Collaborator

Example script:

fun x -> match x with {
  | ((((((((((((x)))))))))))) -> 2
}
image

We should use tupleElems instead of tupleArgs (slower) in Parse.hs for tuple patterns and type lists as well.

@siddharth-krishna siddharth-krishna added enhancement New feature or request good first issue Good for newcomers labels Jul 11, 2023
siddharth-krishna added a commit that referenced this issue Jul 11, 2023
This PR adds a timeout to the LSP so that if parsing or type checking
hangs/takes too long, the editor doesn't break too. A timeout results in
an error diagnostic, so that if the user modifies the script, the LSP
can process the new version:

<img width="346" alt="image"
src="https://github.com/plow-technologies/inferno/assets/10712637/810e9862-cddf-474c-b2e1-b06b65ee0ba5">

(This example takes too long to parse, see #51 )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant