Skip to content
This repository has been archived by the owner on Jan 2, 2021. It is now read-only.

Use hole fit plugins to record holes instead of parsing error messages #889

Closed
wants to merge 1 commit into from

Conversation

wz1000
Copy link
Collaborator

@wz1000 wz1000 commented Oct 28, 2020

Only works on 8.10+, so we would need to keep the parsing logic by CPPing the rest.

/cc @isovector I think this approach will provide a more robust way to get the local environment (TcGblEnv/TcLclEnv) at a hole, instead of going through LocalBindings. Thoughts? The tactic logic could work entirely inside TcRn.

@wz1000
Copy link
Collaborator Author

wz1000 commented Oct 28, 2020

@pepeiborra do you think it is a good idea to use this approach on 8.10 and keep the parsing logic for earlier ghcs? Or should we just stick with a single code path throughout?

Hopefully we can get rid of all the parsing stuff for code actions when errors as values lands.

@pepeiborra
Copy link
Collaborator

Errors as values will take a while to arrive, so the plugin approach is good for 8.10, 9.0 and probably 9.2. By 9.4 we will be looking to migrate to errors as values, dropping support for 8.8 and hopefully avoiding having 3 code paths for dealing with hole fits.

On the other hand, if we think that errors as values is going to land in 9.2, then I would say don't bother.

@pepeiborra
Copy link
Collaborator

The ghcide Github project is becoming archived and merged into https://github.com/haskell/haskell-language-server

This PR will need to be reopened in the HLS repo. To do that, create a new branch from HLS HEAD in your HLS repo and do:

git remote add ghcide https://github.com/georgefst/ghcide.git
git fetch ghcide
git merge ghcide disable-warnings

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants