Skip to content

Separate lens module, Have ResponseErrors also take LSPResponseErrors, and standardize SemanticToken fields #480

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

Merged

Conversation

joyfulmantis
Copy link
Collaborator

This pull request includes three separate changes. The first is to separate the lens module into a separate exported module. Currently, this only includes the lens for the generated modules. The second change is to allow (T)ResponseErrors to take both a ResponseError and a LSPResponseError. To do this I used custom fromJSON code that will first convert the JSON to a ResponseError and then convert any CustomResponseError results to corresponding LSPResponseError types. Finally, I standardized the fields for SemanticToken.

@joyfulmantis
Copy link
Collaborator Author

The last commit was to unify both the generated and custom lens classes, so now there are no namespace clashes between them and they are all exported from the same module.

@@ -105,6 +105,7 @@ test-suite tests
, lsp ^>=2.0
, lsp-test
, mtl <2.4
, parser-combinators
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these used?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got an error from hls that the package was hidden and that I needed to depend on it. There is I believe some related import, but it was weird that it wasn't a problem before.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird!

@michaelpj michaelpj merged commit 9590f48 into haskell:mpj/metamodel2 Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants