-
Notifications
You must be signed in to change notification settings - Fork 94
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
Separate lens module, Have ResponseErrors also take LSPResponseErrors, and standardize SemanticToken fields #480
Conversation
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. |
lsp-types/src/Language/LSP/Protocol/Types/SemanticTokensLens.hs
Outdated
Show resolved
Hide resolved
lsp-types/src/Language/LSP/Protocol/Message/RegistrationLens.hs
Outdated
Show resolved
Hide resolved
@@ -105,6 +105,7 @@ test-suite tests | |||
, lsp ^>=2.0 | |||
, lsp-test | |||
, mtl <2.4 | |||
, parser-combinators |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these used?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird!
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.