packages feed

lsp-types 1.6.0.1 → 2.0.0.0

raw patch · 468 files changed

+25006/−8092 lines, 468 filesdep +directorydep +file-embeddep +prettyprinterdep −scientificdep −tupledep ~aesondep ~filepathdep ~mtlnew-component:exe:generator

Dependencies added: directory, file-embed, prettyprinter, regex, row-types

Dependencies removed: scientific, tuple

Dependency ranges changed: aeson, filepath, mtl

Files

ChangeLog.md view
@@ -1,26 +1,33 @@ # Revision history for lsp-types -## 1.6.0.1 -- 2023-12-02+## 2.0.0.0 -* Add `LANGUAGE DuplicateRecordFields` to facilitate building with GHC 9.8+* Breaking change: major restructure to generate types and methods from the LSP metamodel.+    * Full support for version 3.17 of the LSP specification, many accuracy fixes+    * Generated types follow the spec very closely, e.g. using anonymous types, using `a |? Null` instead of `Maybe a`+    * Anonymous record types in the spec are now represented using `row-types`+    * Many constructors are now prefixed with their type names+    * Documentation from the spec is transferred+    * Three top level modules: `Types` (main protocol types), `Message` (messages and methods), `Capabilities` (capabilities)+* New typeclasses for handling LSP enumerations: `LspEnum` and `LspOpenEnum` -## 1.6.0.0 -- 2022-09-13+## 1.6.0.0  * Add `isSubRangeOf` and `positionInRange` helper functions * Add `ServerCancelled`, `RequestFailed` and `ErrorCodeCustom` server error types * Fix "workspace/semanticTokens/refresh" to be a server method instead of a client method * Use a packed representation for `NormalizedFilePath`-* Add converions from `OsPath` to `NormalizedFilePath` in `Language.LSP.Types.Uri.OsPath` when using new enough `filepath`--## 1.5.0.0 -- 2022-06-20+* Add conversions from `OsPath` to `NormalizedFilePath` in `Language.LSP.Types.Uri.OsPath` when using new enough `filepath`+ +## 1.5.0.0  * VFS module moved from `lsp-types` to `lsp`, as it relates to the actual implementation of a LSP server. -## 1.4.0.1 -- 2022-01-20+## 1.4.0.1  * Fix result type of selection range requests. -## 1.4.0.0 -- 2021-12-28+## 1.4.0.0  * Aeson 2 compatibility (#360) (@michaelpj) * Reduced dependency footprint (#383, #384) (@Bodigrim)@@ -30,15 +37,15 @@ * Fix the Semigroup instance for MarkupContent (#361) (@michaelpj) * Various improvements to spec conformance (@michaelpj) -## 1.3.0.1 -- 2021-08-06+## 1.3.0.1  * Rollback NFP interning (#344) (@pepeiborra) -## 1.3.0.0 -- 2021-07-31+## 1.3.0.0  * Intern NormalizedFilePaths (#340) (@pepeiborra) -## 1.2.0.1 -- unpublished+## 1.2.0.1  * Add compatibility with GHC 9.2 (#345) (@fendor) * Fix missing lenses (@michaelpj)@@ -48,7 +55,7 @@ * Do not crash on workspace/didChangeConfiguration (#321) (@strager) * Improve error messages on JSON decode failures (#320) (@strager) -## 1.2.0.0 -- 2021-03-28+## 1.2.0.0  * Prevent crashing when optional fields are missing (@anka-213) * Use StrictData (@wz1000)@@ -65,7 +72,7 @@ * Support change annotations (#302) (@michaelpj) * Add some more missing lenses (#307) (@michaelpj) -## 1.1.0.0 -- 2021-02-14+## 1.1.0.0  * Fix prepareRename reponse and prepareProvider (@kirelagin) * Fix deriving instance of MonadUnliftIO (@banacorn)@@ -98,7 +105,7 @@ * Use Text over String in more places (@wz1000) * Add missing lenses (@wz1000, @bubba) -## 1.0.0.0 -- 2020-10-15+## 1.0.0.0  1.0.0.0 is a major rework with both internal and external facing changes, and will require manual migration.@@ -197,10 +204,10 @@ `LanguageContextEnv` needed to run an `LspT`, as well as anything else your monad needs. ```haskell-type+type  ServerDefinition { ... , doInitialize = \env _req -> pure $ Right env-, interpretHandler = \env -> Iso+, interpretHandler = \env -> Iso     (runLspT env) -- how to convert from IO ~> m    liftIO        -- how to convert from m ~> IO }@@ -216,7 +223,7 @@ 5. Remove any storage/use of `LspFuncs` and instead call the corresponding    functions directly from your monad instead of `IO` -## 0.23.0.0 -- 2020-10-05+## 0.23.0.0  * Add runWith for transporots other than stdio (@paulyoung) * Fix race condition in event captures (@bgamari)@@ -227,12 +234,12 @@   NormalizedFilePath (@cocreature) * Fix ordering of TH splices (@fendor) -## 0.22.0.0 -- 2020-05-04+## 0.22.0.0  * ResponseMessage results are now an Either type (@greenhat) * Support for GHC 8.10.1 -## 0.21.0.0 -- 2020-03-21+## 0.21.0.0  * Stop getCompletionPrefix from crashing if beforePos is empty * Add DidChangeWatchedFilesRegistrationOptions@@ -242,7 +249,7 @@ * Correctly fix the problem with '$/' notifications * Add azure ci -## 0.20.0.0 -- 2020-02-04T+## 0.20.0.0  * Force utf8 encoding when writing vfs temp files * Don't log errors for '$/' notifications (@jinwoo)@@ -302,7 +309,7 @@  * Add types for `window/progress` notifications. -## 0.8.3.0 -- unpublished+## 0.8.3.0  * Add `MarkupContent` to `HoverResponse`, and (some) json roundtrip tests. @@ -355,11 +362,11 @@ * CodeAction support as per v3.8 of the specification, by @Bubba * Update VersionedTextDocumentIdentifier to match specification, by @Bubba. -## 0.3.0.0 -- unpublished+## 0.3.0.0  * Handle TextDocumentSync fallbacks with new TDS type. -## 0.2.3.0 -- unpublished+## 0.2.3.0  * GHC 8.4.3 support * Introduce additional error codes as per the LSP spec. By @Bubba
README.md view
@@ -7,6 +7,10 @@ packages, along with [lsp](https://hackage.haskell.org/package/lsp) and [lsp-test](https://hackage.haskell.org/package/lsp-test) +## Updating the generated code++To update the generated code, run `cabal run generator` from the `lsp-types` directory.+ ## Useful links  - https://github.com/haskell/lsp
+ generated/Language/LSP/Protocol/Internal/Lens.hs view
@@ -0,0 +1,635 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT+{-# LANGUAGE TemplateHaskell #-}+{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Lens where++import qualified Control.Lens.TH+import qualified Language.LSP.Protocol.Internal.Types.AnnotatedTextEdit+import qualified Language.LSP.Protocol.Internal.Types.ApplyWorkspaceEditParams+import qualified Language.LSP.Protocol.Internal.Types.ApplyWorkspaceEditResult+import qualified Language.LSP.Protocol.Internal.Types.BaseSymbolInformation+import qualified Language.LSP.Protocol.Internal.Types.CallHierarchyClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.CallHierarchyIncomingCall+import qualified Language.LSP.Protocol.Internal.Types.CallHierarchyIncomingCallsParams+import qualified Language.LSP.Protocol.Internal.Types.CallHierarchyItem+import qualified Language.LSP.Protocol.Internal.Types.CallHierarchyOptions+import qualified Language.LSP.Protocol.Internal.Types.CallHierarchyOutgoingCall+import qualified Language.LSP.Protocol.Internal.Types.CallHierarchyOutgoingCallsParams+import qualified Language.LSP.Protocol.Internal.Types.CallHierarchyPrepareParams+import qualified Language.LSP.Protocol.Internal.Types.CallHierarchyRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.CancelParams+import qualified Language.LSP.Protocol.Internal.Types.ChangeAnnotation+import qualified Language.LSP.Protocol.Internal.Types.ClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.CodeAction+import qualified Language.LSP.Protocol.Internal.Types.CodeActionClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.CodeActionContext+import qualified Language.LSP.Protocol.Internal.Types.CodeActionOptions+import qualified Language.LSP.Protocol.Internal.Types.CodeActionParams+import qualified Language.LSP.Protocol.Internal.Types.CodeActionRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.CodeDescription+import qualified Language.LSP.Protocol.Internal.Types.CodeLens+import qualified Language.LSP.Protocol.Internal.Types.CodeLensClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.CodeLensOptions+import qualified Language.LSP.Protocol.Internal.Types.CodeLensParams+import qualified Language.LSP.Protocol.Internal.Types.CodeLensRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.CodeLensWorkspaceClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.Color+import qualified Language.LSP.Protocol.Internal.Types.ColorInformation+import qualified Language.LSP.Protocol.Internal.Types.ColorPresentation+import qualified Language.LSP.Protocol.Internal.Types.ColorPresentationParams+import qualified Language.LSP.Protocol.Internal.Types.Command+import qualified Language.LSP.Protocol.Internal.Types.CompletionClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.CompletionContext+import qualified Language.LSP.Protocol.Internal.Types.CompletionItem+import qualified Language.LSP.Protocol.Internal.Types.CompletionItemLabelDetails+import qualified Language.LSP.Protocol.Internal.Types.CompletionList+import qualified Language.LSP.Protocol.Internal.Types.CompletionOptions+import qualified Language.LSP.Protocol.Internal.Types.CompletionParams+import qualified Language.LSP.Protocol.Internal.Types.CompletionRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.ConfigurationItem+import qualified Language.LSP.Protocol.Internal.Types.ConfigurationParams+import qualified Language.LSP.Protocol.Internal.Types.CreateFile+import qualified Language.LSP.Protocol.Internal.Types.CreateFileOptions+import qualified Language.LSP.Protocol.Internal.Types.CreateFilesParams+import qualified Language.LSP.Protocol.Internal.Types.DeclarationClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.DeclarationOptions+import qualified Language.LSP.Protocol.Internal.Types.DeclarationParams+import qualified Language.LSP.Protocol.Internal.Types.DeclarationRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.DefinitionClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.DefinitionOptions+import qualified Language.LSP.Protocol.Internal.Types.DefinitionParams+import qualified Language.LSP.Protocol.Internal.Types.DefinitionRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.DeleteFile+import qualified Language.LSP.Protocol.Internal.Types.DeleteFileOptions+import qualified Language.LSP.Protocol.Internal.Types.DeleteFilesParams+import qualified Language.LSP.Protocol.Internal.Types.Diagnostic+import qualified Language.LSP.Protocol.Internal.Types.DiagnosticClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.DiagnosticOptions+import qualified Language.LSP.Protocol.Internal.Types.DiagnosticRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.DiagnosticRelatedInformation+import qualified Language.LSP.Protocol.Internal.Types.DiagnosticServerCancellationData+import qualified Language.LSP.Protocol.Internal.Types.DiagnosticWorkspaceClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.DidChangeConfigurationClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.DidChangeConfigurationParams+import qualified Language.LSP.Protocol.Internal.Types.DidChangeConfigurationRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.DidChangeNotebookDocumentParams+import qualified Language.LSP.Protocol.Internal.Types.DidChangeTextDocumentParams+import qualified Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesParams+import qualified Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.DidChangeWorkspaceFoldersParams+import qualified Language.LSP.Protocol.Internal.Types.DidCloseNotebookDocumentParams+import qualified Language.LSP.Protocol.Internal.Types.DidCloseTextDocumentParams+import qualified Language.LSP.Protocol.Internal.Types.DidOpenNotebookDocumentParams+import qualified Language.LSP.Protocol.Internal.Types.DidOpenTextDocumentParams+import qualified Language.LSP.Protocol.Internal.Types.DidSaveNotebookDocumentParams+import qualified Language.LSP.Protocol.Internal.Types.DidSaveTextDocumentParams+import qualified Language.LSP.Protocol.Internal.Types.DocumentColorClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.DocumentColorOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentColorParams+import qualified Language.LSP.Protocol.Internal.Types.DocumentColorRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentDiagnosticParams+import qualified Language.LSP.Protocol.Internal.Types.DocumentDiagnosticReportPartialResult+import qualified Language.LSP.Protocol.Internal.Types.DocumentFormattingClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.DocumentFormattingOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentFormattingParams+import qualified Language.LSP.Protocol.Internal.Types.DocumentFormattingRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentHighlight+import qualified Language.LSP.Protocol.Internal.Types.DocumentHighlightClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.DocumentHighlightOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentHighlightParams+import qualified Language.LSP.Protocol.Internal.Types.DocumentHighlightRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentLink+import qualified Language.LSP.Protocol.Internal.Types.DocumentLinkClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.DocumentLinkOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentLinkParams+import qualified Language.LSP.Protocol.Internal.Types.DocumentLinkRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingParams+import qualified Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingParams+import qualified Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentSymbol+import qualified Language.LSP.Protocol.Internal.Types.DocumentSymbolClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.DocumentSymbolOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentSymbolParams+import qualified Language.LSP.Protocol.Internal.Types.DocumentSymbolRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.ExecuteCommandClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.ExecuteCommandOptions+import qualified Language.LSP.Protocol.Internal.Types.ExecuteCommandParams+import qualified Language.LSP.Protocol.Internal.Types.ExecuteCommandRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.ExecutionSummary+import qualified Language.LSP.Protocol.Internal.Types.FileCreate+import qualified Language.LSP.Protocol.Internal.Types.FileDelete+import qualified Language.LSP.Protocol.Internal.Types.FileEvent+import qualified Language.LSP.Protocol.Internal.Types.FileOperationClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.FileOperationFilter+import qualified Language.LSP.Protocol.Internal.Types.FileOperationOptions+import qualified Language.LSP.Protocol.Internal.Types.FileOperationPattern+import qualified Language.LSP.Protocol.Internal.Types.FileOperationPatternOptions+import qualified Language.LSP.Protocol.Internal.Types.FileOperationRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.FileRename+import qualified Language.LSP.Protocol.Internal.Types.FileSystemWatcher+import qualified Language.LSP.Protocol.Internal.Types.FoldingRange+import qualified Language.LSP.Protocol.Internal.Types.FoldingRangeClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.FoldingRangeOptions+import qualified Language.LSP.Protocol.Internal.Types.FoldingRangeParams+import qualified Language.LSP.Protocol.Internal.Types.FoldingRangeRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.FormattingOptions+import qualified Language.LSP.Protocol.Internal.Types.FullDocumentDiagnosticReport+import qualified Language.LSP.Protocol.Internal.Types.GeneralClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.Hover+import qualified Language.LSP.Protocol.Internal.Types.HoverClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.HoverOptions+import qualified Language.LSP.Protocol.Internal.Types.HoverParams+import qualified Language.LSP.Protocol.Internal.Types.HoverRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.ImplementationClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.ImplementationOptions+import qualified Language.LSP.Protocol.Internal.Types.ImplementationParams+import qualified Language.LSP.Protocol.Internal.Types.ImplementationRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.InitializeError+import qualified Language.LSP.Protocol.Internal.Types.InitializeParams+import qualified Language.LSP.Protocol.Internal.Types.InitializeResult+import qualified Language.LSP.Protocol.Internal.Types.InitializedParams+import qualified Language.LSP.Protocol.Internal.Types.InlayHint+import qualified Language.LSP.Protocol.Internal.Types.InlayHintClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.InlayHintLabelPart+import qualified Language.LSP.Protocol.Internal.Types.InlayHintOptions+import qualified Language.LSP.Protocol.Internal.Types.InlayHintParams+import qualified Language.LSP.Protocol.Internal.Types.InlayHintRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.InlayHintWorkspaceClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.InlineValueClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.InlineValueContext+import qualified Language.LSP.Protocol.Internal.Types.InlineValueEvaluatableExpression+import qualified Language.LSP.Protocol.Internal.Types.InlineValueOptions+import qualified Language.LSP.Protocol.Internal.Types.InlineValueParams+import qualified Language.LSP.Protocol.Internal.Types.InlineValueRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.InlineValueText+import qualified Language.LSP.Protocol.Internal.Types.InlineValueVariableLookup+import qualified Language.LSP.Protocol.Internal.Types.InlineValueWorkspaceClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.InsertReplaceEdit+import qualified Language.LSP.Protocol.Internal.Types.LinkedEditingRangeClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.LinkedEditingRangeOptions+import qualified Language.LSP.Protocol.Internal.Types.LinkedEditingRangeParams+import qualified Language.LSP.Protocol.Internal.Types.LinkedEditingRangeRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.LinkedEditingRanges+import qualified Language.LSP.Protocol.Internal.Types.Location+import qualified Language.LSP.Protocol.Internal.Types.LocationLink+import qualified Language.LSP.Protocol.Internal.Types.LogMessageParams+import qualified Language.LSP.Protocol.Internal.Types.LogTraceParams+import qualified Language.LSP.Protocol.Internal.Types.MarkdownClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.MarkupContent+import qualified Language.LSP.Protocol.Internal.Types.MessageActionItem+import qualified Language.LSP.Protocol.Internal.Types.Moniker+import qualified Language.LSP.Protocol.Internal.Types.MonikerClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.MonikerOptions+import qualified Language.LSP.Protocol.Internal.Types.MonikerParams+import qualified Language.LSP.Protocol.Internal.Types.MonikerRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.NotebookCell+import qualified Language.LSP.Protocol.Internal.Types.NotebookCellArrayChange+import qualified Language.LSP.Protocol.Internal.Types.NotebookCellTextDocumentFilter+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocument+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocumentChangeEvent+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocumentClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocumentIdentifier+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncOptions+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.OptionalVersionedTextDocumentIdentifier+import qualified Language.LSP.Protocol.Internal.Types.ParameterInformation+import qualified Language.LSP.Protocol.Internal.Types.PartialResultParams+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Internal.Types.PrepareRenameParams+import qualified Language.LSP.Protocol.Internal.Types.PreviousResultId+import qualified Language.LSP.Protocol.Internal.Types.ProgressParams+import qualified Language.LSP.Protocol.Internal.Types.PublishDiagnosticsClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.PublishDiagnosticsParams+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Internal.Types.ReferenceClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.ReferenceContext+import qualified Language.LSP.Protocol.Internal.Types.ReferenceOptions+import qualified Language.LSP.Protocol.Internal.Types.ReferenceParams+import qualified Language.LSP.Protocol.Internal.Types.ReferenceRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.Registration+import qualified Language.LSP.Protocol.Internal.Types.RegistrationParams+import qualified Language.LSP.Protocol.Internal.Types.RegularExpressionsClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.RelatedFullDocumentDiagnosticReport+import qualified Language.LSP.Protocol.Internal.Types.RelatedUnchangedDocumentDiagnosticReport+import qualified Language.LSP.Protocol.Internal.Types.RelativePattern+import qualified Language.LSP.Protocol.Internal.Types.RenameClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.RenameFile+import qualified Language.LSP.Protocol.Internal.Types.RenameFileOptions+import qualified Language.LSP.Protocol.Internal.Types.RenameFilesParams+import qualified Language.LSP.Protocol.Internal.Types.RenameOptions+import qualified Language.LSP.Protocol.Internal.Types.RenameParams+import qualified Language.LSP.Protocol.Internal.Types.RenameRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.ResourceOperation+import qualified Language.LSP.Protocol.Internal.Types.SaveOptions+import qualified Language.LSP.Protocol.Internal.Types.SelectionRange+import qualified Language.LSP.Protocol.Internal.Types.SelectionRangeClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.SelectionRangeOptions+import qualified Language.LSP.Protocol.Internal.Types.SelectionRangeParams+import qualified Language.LSP.Protocol.Internal.Types.SelectionRangeRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokens+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensDelta+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensDeltaParams+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensDeltaPartialResult+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensEdit+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensLegend+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensOptions+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensParams+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensPartialResult+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensRangeParams+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensWorkspaceClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.ServerCapabilities+import qualified Language.LSP.Protocol.Internal.Types.SetTraceParams+import qualified Language.LSP.Protocol.Internal.Types.ShowDocumentClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.ShowDocumentParams+import qualified Language.LSP.Protocol.Internal.Types.ShowDocumentResult+import qualified Language.LSP.Protocol.Internal.Types.ShowMessageParams+import qualified Language.LSP.Protocol.Internal.Types.ShowMessageRequestClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.ShowMessageRequestParams+import qualified Language.LSP.Protocol.Internal.Types.SignatureHelp+import qualified Language.LSP.Protocol.Internal.Types.SignatureHelpClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.SignatureHelpContext+import qualified Language.LSP.Protocol.Internal.Types.SignatureHelpOptions+import qualified Language.LSP.Protocol.Internal.Types.SignatureHelpParams+import qualified Language.LSP.Protocol.Internal.Types.SignatureHelpRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.SignatureInformation+import qualified Language.LSP.Protocol.Internal.Types.StaticRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.SymbolInformation+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentChangeRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentEdit+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentItem+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentPositionParams+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentSaveRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentSyncClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentSyncOptions+import qualified Language.LSP.Protocol.Internal.Types.TextEdit+import qualified Language.LSP.Protocol.Internal.Types.TypeDefinitionClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.TypeDefinitionOptions+import qualified Language.LSP.Protocol.Internal.Types.TypeDefinitionParams+import qualified Language.LSP.Protocol.Internal.Types.TypeDefinitionRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.TypeHierarchyClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.TypeHierarchyItem+import qualified Language.LSP.Protocol.Internal.Types.TypeHierarchyOptions+import qualified Language.LSP.Protocol.Internal.Types.TypeHierarchyPrepareParams+import qualified Language.LSP.Protocol.Internal.Types.TypeHierarchyRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.TypeHierarchySubtypesParams+import qualified Language.LSP.Protocol.Internal.Types.TypeHierarchySupertypesParams+import qualified Language.LSP.Protocol.Internal.Types.UInitializeParams+import qualified Language.LSP.Protocol.Internal.Types.UnchangedDocumentDiagnosticReport+import qualified Language.LSP.Protocol.Internal.Types.Unregistration+import qualified Language.LSP.Protocol.Internal.Types.UnregistrationParams+import qualified Language.LSP.Protocol.Internal.Types.VersionedNotebookDocumentIdentifier+import qualified Language.LSP.Protocol.Internal.Types.VersionedTextDocumentIdentifier+import qualified Language.LSP.Protocol.Internal.Types.WillSaveTextDocumentParams+import qualified Language.LSP.Protocol.Internal.Types.WindowClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.WorkDoneProgressBegin+import qualified Language.LSP.Protocol.Internal.Types.WorkDoneProgressCancelParams+import qualified Language.LSP.Protocol.Internal.Types.WorkDoneProgressCreateParams+import qualified Language.LSP.Protocol.Internal.Types.WorkDoneProgressEnd+import qualified Language.LSP.Protocol.Internal.Types.WorkDoneProgressOptions+import qualified Language.LSP.Protocol.Internal.Types.WorkDoneProgressParams+import qualified Language.LSP.Protocol.Internal.Types.WorkDoneProgressReport+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticParams+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticReport+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticReportPartialResult+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceEdit+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceEditClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceFolder+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceFoldersChangeEvent+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceFoldersInitializeParams+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceFoldersServerCapabilities+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceFullDocumentDiagnosticReport+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceSymbol+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceSymbolClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceSymbolOptions+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceSymbolParams+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceSymbolRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceUnchangedDocumentDiagnosticReport++Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.ImplementationParams.ImplementationParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.Location.Location+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.ImplementationRegistrationOptions.ImplementationRegistrationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.TypeDefinitionParams.TypeDefinitionParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.TypeDefinitionRegistrationOptions.TypeDefinitionRegistrationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.WorkspaceFolder.WorkspaceFolder+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DidChangeWorkspaceFoldersParams.DidChangeWorkspaceFoldersParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.ConfigurationParams.ConfigurationParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DocumentColorParams.DocumentColorParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.ColorInformation.ColorInformation+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DocumentColorRegistrationOptions.DocumentColorRegistrationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.ColorPresentationParams.ColorPresentationParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.ColorPresentation.ColorPresentation+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.WorkDoneProgressOptions.WorkDoneProgressOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.TextDocumentRegistrationOptions.TextDocumentRegistrationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.FoldingRangeParams.FoldingRangeParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.FoldingRange.FoldingRange+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.FoldingRangeRegistrationOptions.FoldingRangeRegistrationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DeclarationParams.DeclarationParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DeclarationRegistrationOptions.DeclarationRegistrationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.SelectionRangeParams.SelectionRangeParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.SelectionRange.SelectionRange+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.SelectionRangeRegistrationOptions.SelectionRangeRegistrationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.WorkDoneProgressCreateParams.WorkDoneProgressCreateParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.WorkDoneProgressCancelParams.WorkDoneProgressCancelParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.CallHierarchyPrepareParams.CallHierarchyPrepareParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.CallHierarchyItem.CallHierarchyItem+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.CallHierarchyRegistrationOptions.CallHierarchyRegistrationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.CallHierarchyIncomingCallsParams.CallHierarchyIncomingCallsParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.CallHierarchyIncomingCall.CallHierarchyIncomingCall+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.CallHierarchyOutgoingCallsParams.CallHierarchyOutgoingCallsParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.CallHierarchyOutgoingCall.CallHierarchyOutgoingCall+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.SemanticTokensParams.SemanticTokensParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.SemanticTokens.SemanticTokens+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.SemanticTokensPartialResult.SemanticTokensPartialResult+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.SemanticTokensRegistrationOptions.SemanticTokensRegistrationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.SemanticTokensDeltaParams.SemanticTokensDeltaParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.SemanticTokensDelta.SemanticTokensDelta+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.SemanticTokensDeltaPartialResult.SemanticTokensDeltaPartialResult+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.SemanticTokensRangeParams.SemanticTokensRangeParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.ShowDocumentParams.ShowDocumentParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.ShowDocumentResult.ShowDocumentResult+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.LinkedEditingRangeParams.LinkedEditingRangeParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.LinkedEditingRanges.LinkedEditingRanges+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.LinkedEditingRangeRegistrationOptions.LinkedEditingRangeRegistrationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.CreateFilesParams.CreateFilesParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.WorkspaceEdit.WorkspaceEdit+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.FileOperationRegistrationOptions.FileOperationRegistrationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.RenameFilesParams.RenameFilesParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DeleteFilesParams.DeleteFilesParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.MonikerParams.MonikerParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.Moniker.Moniker+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.MonikerRegistrationOptions.MonikerRegistrationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.TypeHierarchyPrepareParams.TypeHierarchyPrepareParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.TypeHierarchyItem.TypeHierarchyItem+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.TypeHierarchyRegistrationOptions.TypeHierarchyRegistrationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.TypeHierarchySupertypesParams.TypeHierarchySupertypesParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.TypeHierarchySubtypesParams.TypeHierarchySubtypesParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.InlineValueParams.InlineValueParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.InlineValueRegistrationOptions.InlineValueRegistrationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.InlayHintParams.InlayHintParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.InlayHint.InlayHint+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.InlayHintRegistrationOptions.InlayHintRegistrationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DocumentDiagnosticParams.DocumentDiagnosticParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DocumentDiagnosticReportPartialResult.DocumentDiagnosticReportPartialResult+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DiagnosticServerCancellationData.DiagnosticServerCancellationData+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DiagnosticRegistrationOptions.DiagnosticRegistrationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticParams.WorkspaceDiagnosticParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticReport.WorkspaceDiagnosticReport+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticReportPartialResult.WorkspaceDiagnosticReportPartialResult+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DidOpenNotebookDocumentParams.DidOpenNotebookDocumentParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DidChangeNotebookDocumentParams.DidChangeNotebookDocumentParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DidSaveNotebookDocumentParams.DidSaveNotebookDocumentParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DidCloseNotebookDocumentParams.DidCloseNotebookDocumentParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.RegistrationParams.RegistrationParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.UnregistrationParams.UnregistrationParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.InitializeParams.InitializeParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.InitializeResult.InitializeResult+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.InitializeError.InitializeError+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.InitializedParams.InitializedParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DidChangeConfigurationParams.DidChangeConfigurationParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DidChangeConfigurationRegistrationOptions.DidChangeConfigurationRegistrationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.ShowMessageParams.ShowMessageParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.ShowMessageRequestParams.ShowMessageRequestParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.MessageActionItem.MessageActionItem+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.LogMessageParams.LogMessageParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DidOpenTextDocumentParams.DidOpenTextDocumentParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DidChangeTextDocumentParams.DidChangeTextDocumentParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.TextDocumentChangeRegistrationOptions.TextDocumentChangeRegistrationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DidCloseTextDocumentParams.DidCloseTextDocumentParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DidSaveTextDocumentParams.DidSaveTextDocumentParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.TextDocumentSaveRegistrationOptions.TextDocumentSaveRegistrationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.WillSaveTextDocumentParams.WillSaveTextDocumentParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.TextEdit.TextEdit+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesParams.DidChangeWatchedFilesParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesRegistrationOptions.DidChangeWatchedFilesRegistrationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.PublishDiagnosticsParams.PublishDiagnosticsParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.CompletionParams.CompletionParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.CompletionItem.CompletionItem+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.CompletionList.CompletionList+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.CompletionRegistrationOptions.CompletionRegistrationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.HoverParams.HoverParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.Hover.Hover+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.HoverRegistrationOptions.HoverRegistrationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.SignatureHelpParams.SignatureHelpParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.SignatureHelp.SignatureHelp+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.SignatureHelpRegistrationOptions.SignatureHelpRegistrationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DefinitionParams.DefinitionParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DefinitionRegistrationOptions.DefinitionRegistrationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.ReferenceParams.ReferenceParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.ReferenceRegistrationOptions.ReferenceRegistrationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DocumentHighlightParams.DocumentHighlightParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DocumentHighlight.DocumentHighlight+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DocumentHighlightRegistrationOptions.DocumentHighlightRegistrationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DocumentSymbolParams.DocumentSymbolParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.SymbolInformation.SymbolInformation+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DocumentSymbol.DocumentSymbol+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DocumentSymbolRegistrationOptions.DocumentSymbolRegistrationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.CodeActionParams.CodeActionParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.Command.Command+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.CodeAction.CodeAction+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.CodeActionRegistrationOptions.CodeActionRegistrationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.WorkspaceSymbolParams.WorkspaceSymbolParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.WorkspaceSymbol.WorkspaceSymbol+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.WorkspaceSymbolRegistrationOptions.WorkspaceSymbolRegistrationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.CodeLensParams.CodeLensParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.CodeLens.CodeLens+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.CodeLensRegistrationOptions.CodeLensRegistrationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DocumentLinkParams.DocumentLinkParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DocumentLink.DocumentLink+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DocumentLinkRegistrationOptions.DocumentLinkRegistrationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DocumentFormattingParams.DocumentFormattingParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DocumentFormattingRegistrationOptions.DocumentFormattingRegistrationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingParams.DocumentRangeFormattingParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingRegistrationOptions.DocumentRangeFormattingRegistrationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingParams.DocumentOnTypeFormattingParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingRegistrationOptions.DocumentOnTypeFormattingRegistrationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.RenameParams.RenameParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.RenameRegistrationOptions.RenameRegistrationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.PrepareRenameParams.PrepareRenameParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.ExecuteCommandParams.ExecuteCommandParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.ExecuteCommandRegistrationOptions.ExecuteCommandRegistrationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.ApplyWorkspaceEditParams.ApplyWorkspaceEditParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.ApplyWorkspaceEditResult.ApplyWorkspaceEditResult+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.WorkDoneProgressBegin.WorkDoneProgressBegin+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.WorkDoneProgressReport.WorkDoneProgressReport+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.WorkDoneProgressEnd.WorkDoneProgressEnd+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.SetTraceParams.SetTraceParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.LogTraceParams.LogTraceParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.CancelParams.CancelParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.ProgressParams.ProgressParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.TextDocumentPositionParams.TextDocumentPositionParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.WorkDoneProgressParams.WorkDoneProgressParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.PartialResultParams.PartialResultParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.LocationLink.LocationLink+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.Range.Range+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.ImplementationOptions.ImplementationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.StaticRegistrationOptions.StaticRegistrationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.TypeDefinitionOptions.TypeDefinitionOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.WorkspaceFoldersChangeEvent.WorkspaceFoldersChangeEvent+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.ConfigurationItem.ConfigurationItem+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.Color.Color+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DocumentColorOptions.DocumentColorOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.FoldingRangeOptions.FoldingRangeOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DeclarationOptions.DeclarationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.Position.Position+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.SelectionRangeOptions.SelectionRangeOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.CallHierarchyOptions.CallHierarchyOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.SemanticTokensOptions.SemanticTokensOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.SemanticTokensEdit.SemanticTokensEdit+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.LinkedEditingRangeOptions.LinkedEditingRangeOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.FileCreate.FileCreate+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.TextDocumentEdit.TextDocumentEdit+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.CreateFile.CreateFile+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.RenameFile.RenameFile+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DeleteFile.DeleteFile+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.ChangeAnnotation.ChangeAnnotation+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.FileOperationFilter.FileOperationFilter+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.FileRename.FileRename+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.FileDelete.FileDelete+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.MonikerOptions.MonikerOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.TypeHierarchyOptions.TypeHierarchyOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.InlineValueContext.InlineValueContext+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.InlineValueText.InlineValueText+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.InlineValueVariableLookup.InlineValueVariableLookup+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.InlineValueEvaluatableExpression.InlineValueEvaluatableExpression+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.InlineValueOptions.InlineValueOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.InlayHintLabelPart.InlayHintLabelPart+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.MarkupContent.MarkupContent+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.InlayHintOptions.InlayHintOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.RelatedFullDocumentDiagnosticReport.RelatedFullDocumentDiagnosticReport+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.RelatedUnchangedDocumentDiagnosticReport.RelatedUnchangedDocumentDiagnosticReport+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.FullDocumentDiagnosticReport.FullDocumentDiagnosticReport+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.UnchangedDocumentDiagnosticReport.UnchangedDocumentDiagnosticReport+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DiagnosticOptions.DiagnosticOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.PreviousResultId.PreviousResultId+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.NotebookDocument.NotebookDocument+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.TextDocumentItem.TextDocumentItem+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.VersionedNotebookDocumentIdentifier.VersionedNotebookDocumentIdentifier+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.NotebookDocumentChangeEvent.NotebookDocumentChangeEvent+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.NotebookDocumentIdentifier.NotebookDocumentIdentifier+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.Registration.Registration+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.Unregistration.Unregistration+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.UInitializeParams.UInitializeParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.WorkspaceFoldersInitializeParams.WorkspaceFoldersInitializeParams+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.ServerCapabilities.ServerCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.VersionedTextDocumentIdentifier.VersionedTextDocumentIdentifier+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.SaveOptions.SaveOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.FileEvent.FileEvent+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.FileSystemWatcher.FileSystemWatcher+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.Diagnostic.Diagnostic+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.CompletionContext.CompletionContext+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.CompletionItemLabelDetails.CompletionItemLabelDetails+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.InsertReplaceEdit.InsertReplaceEdit+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.CompletionOptions.CompletionOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.HoverOptions.HoverOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.SignatureHelpContext.SignatureHelpContext+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.SignatureInformation.SignatureInformation+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.SignatureHelpOptions.SignatureHelpOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DefinitionOptions.DefinitionOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.ReferenceContext.ReferenceContext+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.ReferenceOptions.ReferenceOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DocumentHighlightOptions.DocumentHighlightOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.BaseSymbolInformation.BaseSymbolInformation+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DocumentSymbolOptions.DocumentSymbolOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.CodeActionContext.CodeActionContext+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.CodeActionOptions.CodeActionOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.WorkspaceSymbolOptions.WorkspaceSymbolOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.CodeLensOptions.CodeLensOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DocumentLinkOptions.DocumentLinkOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.FormattingOptions.FormattingOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DocumentFormattingOptions.DocumentFormattingOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingOptions.DocumentRangeFormattingOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingOptions.DocumentOnTypeFormattingOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.RenameOptions.RenameOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.ExecuteCommandOptions.ExecuteCommandOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.SemanticTokensLegend.SemanticTokensLegend+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.OptionalVersionedTextDocumentIdentifier.OptionalVersionedTextDocumentIdentifier+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.AnnotatedTextEdit.AnnotatedTextEdit+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.ResourceOperation.ResourceOperation+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.CreateFileOptions.CreateFileOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.RenameFileOptions.RenameFileOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DeleteFileOptions.DeleteFileOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.FileOperationPattern.FileOperationPattern+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.WorkspaceFullDocumentDiagnosticReport.WorkspaceFullDocumentDiagnosticReport+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.WorkspaceUnchangedDocumentDiagnosticReport.WorkspaceUnchangedDocumentDiagnosticReport+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.NotebookCell.NotebookCell+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.NotebookCellArrayChange.NotebookCellArrayChange+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.ClientCapabilities.ClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.TextDocumentSyncOptions.TextDocumentSyncOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncOptions.NotebookDocumentSyncOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncRegistrationOptions.NotebookDocumentSyncRegistrationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.WorkspaceFoldersServerCapabilities.WorkspaceFoldersServerCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.FileOperationOptions.FileOperationOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.CodeDescription.CodeDescription+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DiagnosticRelatedInformation.DiagnosticRelatedInformation+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.ParameterInformation.ParameterInformation+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.NotebookCellTextDocumentFilter.NotebookCellTextDocumentFilter+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.FileOperationPatternOptions.FileOperationPatternOptions+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.ExecutionSummary.ExecutionSummary+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.WorkspaceClientCapabilities.WorkspaceClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.TextDocumentClientCapabilities.TextDocumentClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.NotebookDocumentClientCapabilities.NotebookDocumentClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.WindowClientCapabilities.WindowClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.GeneralClientCapabilities.GeneralClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.RelativePattern.RelativePattern+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.WorkspaceEditClientCapabilities.WorkspaceEditClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DidChangeConfigurationClientCapabilities.DidChangeConfigurationClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesClientCapabilities.DidChangeWatchedFilesClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.WorkspaceSymbolClientCapabilities.WorkspaceSymbolClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.ExecuteCommandClientCapabilities.ExecuteCommandClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.SemanticTokensWorkspaceClientCapabilities.SemanticTokensWorkspaceClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.CodeLensWorkspaceClientCapabilities.CodeLensWorkspaceClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.FileOperationClientCapabilities.FileOperationClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.InlineValueWorkspaceClientCapabilities.InlineValueWorkspaceClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.InlayHintWorkspaceClientCapabilities.InlayHintWorkspaceClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DiagnosticWorkspaceClientCapabilities.DiagnosticWorkspaceClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.TextDocumentSyncClientCapabilities.TextDocumentSyncClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.CompletionClientCapabilities.CompletionClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.HoverClientCapabilities.HoverClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.SignatureHelpClientCapabilities.SignatureHelpClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DeclarationClientCapabilities.DeclarationClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DefinitionClientCapabilities.DefinitionClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.TypeDefinitionClientCapabilities.TypeDefinitionClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.ImplementationClientCapabilities.ImplementationClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.ReferenceClientCapabilities.ReferenceClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DocumentHighlightClientCapabilities.DocumentHighlightClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DocumentSymbolClientCapabilities.DocumentSymbolClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.CodeActionClientCapabilities.CodeActionClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.CodeLensClientCapabilities.CodeLensClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DocumentLinkClientCapabilities.DocumentLinkClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DocumentColorClientCapabilities.DocumentColorClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DocumentFormattingClientCapabilities.DocumentFormattingClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingClientCapabilities.DocumentRangeFormattingClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingClientCapabilities.DocumentOnTypeFormattingClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.RenameClientCapabilities.RenameClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.FoldingRangeClientCapabilities.FoldingRangeClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.SelectionRangeClientCapabilities.SelectionRangeClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.PublishDiagnosticsClientCapabilities.PublishDiagnosticsClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.CallHierarchyClientCapabilities.CallHierarchyClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.SemanticTokensClientCapabilities.SemanticTokensClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.LinkedEditingRangeClientCapabilities.LinkedEditingRangeClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.MonikerClientCapabilities.MonikerClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.TypeHierarchyClientCapabilities.TypeHierarchyClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.InlineValueClientCapabilities.InlineValueClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.InlayHintClientCapabilities.InlayHintClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.DiagnosticClientCapabilities.DiagnosticClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncClientCapabilities.NotebookDocumentSyncClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.ShowMessageRequestClientCapabilities.ShowMessageRequestClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.ShowDocumentClientCapabilities.ShowDocumentClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.RegularExpressionsClientCapabilities.RegularExpressionsClientCapabilities+Control.Lens.TH.makeFieldsNoPrefix ''Language.LSP.Protocol.Internal.Types.MarkdownClientCapabilities.MarkdownClientCapabilities
+ generated/Language/LSP/Protocol/Internal/Method.hs view
@@ -0,0 +1,1065 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Method where++import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Kind as Kind+import qualified Data.Proxy+import qualified Data.Row as Row+import qualified Data.Void+import qualified GHC.TypeLits+import qualified Language.LSP.Protocol.Internal.Types.ApplyWorkspaceEditParams+import qualified Language.LSP.Protocol.Internal.Types.ApplyWorkspaceEditResult+import qualified Language.LSP.Protocol.Internal.Types.CallHierarchyIncomingCall+import qualified Language.LSP.Protocol.Internal.Types.CallHierarchyIncomingCallsParams+import qualified Language.LSP.Protocol.Internal.Types.CallHierarchyItem+import qualified Language.LSP.Protocol.Internal.Types.CallHierarchyOutgoingCall+import qualified Language.LSP.Protocol.Internal.Types.CallHierarchyOutgoingCallsParams+import qualified Language.LSP.Protocol.Internal.Types.CallHierarchyPrepareParams+import qualified Language.LSP.Protocol.Internal.Types.CallHierarchyRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.CancelParams+import qualified Language.LSP.Protocol.Internal.Types.CodeAction+import qualified Language.LSP.Protocol.Internal.Types.CodeActionParams+import qualified Language.LSP.Protocol.Internal.Types.CodeActionRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.CodeLens+import qualified Language.LSP.Protocol.Internal.Types.CodeLensParams+import qualified Language.LSP.Protocol.Internal.Types.CodeLensRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.ColorInformation+import qualified Language.LSP.Protocol.Internal.Types.ColorPresentation+import qualified Language.LSP.Protocol.Internal.Types.ColorPresentationParams+import qualified Language.LSP.Protocol.Internal.Types.Command+import qualified Language.LSP.Protocol.Internal.Types.CompletionItem+import qualified Language.LSP.Protocol.Internal.Types.CompletionList+import qualified Language.LSP.Protocol.Internal.Types.CompletionParams+import qualified Language.LSP.Protocol.Internal.Types.CompletionRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.ConfigurationParams+import qualified Language.LSP.Protocol.Internal.Types.CreateFilesParams+import qualified Language.LSP.Protocol.Internal.Types.Declaration+import qualified Language.LSP.Protocol.Internal.Types.DeclarationLink+import qualified Language.LSP.Protocol.Internal.Types.DeclarationParams+import qualified Language.LSP.Protocol.Internal.Types.DeclarationRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.Definition+import qualified Language.LSP.Protocol.Internal.Types.DefinitionLink+import qualified Language.LSP.Protocol.Internal.Types.DefinitionParams+import qualified Language.LSP.Protocol.Internal.Types.DefinitionRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.DeleteFilesParams+import qualified Language.LSP.Protocol.Internal.Types.DiagnosticRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.DiagnosticServerCancellationData+import qualified Language.LSP.Protocol.Internal.Types.DidChangeConfigurationParams+import qualified Language.LSP.Protocol.Internal.Types.DidChangeConfigurationRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.DidChangeNotebookDocumentParams+import qualified Language.LSP.Protocol.Internal.Types.DidChangeTextDocumentParams+import qualified Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesParams+import qualified Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.DidChangeWorkspaceFoldersParams+import qualified Language.LSP.Protocol.Internal.Types.DidCloseNotebookDocumentParams+import qualified Language.LSP.Protocol.Internal.Types.DidCloseTextDocumentParams+import qualified Language.LSP.Protocol.Internal.Types.DidOpenNotebookDocumentParams+import qualified Language.LSP.Protocol.Internal.Types.DidOpenTextDocumentParams+import qualified Language.LSP.Protocol.Internal.Types.DidSaveNotebookDocumentParams+import qualified Language.LSP.Protocol.Internal.Types.DidSaveTextDocumentParams+import qualified Language.LSP.Protocol.Internal.Types.DocumentColorParams+import qualified Language.LSP.Protocol.Internal.Types.DocumentColorRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentDiagnosticParams+import qualified Language.LSP.Protocol.Internal.Types.DocumentDiagnosticReport+import qualified Language.LSP.Protocol.Internal.Types.DocumentFormattingParams+import qualified Language.LSP.Protocol.Internal.Types.DocumentFormattingRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentHighlight+import qualified Language.LSP.Protocol.Internal.Types.DocumentHighlightParams+import qualified Language.LSP.Protocol.Internal.Types.DocumentHighlightRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentLink+import qualified Language.LSP.Protocol.Internal.Types.DocumentLinkParams+import qualified Language.LSP.Protocol.Internal.Types.DocumentLinkRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingParams+import qualified Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingParams+import qualified Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Internal.Types.DocumentSymbol+import qualified Language.LSP.Protocol.Internal.Types.DocumentSymbolParams+import qualified Language.LSP.Protocol.Internal.Types.DocumentSymbolRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.ExecuteCommandParams+import qualified Language.LSP.Protocol.Internal.Types.ExecuteCommandRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.FileOperationRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.FoldingRange+import qualified Language.LSP.Protocol.Internal.Types.FoldingRangeParams+import qualified Language.LSP.Protocol.Internal.Types.FoldingRangeRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.Hover+import qualified Language.LSP.Protocol.Internal.Types.HoverParams+import qualified Language.LSP.Protocol.Internal.Types.HoverRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.ImplementationParams+import qualified Language.LSP.Protocol.Internal.Types.ImplementationRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.InitializeError+import qualified Language.LSP.Protocol.Internal.Types.InitializeParams+import qualified Language.LSP.Protocol.Internal.Types.InitializeResult+import qualified Language.LSP.Protocol.Internal.Types.InitializedParams+import qualified Language.LSP.Protocol.Internal.Types.InlayHint+import qualified Language.LSP.Protocol.Internal.Types.InlayHintParams+import qualified Language.LSP.Protocol.Internal.Types.InlayHintRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.InlineValue+import qualified Language.LSP.Protocol.Internal.Types.InlineValueParams+import qualified Language.LSP.Protocol.Internal.Types.InlineValueRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.LinkedEditingRangeParams+import qualified Language.LSP.Protocol.Internal.Types.LinkedEditingRangeRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.LinkedEditingRanges+import qualified Language.LSP.Protocol.Internal.Types.Location+import qualified Language.LSP.Protocol.Internal.Types.LogMessageParams+import qualified Language.LSP.Protocol.Internal.Types.LogTraceParams+import qualified Language.LSP.Protocol.Internal.Types.MessageActionItem+import qualified Language.LSP.Protocol.Internal.Types.Moniker+import qualified Language.LSP.Protocol.Internal.Types.MonikerParams+import qualified Language.LSP.Protocol.Internal.Types.MonikerRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.PrepareRenameParams+import qualified Language.LSP.Protocol.Internal.Types.PrepareRenameResult+import qualified Language.LSP.Protocol.Internal.Types.ProgressParams+import qualified Language.LSP.Protocol.Internal.Types.PublishDiagnosticsParams+import qualified Language.LSP.Protocol.Internal.Types.ReferenceParams+import qualified Language.LSP.Protocol.Internal.Types.ReferenceRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.RegistrationParams+import qualified Language.LSP.Protocol.Internal.Types.RenameFilesParams+import qualified Language.LSP.Protocol.Internal.Types.RenameParams+import qualified Language.LSP.Protocol.Internal.Types.RenameRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.SelectionRange+import qualified Language.LSP.Protocol.Internal.Types.SelectionRangeParams+import qualified Language.LSP.Protocol.Internal.Types.SelectionRangeRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokens+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensDelta+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensDeltaParams+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensParams+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensRangeParams+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.SetTraceParams+import qualified Language.LSP.Protocol.Internal.Types.ShowDocumentParams+import qualified Language.LSP.Protocol.Internal.Types.ShowDocumentResult+import qualified Language.LSP.Protocol.Internal.Types.ShowMessageParams+import qualified Language.LSP.Protocol.Internal.Types.ShowMessageRequestParams+import qualified Language.LSP.Protocol.Internal.Types.SignatureHelp+import qualified Language.LSP.Protocol.Internal.Types.SignatureHelpParams+import qualified Language.LSP.Protocol.Internal.Types.SignatureHelpRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.SymbolInformation+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentChangeRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentSaveRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.TextEdit+import qualified Language.LSP.Protocol.Internal.Types.TypeDefinitionParams+import qualified Language.LSP.Protocol.Internal.Types.TypeDefinitionRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.TypeHierarchyItem+import qualified Language.LSP.Protocol.Internal.Types.TypeHierarchyPrepareParams+import qualified Language.LSP.Protocol.Internal.Types.TypeHierarchyRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.TypeHierarchySubtypesParams+import qualified Language.LSP.Protocol.Internal.Types.TypeHierarchySupertypesParams+import qualified Language.LSP.Protocol.Internal.Types.UnregistrationParams+import qualified Language.LSP.Protocol.Internal.Types.WillSaveTextDocumentParams+import qualified Language.LSP.Protocol.Internal.Types.WorkDoneProgressCancelParams+import qualified Language.LSP.Protocol.Internal.Types.WorkDoneProgressCreateParams+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticParams+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticReport+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceEdit+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceFolder+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceSymbol+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceSymbolParams+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceSymbolRegistrationOptions+import qualified Language.LSP.Protocol.Message.Meta as MM+import qualified Language.LSP.Protocol.Types.Common++-- | A type representing a LSP method (or class of methods), intended to be used mostly at the type level.+type Method :: MM.MessageDirection -> MM.MessageKind -> Kind.Type+data Method f t where +  Method_TextDocumentImplementation :: Method MM.ClientToServer MM.Request+  Method_TextDocumentTypeDefinition :: Method MM.ClientToServer MM.Request+  Method_WorkspaceWorkspaceFolders :: Method MM.ServerToClient MM.Request+  Method_WorkspaceConfiguration :: Method MM.ServerToClient MM.Request+  Method_TextDocumentDocumentColor :: Method MM.ClientToServer MM.Request+  Method_TextDocumentColorPresentation :: Method MM.ClientToServer MM.Request+  Method_TextDocumentFoldingRange :: Method MM.ClientToServer MM.Request+  Method_TextDocumentDeclaration :: Method MM.ClientToServer MM.Request+  Method_TextDocumentSelectionRange :: Method MM.ClientToServer MM.Request+  Method_WindowWorkDoneProgressCreate :: Method MM.ServerToClient MM.Request+  Method_TextDocumentPrepareCallHierarchy :: Method MM.ClientToServer MM.Request+  Method_CallHierarchyIncomingCalls :: Method MM.ClientToServer MM.Request+  Method_CallHierarchyOutgoingCalls :: Method MM.ClientToServer MM.Request+  Method_TextDocumentSemanticTokensFull :: Method MM.ClientToServer MM.Request+  Method_TextDocumentSemanticTokensFullDelta :: Method MM.ClientToServer MM.Request+  Method_TextDocumentSemanticTokensRange :: Method MM.ClientToServer MM.Request+  Method_WorkspaceSemanticTokensRefresh :: Method MM.ServerToClient MM.Request+  Method_WindowShowDocument :: Method MM.ServerToClient MM.Request+  Method_TextDocumentLinkedEditingRange :: Method MM.ClientToServer MM.Request+  Method_WorkspaceWillCreateFiles :: Method MM.ClientToServer MM.Request+  Method_WorkspaceWillRenameFiles :: Method MM.ClientToServer MM.Request+  Method_WorkspaceWillDeleteFiles :: Method MM.ClientToServer MM.Request+  Method_TextDocumentMoniker :: Method MM.ClientToServer MM.Request+  Method_TextDocumentPrepareTypeHierarchy :: Method MM.ClientToServer MM.Request+  Method_TypeHierarchySupertypes :: Method MM.ClientToServer MM.Request+  Method_TypeHierarchySubtypes :: Method MM.ClientToServer MM.Request+  Method_TextDocumentInlineValue :: Method MM.ClientToServer MM.Request+  Method_WorkspaceInlineValueRefresh :: Method MM.ServerToClient MM.Request+  Method_TextDocumentInlayHint :: Method MM.ClientToServer MM.Request+  Method_InlayHintResolve :: Method MM.ClientToServer MM.Request+  Method_WorkspaceInlayHintRefresh :: Method MM.ServerToClient MM.Request+  Method_TextDocumentDiagnostic :: Method MM.ClientToServer MM.Request+  Method_WorkspaceDiagnostic :: Method MM.ClientToServer MM.Request+  Method_WorkspaceDiagnosticRefresh :: Method MM.ServerToClient MM.Request+  Method_ClientRegisterCapability :: Method MM.ServerToClient MM.Request+  Method_ClientUnregisterCapability :: Method MM.ServerToClient MM.Request+  Method_Initialize :: Method MM.ClientToServer MM.Request+  Method_Shutdown :: Method MM.ClientToServer MM.Request+  Method_WindowShowMessageRequest :: Method MM.ServerToClient MM.Request+  Method_TextDocumentWillSaveWaitUntil :: Method MM.ClientToServer MM.Request+  Method_TextDocumentCompletion :: Method MM.ClientToServer MM.Request+  Method_CompletionItemResolve :: Method MM.ClientToServer MM.Request+  Method_TextDocumentHover :: Method MM.ClientToServer MM.Request+  Method_TextDocumentSignatureHelp :: Method MM.ClientToServer MM.Request+  Method_TextDocumentDefinition :: Method MM.ClientToServer MM.Request+  Method_TextDocumentReferences :: Method MM.ClientToServer MM.Request+  Method_TextDocumentDocumentHighlight :: Method MM.ClientToServer MM.Request+  Method_TextDocumentDocumentSymbol :: Method MM.ClientToServer MM.Request+  Method_TextDocumentCodeAction :: Method MM.ClientToServer MM.Request+  Method_CodeActionResolve :: Method MM.ClientToServer MM.Request+  Method_WorkspaceSymbol :: Method MM.ClientToServer MM.Request+  Method_WorkspaceSymbolResolve :: Method MM.ClientToServer MM.Request+  Method_TextDocumentCodeLens :: Method MM.ClientToServer MM.Request+  Method_CodeLensResolve :: Method MM.ClientToServer MM.Request+  Method_WorkspaceCodeLensRefresh :: Method MM.ServerToClient MM.Request+  Method_TextDocumentDocumentLink :: Method MM.ClientToServer MM.Request+  Method_DocumentLinkResolve :: Method MM.ClientToServer MM.Request+  Method_TextDocumentFormatting :: Method MM.ClientToServer MM.Request+  Method_TextDocumentRangeFormatting :: Method MM.ClientToServer MM.Request+  Method_TextDocumentOnTypeFormatting :: Method MM.ClientToServer MM.Request+  Method_TextDocumentRename :: Method MM.ClientToServer MM.Request+  Method_TextDocumentPrepareRename :: Method MM.ClientToServer MM.Request+  Method_WorkspaceExecuteCommand :: Method MM.ClientToServer MM.Request+  Method_WorkspaceApplyEdit :: Method MM.ServerToClient MM.Request+  Method_WorkspaceDidChangeWorkspaceFolders :: Method MM.ClientToServer MM.Notification+  Method_WindowWorkDoneProgressCancel :: Method MM.ClientToServer MM.Notification+  Method_WorkspaceDidCreateFiles :: Method MM.ClientToServer MM.Notification+  Method_WorkspaceDidRenameFiles :: Method MM.ClientToServer MM.Notification+  Method_WorkspaceDidDeleteFiles :: Method MM.ClientToServer MM.Notification+  Method_NotebookDocumentDidOpen :: Method MM.ClientToServer MM.Notification+  Method_NotebookDocumentDidChange :: Method MM.ClientToServer MM.Notification+  Method_NotebookDocumentDidSave :: Method MM.ClientToServer MM.Notification+  Method_NotebookDocumentDidClose :: Method MM.ClientToServer MM.Notification+  Method_Initialized :: Method MM.ClientToServer MM.Notification+  Method_Exit :: Method MM.ClientToServer MM.Notification+  Method_WorkspaceDidChangeConfiguration :: Method MM.ClientToServer MM.Notification+  Method_WindowShowMessage :: Method MM.ServerToClient MM.Notification+  Method_WindowLogMessage :: Method MM.ServerToClient MM.Notification+  Method_TelemetryEvent :: Method MM.ServerToClient MM.Notification+  Method_TextDocumentDidOpen :: Method MM.ClientToServer MM.Notification+  Method_TextDocumentDidChange :: Method MM.ClientToServer MM.Notification+  Method_TextDocumentDidClose :: Method MM.ClientToServer MM.Notification+  Method_TextDocumentDidSave :: Method MM.ClientToServer MM.Notification+  Method_TextDocumentWillSave :: Method MM.ClientToServer MM.Notification+  Method_WorkspaceDidChangeWatchedFiles :: Method MM.ClientToServer MM.Notification+  Method_TextDocumentPublishDiagnostics :: Method MM.ServerToClient MM.Notification+  Method_SetTrace :: Method MM.ClientToServer MM.Notification+  Method_LogTrace :: Method MM.ServerToClient MM.Notification+  Method_CancelRequest :: Method f MM.Notification+  Method_Progress :: Method f MM.Notification+  Method_CustomMethod :: GHC.TypeLits.Symbol -> Method f t++-- | Maps a LSP method to its parameter type.+type MessageParams :: forall f t . Method f t -> Kind.Type+type family MessageParams (m ::  Method f t) where +  MessageParams Method_TextDocumentImplementation = Language.LSP.Protocol.Internal.Types.ImplementationParams.ImplementationParams+  MessageParams Method_TextDocumentTypeDefinition = Language.LSP.Protocol.Internal.Types.TypeDefinitionParams.TypeDefinitionParams+  MessageParams Method_WorkspaceWorkspaceFolders = Maybe Data.Void.Void+  MessageParams Method_WorkspaceConfiguration = Language.LSP.Protocol.Internal.Types.ConfigurationParams.ConfigurationParams+  MessageParams Method_TextDocumentDocumentColor = Language.LSP.Protocol.Internal.Types.DocumentColorParams.DocumentColorParams+  MessageParams Method_TextDocumentColorPresentation = Language.LSP.Protocol.Internal.Types.ColorPresentationParams.ColorPresentationParams+  MessageParams Method_TextDocumentFoldingRange = Language.LSP.Protocol.Internal.Types.FoldingRangeParams.FoldingRangeParams+  MessageParams Method_TextDocumentDeclaration = Language.LSP.Protocol.Internal.Types.DeclarationParams.DeclarationParams+  MessageParams Method_TextDocumentSelectionRange = Language.LSP.Protocol.Internal.Types.SelectionRangeParams.SelectionRangeParams+  MessageParams Method_WindowWorkDoneProgressCreate = Language.LSP.Protocol.Internal.Types.WorkDoneProgressCreateParams.WorkDoneProgressCreateParams+  MessageParams Method_TextDocumentPrepareCallHierarchy = Language.LSP.Protocol.Internal.Types.CallHierarchyPrepareParams.CallHierarchyPrepareParams+  MessageParams Method_CallHierarchyIncomingCalls = Language.LSP.Protocol.Internal.Types.CallHierarchyIncomingCallsParams.CallHierarchyIncomingCallsParams+  MessageParams Method_CallHierarchyOutgoingCalls = Language.LSP.Protocol.Internal.Types.CallHierarchyOutgoingCallsParams.CallHierarchyOutgoingCallsParams+  MessageParams Method_TextDocumentSemanticTokensFull = Language.LSP.Protocol.Internal.Types.SemanticTokensParams.SemanticTokensParams+  MessageParams Method_TextDocumentSemanticTokensFullDelta = Language.LSP.Protocol.Internal.Types.SemanticTokensDeltaParams.SemanticTokensDeltaParams+  MessageParams Method_TextDocumentSemanticTokensRange = Language.LSP.Protocol.Internal.Types.SemanticTokensRangeParams.SemanticTokensRangeParams+  MessageParams Method_WorkspaceSemanticTokensRefresh = Maybe Data.Void.Void+  MessageParams Method_WindowShowDocument = Language.LSP.Protocol.Internal.Types.ShowDocumentParams.ShowDocumentParams+  MessageParams Method_TextDocumentLinkedEditingRange = Language.LSP.Protocol.Internal.Types.LinkedEditingRangeParams.LinkedEditingRangeParams+  MessageParams Method_WorkspaceWillCreateFiles = Language.LSP.Protocol.Internal.Types.CreateFilesParams.CreateFilesParams+  MessageParams Method_WorkspaceWillRenameFiles = Language.LSP.Protocol.Internal.Types.RenameFilesParams.RenameFilesParams+  MessageParams Method_WorkspaceWillDeleteFiles = Language.LSP.Protocol.Internal.Types.DeleteFilesParams.DeleteFilesParams+  MessageParams Method_TextDocumentMoniker = Language.LSP.Protocol.Internal.Types.MonikerParams.MonikerParams+  MessageParams Method_TextDocumentPrepareTypeHierarchy = Language.LSP.Protocol.Internal.Types.TypeHierarchyPrepareParams.TypeHierarchyPrepareParams+  MessageParams Method_TypeHierarchySupertypes = Language.LSP.Protocol.Internal.Types.TypeHierarchySupertypesParams.TypeHierarchySupertypesParams+  MessageParams Method_TypeHierarchySubtypes = Language.LSP.Protocol.Internal.Types.TypeHierarchySubtypesParams.TypeHierarchySubtypesParams+  MessageParams Method_TextDocumentInlineValue = Language.LSP.Protocol.Internal.Types.InlineValueParams.InlineValueParams+  MessageParams Method_WorkspaceInlineValueRefresh = Maybe Data.Void.Void+  MessageParams Method_TextDocumentInlayHint = Language.LSP.Protocol.Internal.Types.InlayHintParams.InlayHintParams+  MessageParams Method_InlayHintResolve = Language.LSP.Protocol.Internal.Types.InlayHint.InlayHint+  MessageParams Method_WorkspaceInlayHintRefresh = Maybe Data.Void.Void+  MessageParams Method_TextDocumentDiagnostic = Language.LSP.Protocol.Internal.Types.DocumentDiagnosticParams.DocumentDiagnosticParams+  MessageParams Method_WorkspaceDiagnostic = Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticParams.WorkspaceDiagnosticParams+  MessageParams Method_WorkspaceDiagnosticRefresh = Maybe Data.Void.Void+  MessageParams Method_ClientRegisterCapability = Language.LSP.Protocol.Internal.Types.RegistrationParams.RegistrationParams+  MessageParams Method_ClientUnregisterCapability = Language.LSP.Protocol.Internal.Types.UnregistrationParams.UnregistrationParams+  MessageParams Method_Initialize = Language.LSP.Protocol.Internal.Types.InitializeParams.InitializeParams+  MessageParams Method_Shutdown = Maybe Data.Void.Void+  MessageParams Method_WindowShowMessageRequest = Language.LSP.Protocol.Internal.Types.ShowMessageRequestParams.ShowMessageRequestParams+  MessageParams Method_TextDocumentWillSaveWaitUntil = Language.LSP.Protocol.Internal.Types.WillSaveTextDocumentParams.WillSaveTextDocumentParams+  MessageParams Method_TextDocumentCompletion = Language.LSP.Protocol.Internal.Types.CompletionParams.CompletionParams+  MessageParams Method_CompletionItemResolve = Language.LSP.Protocol.Internal.Types.CompletionItem.CompletionItem+  MessageParams Method_TextDocumentHover = Language.LSP.Protocol.Internal.Types.HoverParams.HoverParams+  MessageParams Method_TextDocumentSignatureHelp = Language.LSP.Protocol.Internal.Types.SignatureHelpParams.SignatureHelpParams+  MessageParams Method_TextDocumentDefinition = Language.LSP.Protocol.Internal.Types.DefinitionParams.DefinitionParams+  MessageParams Method_TextDocumentReferences = Language.LSP.Protocol.Internal.Types.ReferenceParams.ReferenceParams+  MessageParams Method_TextDocumentDocumentHighlight = Language.LSP.Protocol.Internal.Types.DocumentHighlightParams.DocumentHighlightParams+  MessageParams Method_TextDocumentDocumentSymbol = Language.LSP.Protocol.Internal.Types.DocumentSymbolParams.DocumentSymbolParams+  MessageParams Method_TextDocumentCodeAction = Language.LSP.Protocol.Internal.Types.CodeActionParams.CodeActionParams+  MessageParams Method_CodeActionResolve = Language.LSP.Protocol.Internal.Types.CodeAction.CodeAction+  MessageParams Method_WorkspaceSymbol = Language.LSP.Protocol.Internal.Types.WorkspaceSymbolParams.WorkspaceSymbolParams+  MessageParams Method_WorkspaceSymbolResolve = Language.LSP.Protocol.Internal.Types.WorkspaceSymbol.WorkspaceSymbol+  MessageParams Method_TextDocumentCodeLens = Language.LSP.Protocol.Internal.Types.CodeLensParams.CodeLensParams+  MessageParams Method_CodeLensResolve = Language.LSP.Protocol.Internal.Types.CodeLens.CodeLens+  MessageParams Method_WorkspaceCodeLensRefresh = Maybe Data.Void.Void+  MessageParams Method_TextDocumentDocumentLink = Language.LSP.Protocol.Internal.Types.DocumentLinkParams.DocumentLinkParams+  MessageParams Method_DocumentLinkResolve = Language.LSP.Protocol.Internal.Types.DocumentLink.DocumentLink+  MessageParams Method_TextDocumentFormatting = Language.LSP.Protocol.Internal.Types.DocumentFormattingParams.DocumentFormattingParams+  MessageParams Method_TextDocumentRangeFormatting = Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingParams.DocumentRangeFormattingParams+  MessageParams Method_TextDocumentOnTypeFormatting = Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingParams.DocumentOnTypeFormattingParams+  MessageParams Method_TextDocumentRename = Language.LSP.Protocol.Internal.Types.RenameParams.RenameParams+  MessageParams Method_TextDocumentPrepareRename = Language.LSP.Protocol.Internal.Types.PrepareRenameParams.PrepareRenameParams+  MessageParams Method_WorkspaceExecuteCommand = Language.LSP.Protocol.Internal.Types.ExecuteCommandParams.ExecuteCommandParams+  MessageParams Method_WorkspaceApplyEdit = Language.LSP.Protocol.Internal.Types.ApplyWorkspaceEditParams.ApplyWorkspaceEditParams+  MessageParams Method_WorkspaceDidChangeWorkspaceFolders = Language.LSP.Protocol.Internal.Types.DidChangeWorkspaceFoldersParams.DidChangeWorkspaceFoldersParams+  MessageParams Method_WindowWorkDoneProgressCancel = Language.LSP.Protocol.Internal.Types.WorkDoneProgressCancelParams.WorkDoneProgressCancelParams+  MessageParams Method_WorkspaceDidCreateFiles = Language.LSP.Protocol.Internal.Types.CreateFilesParams.CreateFilesParams+  MessageParams Method_WorkspaceDidRenameFiles = Language.LSP.Protocol.Internal.Types.RenameFilesParams.RenameFilesParams+  MessageParams Method_WorkspaceDidDeleteFiles = Language.LSP.Protocol.Internal.Types.DeleteFilesParams.DeleteFilesParams+  MessageParams Method_NotebookDocumentDidOpen = Language.LSP.Protocol.Internal.Types.DidOpenNotebookDocumentParams.DidOpenNotebookDocumentParams+  MessageParams Method_NotebookDocumentDidChange = Language.LSP.Protocol.Internal.Types.DidChangeNotebookDocumentParams.DidChangeNotebookDocumentParams+  MessageParams Method_NotebookDocumentDidSave = Language.LSP.Protocol.Internal.Types.DidSaveNotebookDocumentParams.DidSaveNotebookDocumentParams+  MessageParams Method_NotebookDocumentDidClose = Language.LSP.Protocol.Internal.Types.DidCloseNotebookDocumentParams.DidCloseNotebookDocumentParams+  MessageParams Method_Initialized = Language.LSP.Protocol.Internal.Types.InitializedParams.InitializedParams+  MessageParams Method_Exit = Maybe Data.Void.Void+  MessageParams Method_WorkspaceDidChangeConfiguration = Language.LSP.Protocol.Internal.Types.DidChangeConfigurationParams.DidChangeConfigurationParams+  MessageParams Method_WindowShowMessage = Language.LSP.Protocol.Internal.Types.ShowMessageParams.ShowMessageParams+  MessageParams Method_WindowLogMessage = Language.LSP.Protocol.Internal.Types.LogMessageParams.LogMessageParams+  MessageParams Method_TelemetryEvent = Data.Aeson.Value+  MessageParams Method_TextDocumentDidOpen = Language.LSP.Protocol.Internal.Types.DidOpenTextDocumentParams.DidOpenTextDocumentParams+  MessageParams Method_TextDocumentDidChange = Language.LSP.Protocol.Internal.Types.DidChangeTextDocumentParams.DidChangeTextDocumentParams+  MessageParams Method_TextDocumentDidClose = Language.LSP.Protocol.Internal.Types.DidCloseTextDocumentParams.DidCloseTextDocumentParams+  MessageParams Method_TextDocumentDidSave = Language.LSP.Protocol.Internal.Types.DidSaveTextDocumentParams.DidSaveTextDocumentParams+  MessageParams Method_TextDocumentWillSave = Language.LSP.Protocol.Internal.Types.WillSaveTextDocumentParams.WillSaveTextDocumentParams+  MessageParams Method_WorkspaceDidChangeWatchedFiles = Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesParams.DidChangeWatchedFilesParams+  MessageParams Method_TextDocumentPublishDiagnostics = Language.LSP.Protocol.Internal.Types.PublishDiagnosticsParams.PublishDiagnosticsParams+  MessageParams Method_SetTrace = Language.LSP.Protocol.Internal.Types.SetTraceParams.SetTraceParams+  MessageParams Method_LogTrace = Language.LSP.Protocol.Internal.Types.LogTraceParams.LogTraceParams+  MessageParams Method_CancelRequest = Language.LSP.Protocol.Internal.Types.CancelParams.CancelParams+  MessageParams Method_Progress = Language.LSP.Protocol.Internal.Types.ProgressParams.ProgressParams+  MessageParams (Method_CustomMethod s) = Aeson.Value++-- | Maps a LSP method to its result type.+type MessageResult :: forall f t . Method f t -> Kind.Type+type family MessageResult (m ::  Method f t) where +  MessageResult Method_TextDocumentImplementation = (Language.LSP.Protocol.Internal.Types.Definition.Definition Language.LSP.Protocol.Types.Common.|? ([Language.LSP.Protocol.Internal.Types.DefinitionLink.DefinitionLink] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null))+  MessageResult Method_TextDocumentTypeDefinition = (Language.LSP.Protocol.Internal.Types.Definition.Definition Language.LSP.Protocol.Types.Common.|? ([Language.LSP.Protocol.Internal.Types.DefinitionLink.DefinitionLink] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null))+  MessageResult Method_WorkspaceWorkspaceFolders = ([Language.LSP.Protocol.Internal.Types.WorkspaceFolder.WorkspaceFolder] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  MessageResult Method_WorkspaceConfiguration = [Data.Aeson.Value]+  MessageResult Method_TextDocumentDocumentColor = [Language.LSP.Protocol.Internal.Types.ColorInformation.ColorInformation]+  MessageResult Method_TextDocumentColorPresentation = [Language.LSP.Protocol.Internal.Types.ColorPresentation.ColorPresentation]+  MessageResult Method_TextDocumentFoldingRange = ([Language.LSP.Protocol.Internal.Types.FoldingRange.FoldingRange] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  MessageResult Method_TextDocumentDeclaration = (Language.LSP.Protocol.Internal.Types.Declaration.Declaration Language.LSP.Protocol.Types.Common.|? ([Language.LSP.Protocol.Internal.Types.DeclarationLink.DeclarationLink] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null))+  MessageResult Method_TextDocumentSelectionRange = ([Language.LSP.Protocol.Internal.Types.SelectionRange.SelectionRange] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  MessageResult Method_WindowWorkDoneProgressCreate = Language.LSP.Protocol.Types.Common.Null+  MessageResult Method_TextDocumentPrepareCallHierarchy = ([Language.LSP.Protocol.Internal.Types.CallHierarchyItem.CallHierarchyItem] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  MessageResult Method_CallHierarchyIncomingCalls = ([Language.LSP.Protocol.Internal.Types.CallHierarchyIncomingCall.CallHierarchyIncomingCall] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  MessageResult Method_CallHierarchyOutgoingCalls = ([Language.LSP.Protocol.Internal.Types.CallHierarchyOutgoingCall.CallHierarchyOutgoingCall] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  MessageResult Method_TextDocumentSemanticTokensFull = (Language.LSP.Protocol.Internal.Types.SemanticTokens.SemanticTokens Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  MessageResult Method_TextDocumentSemanticTokensFullDelta = (Language.LSP.Protocol.Internal.Types.SemanticTokens.SemanticTokens Language.LSP.Protocol.Types.Common.|? (Language.LSP.Protocol.Internal.Types.SemanticTokensDelta.SemanticTokensDelta Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null))+  MessageResult Method_TextDocumentSemanticTokensRange = (Language.LSP.Protocol.Internal.Types.SemanticTokens.SemanticTokens Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  MessageResult Method_WorkspaceSemanticTokensRefresh = Language.LSP.Protocol.Types.Common.Null+  MessageResult Method_WindowShowDocument = Language.LSP.Protocol.Internal.Types.ShowDocumentResult.ShowDocumentResult+  MessageResult Method_TextDocumentLinkedEditingRange = (Language.LSP.Protocol.Internal.Types.LinkedEditingRanges.LinkedEditingRanges Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  MessageResult Method_WorkspaceWillCreateFiles = (Language.LSP.Protocol.Internal.Types.WorkspaceEdit.WorkspaceEdit Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  MessageResult Method_WorkspaceWillRenameFiles = (Language.LSP.Protocol.Internal.Types.WorkspaceEdit.WorkspaceEdit Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  MessageResult Method_WorkspaceWillDeleteFiles = (Language.LSP.Protocol.Internal.Types.WorkspaceEdit.WorkspaceEdit Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  MessageResult Method_TextDocumentMoniker = ([Language.LSP.Protocol.Internal.Types.Moniker.Moniker] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  MessageResult Method_TextDocumentPrepareTypeHierarchy = ([Language.LSP.Protocol.Internal.Types.TypeHierarchyItem.TypeHierarchyItem] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  MessageResult Method_TypeHierarchySupertypes = ([Language.LSP.Protocol.Internal.Types.TypeHierarchyItem.TypeHierarchyItem] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  MessageResult Method_TypeHierarchySubtypes = ([Language.LSP.Protocol.Internal.Types.TypeHierarchyItem.TypeHierarchyItem] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  MessageResult Method_TextDocumentInlineValue = ([Language.LSP.Protocol.Internal.Types.InlineValue.InlineValue] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  MessageResult Method_WorkspaceInlineValueRefresh = Language.LSP.Protocol.Types.Common.Null+  MessageResult Method_TextDocumentInlayHint = ([Language.LSP.Protocol.Internal.Types.InlayHint.InlayHint] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  MessageResult Method_InlayHintResolve = Language.LSP.Protocol.Internal.Types.InlayHint.InlayHint+  MessageResult Method_WorkspaceInlayHintRefresh = Language.LSP.Protocol.Types.Common.Null+  MessageResult Method_TextDocumentDiagnostic = Language.LSP.Protocol.Internal.Types.DocumentDiagnosticReport.DocumentDiagnosticReport+  MessageResult Method_WorkspaceDiagnostic = Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticReport.WorkspaceDiagnosticReport+  MessageResult Method_WorkspaceDiagnosticRefresh = Language.LSP.Protocol.Types.Common.Null+  MessageResult Method_ClientRegisterCapability = Language.LSP.Protocol.Types.Common.Null+  MessageResult Method_ClientUnregisterCapability = Language.LSP.Protocol.Types.Common.Null+  MessageResult Method_Initialize = Language.LSP.Protocol.Internal.Types.InitializeResult.InitializeResult+  MessageResult Method_Shutdown = Language.LSP.Protocol.Types.Common.Null+  MessageResult Method_WindowShowMessageRequest = (Language.LSP.Protocol.Internal.Types.MessageActionItem.MessageActionItem Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  MessageResult Method_TextDocumentWillSaveWaitUntil = ([Language.LSP.Protocol.Internal.Types.TextEdit.TextEdit] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  MessageResult Method_TextDocumentCompletion = ([Language.LSP.Protocol.Internal.Types.CompletionItem.CompletionItem] Language.LSP.Protocol.Types.Common.|? (Language.LSP.Protocol.Internal.Types.CompletionList.CompletionList Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null))+  MessageResult Method_CompletionItemResolve = Language.LSP.Protocol.Internal.Types.CompletionItem.CompletionItem+  MessageResult Method_TextDocumentHover = (Language.LSP.Protocol.Internal.Types.Hover.Hover Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  MessageResult Method_TextDocumentSignatureHelp = (Language.LSP.Protocol.Internal.Types.SignatureHelp.SignatureHelp Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  MessageResult Method_TextDocumentDefinition = (Language.LSP.Protocol.Internal.Types.Definition.Definition Language.LSP.Protocol.Types.Common.|? ([Language.LSP.Protocol.Internal.Types.DefinitionLink.DefinitionLink] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null))+  MessageResult Method_TextDocumentReferences = ([Language.LSP.Protocol.Internal.Types.Location.Location] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  MessageResult Method_TextDocumentDocumentHighlight = ([Language.LSP.Protocol.Internal.Types.DocumentHighlight.DocumentHighlight] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  MessageResult Method_TextDocumentDocumentSymbol = ([Language.LSP.Protocol.Internal.Types.SymbolInformation.SymbolInformation] Language.LSP.Protocol.Types.Common.|? ([Language.LSP.Protocol.Internal.Types.DocumentSymbol.DocumentSymbol] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null))+  MessageResult Method_TextDocumentCodeAction = ([(Language.LSP.Protocol.Internal.Types.Command.Command Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.CodeAction.CodeAction)] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  MessageResult Method_CodeActionResolve = Language.LSP.Protocol.Internal.Types.CodeAction.CodeAction+  MessageResult Method_WorkspaceSymbol = ([Language.LSP.Protocol.Internal.Types.SymbolInformation.SymbolInformation] Language.LSP.Protocol.Types.Common.|? ([Language.LSP.Protocol.Internal.Types.WorkspaceSymbol.WorkspaceSymbol] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null))+  MessageResult Method_WorkspaceSymbolResolve = Language.LSP.Protocol.Internal.Types.WorkspaceSymbol.WorkspaceSymbol+  MessageResult Method_TextDocumentCodeLens = ([Language.LSP.Protocol.Internal.Types.CodeLens.CodeLens] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  MessageResult Method_CodeLensResolve = Language.LSP.Protocol.Internal.Types.CodeLens.CodeLens+  MessageResult Method_WorkspaceCodeLensRefresh = Language.LSP.Protocol.Types.Common.Null+  MessageResult Method_TextDocumentDocumentLink = ([Language.LSP.Protocol.Internal.Types.DocumentLink.DocumentLink] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  MessageResult Method_DocumentLinkResolve = Language.LSP.Protocol.Internal.Types.DocumentLink.DocumentLink+  MessageResult Method_TextDocumentFormatting = ([Language.LSP.Protocol.Internal.Types.TextEdit.TextEdit] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  MessageResult Method_TextDocumentRangeFormatting = ([Language.LSP.Protocol.Internal.Types.TextEdit.TextEdit] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  MessageResult Method_TextDocumentOnTypeFormatting = ([Language.LSP.Protocol.Internal.Types.TextEdit.TextEdit] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  MessageResult Method_TextDocumentRename = (Language.LSP.Protocol.Internal.Types.WorkspaceEdit.WorkspaceEdit Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  MessageResult Method_TextDocumentPrepareRename = (Language.LSP.Protocol.Internal.Types.PrepareRenameResult.PrepareRenameResult Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  MessageResult Method_WorkspaceExecuteCommand = (Data.Aeson.Value Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  MessageResult Method_WorkspaceApplyEdit = Language.LSP.Protocol.Internal.Types.ApplyWorkspaceEditResult.ApplyWorkspaceEditResult+  MessageResult (Method_CustomMethod s) = Aeson.Value++-- | Maps a LSP method to its error data type.+type ErrorData :: forall f t . Method f t -> Kind.Type+type family ErrorData (m ::  Method f t) where +  ErrorData Method_TextDocumentImplementation = Maybe Data.Void.Void+  ErrorData Method_TextDocumentTypeDefinition = Maybe Data.Void.Void+  ErrorData Method_WorkspaceWorkspaceFolders = Maybe Data.Void.Void+  ErrorData Method_WorkspaceConfiguration = Maybe Data.Void.Void+  ErrorData Method_TextDocumentDocumentColor = Maybe Data.Void.Void+  ErrorData Method_TextDocumentColorPresentation = Maybe Data.Void.Void+  ErrorData Method_TextDocumentFoldingRange = Maybe Data.Void.Void+  ErrorData Method_TextDocumentDeclaration = Maybe Data.Void.Void+  ErrorData Method_TextDocumentSelectionRange = Maybe Data.Void.Void+  ErrorData Method_WindowWorkDoneProgressCreate = Maybe Data.Void.Void+  ErrorData Method_TextDocumentPrepareCallHierarchy = Maybe Data.Void.Void+  ErrorData Method_CallHierarchyIncomingCalls = Maybe Data.Void.Void+  ErrorData Method_CallHierarchyOutgoingCalls = Maybe Data.Void.Void+  ErrorData Method_TextDocumentSemanticTokensFull = Maybe Data.Void.Void+  ErrorData Method_TextDocumentSemanticTokensFullDelta = Maybe Data.Void.Void+  ErrorData Method_TextDocumentSemanticTokensRange = Maybe Data.Void.Void+  ErrorData Method_WorkspaceSemanticTokensRefresh = Maybe Data.Void.Void+  ErrorData Method_WindowShowDocument = Maybe Data.Void.Void+  ErrorData Method_TextDocumentLinkedEditingRange = Maybe Data.Void.Void+  ErrorData Method_WorkspaceWillCreateFiles = Maybe Data.Void.Void+  ErrorData Method_WorkspaceWillRenameFiles = Maybe Data.Void.Void+  ErrorData Method_WorkspaceWillDeleteFiles = Maybe Data.Void.Void+  ErrorData Method_TextDocumentMoniker = Maybe Data.Void.Void+  ErrorData Method_TextDocumentPrepareTypeHierarchy = Maybe Data.Void.Void+  ErrorData Method_TypeHierarchySupertypes = Maybe Data.Void.Void+  ErrorData Method_TypeHierarchySubtypes = Maybe Data.Void.Void+  ErrorData Method_TextDocumentInlineValue = Maybe Data.Void.Void+  ErrorData Method_WorkspaceInlineValueRefresh = Maybe Data.Void.Void+  ErrorData Method_TextDocumentInlayHint = Maybe Data.Void.Void+  ErrorData Method_InlayHintResolve = Maybe Data.Void.Void+  ErrorData Method_WorkspaceInlayHintRefresh = Maybe Data.Void.Void+  ErrorData Method_TextDocumentDiagnostic = Language.LSP.Protocol.Internal.Types.DiagnosticServerCancellationData.DiagnosticServerCancellationData+  ErrorData Method_WorkspaceDiagnostic = Language.LSP.Protocol.Internal.Types.DiagnosticServerCancellationData.DiagnosticServerCancellationData+  ErrorData Method_WorkspaceDiagnosticRefresh = Maybe Data.Void.Void+  ErrorData Method_ClientRegisterCapability = Maybe Data.Void.Void+  ErrorData Method_ClientUnregisterCapability = Maybe Data.Void.Void+  ErrorData Method_Initialize = Language.LSP.Protocol.Internal.Types.InitializeError.InitializeError+  ErrorData Method_Shutdown = Maybe Data.Void.Void+  ErrorData Method_WindowShowMessageRequest = Maybe Data.Void.Void+  ErrorData Method_TextDocumentWillSaveWaitUntil = Maybe Data.Void.Void+  ErrorData Method_TextDocumentCompletion = Maybe Data.Void.Void+  ErrorData Method_CompletionItemResolve = Maybe Data.Void.Void+  ErrorData Method_TextDocumentHover = Maybe Data.Void.Void+  ErrorData Method_TextDocumentSignatureHelp = Maybe Data.Void.Void+  ErrorData Method_TextDocumentDefinition = Maybe Data.Void.Void+  ErrorData Method_TextDocumentReferences = Maybe Data.Void.Void+  ErrorData Method_TextDocumentDocumentHighlight = Maybe Data.Void.Void+  ErrorData Method_TextDocumentDocumentSymbol = Maybe Data.Void.Void+  ErrorData Method_TextDocumentCodeAction = Maybe Data.Void.Void+  ErrorData Method_CodeActionResolve = Maybe Data.Void.Void+  ErrorData Method_WorkspaceSymbol = Maybe Data.Void.Void+  ErrorData Method_WorkspaceSymbolResolve = Maybe Data.Void.Void+  ErrorData Method_TextDocumentCodeLens = Maybe Data.Void.Void+  ErrorData Method_CodeLensResolve = Maybe Data.Void.Void+  ErrorData Method_WorkspaceCodeLensRefresh = Maybe Data.Void.Void+  ErrorData Method_TextDocumentDocumentLink = Maybe Data.Void.Void+  ErrorData Method_DocumentLinkResolve = Maybe Data.Void.Void+  ErrorData Method_TextDocumentFormatting = Maybe Data.Void.Void+  ErrorData Method_TextDocumentRangeFormatting = Maybe Data.Void.Void+  ErrorData Method_TextDocumentOnTypeFormatting = Maybe Data.Void.Void+  ErrorData Method_TextDocumentRename = Maybe Data.Void.Void+  ErrorData Method_TextDocumentPrepareRename = Maybe Data.Void.Void+  ErrorData Method_WorkspaceExecuteCommand = Maybe Data.Void.Void+  ErrorData Method_WorkspaceApplyEdit = Maybe Data.Void.Void+  ErrorData (Method_CustomMethod s) = Aeson.Value++-- | Maps a LSP method to its registration options type.+type RegistrationOptions :: forall f t . Method f t -> Kind.Type+type family RegistrationOptions (m ::  Method f t) where +  RegistrationOptions Method_TextDocumentImplementation = Language.LSP.Protocol.Internal.Types.ImplementationRegistrationOptions.ImplementationRegistrationOptions+  RegistrationOptions Method_TextDocumentTypeDefinition = Language.LSP.Protocol.Internal.Types.TypeDefinitionRegistrationOptions.TypeDefinitionRegistrationOptions+  RegistrationOptions Method_WorkspaceWorkspaceFolders = Maybe Data.Void.Void+  RegistrationOptions Method_WorkspaceConfiguration = Maybe Data.Void.Void+  RegistrationOptions Method_TextDocumentDocumentColor = Language.LSP.Protocol.Internal.Types.DocumentColorRegistrationOptions.DocumentColorRegistrationOptions+  RegistrationOptions Method_TextDocumentColorPresentation = (Row.Rec ("workDoneProgress" Row..== (Maybe Bool) Row..+ ("documentSelector" Row..== (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null) Row..+ Row.Empty)))+  RegistrationOptions Method_TextDocumentFoldingRange = Language.LSP.Protocol.Internal.Types.FoldingRangeRegistrationOptions.FoldingRangeRegistrationOptions+  RegistrationOptions Method_TextDocumentDeclaration = Language.LSP.Protocol.Internal.Types.DeclarationRegistrationOptions.DeclarationRegistrationOptions+  RegistrationOptions Method_TextDocumentSelectionRange = Language.LSP.Protocol.Internal.Types.SelectionRangeRegistrationOptions.SelectionRangeRegistrationOptions+  RegistrationOptions Method_WindowWorkDoneProgressCreate = Maybe Data.Void.Void+  RegistrationOptions Method_TextDocumentPrepareCallHierarchy = Language.LSP.Protocol.Internal.Types.CallHierarchyRegistrationOptions.CallHierarchyRegistrationOptions+  RegistrationOptions Method_CallHierarchyIncomingCalls = Maybe Data.Void.Void+  RegistrationOptions Method_CallHierarchyOutgoingCalls = Maybe Data.Void.Void+  RegistrationOptions Method_TextDocumentSemanticTokensFull = Language.LSP.Protocol.Internal.Types.SemanticTokensRegistrationOptions.SemanticTokensRegistrationOptions+  RegistrationOptions Method_TextDocumentSemanticTokensFullDelta = Language.LSP.Protocol.Internal.Types.SemanticTokensRegistrationOptions.SemanticTokensRegistrationOptions+  RegistrationOptions Method_TextDocumentSemanticTokensRange = Maybe Data.Void.Void+  RegistrationOptions Method_WorkspaceSemanticTokensRefresh = Maybe Data.Void.Void+  RegistrationOptions Method_WindowShowDocument = Maybe Data.Void.Void+  RegistrationOptions Method_TextDocumentLinkedEditingRange = Language.LSP.Protocol.Internal.Types.LinkedEditingRangeRegistrationOptions.LinkedEditingRangeRegistrationOptions+  RegistrationOptions Method_WorkspaceWillCreateFiles = Language.LSP.Protocol.Internal.Types.FileOperationRegistrationOptions.FileOperationRegistrationOptions+  RegistrationOptions Method_WorkspaceWillRenameFiles = Language.LSP.Protocol.Internal.Types.FileOperationRegistrationOptions.FileOperationRegistrationOptions+  RegistrationOptions Method_WorkspaceWillDeleteFiles = Language.LSP.Protocol.Internal.Types.FileOperationRegistrationOptions.FileOperationRegistrationOptions+  RegistrationOptions Method_TextDocumentMoniker = Language.LSP.Protocol.Internal.Types.MonikerRegistrationOptions.MonikerRegistrationOptions+  RegistrationOptions Method_TextDocumentPrepareTypeHierarchy = Language.LSP.Protocol.Internal.Types.TypeHierarchyRegistrationOptions.TypeHierarchyRegistrationOptions+  RegistrationOptions Method_TypeHierarchySupertypes = Maybe Data.Void.Void+  RegistrationOptions Method_TypeHierarchySubtypes = Maybe Data.Void.Void+  RegistrationOptions Method_TextDocumentInlineValue = Language.LSP.Protocol.Internal.Types.InlineValueRegistrationOptions.InlineValueRegistrationOptions+  RegistrationOptions Method_WorkspaceInlineValueRefresh = Maybe Data.Void.Void+  RegistrationOptions Method_TextDocumentInlayHint = Language.LSP.Protocol.Internal.Types.InlayHintRegistrationOptions.InlayHintRegistrationOptions+  RegistrationOptions Method_InlayHintResolve = Maybe Data.Void.Void+  RegistrationOptions Method_WorkspaceInlayHintRefresh = Maybe Data.Void.Void+  RegistrationOptions Method_TextDocumentDiagnostic = Language.LSP.Protocol.Internal.Types.DiagnosticRegistrationOptions.DiagnosticRegistrationOptions+  RegistrationOptions Method_WorkspaceDiagnostic = Maybe Data.Void.Void+  RegistrationOptions Method_WorkspaceDiagnosticRefresh = Maybe Data.Void.Void+  RegistrationOptions Method_ClientRegisterCapability = Maybe Data.Void.Void+  RegistrationOptions Method_ClientUnregisterCapability = Maybe Data.Void.Void+  RegistrationOptions Method_Initialize = Maybe Data.Void.Void+  RegistrationOptions Method_Shutdown = Maybe Data.Void.Void+  RegistrationOptions Method_WindowShowMessageRequest = Maybe Data.Void.Void+  RegistrationOptions Method_TextDocumentWillSaveWaitUntil = Language.LSP.Protocol.Internal.Types.TextDocumentRegistrationOptions.TextDocumentRegistrationOptions+  RegistrationOptions Method_TextDocumentCompletion = Language.LSP.Protocol.Internal.Types.CompletionRegistrationOptions.CompletionRegistrationOptions+  RegistrationOptions Method_CompletionItemResolve = Maybe Data.Void.Void+  RegistrationOptions Method_TextDocumentHover = Language.LSP.Protocol.Internal.Types.HoverRegistrationOptions.HoverRegistrationOptions+  RegistrationOptions Method_TextDocumentSignatureHelp = Language.LSP.Protocol.Internal.Types.SignatureHelpRegistrationOptions.SignatureHelpRegistrationOptions+  RegistrationOptions Method_TextDocumentDefinition = Language.LSP.Protocol.Internal.Types.DefinitionRegistrationOptions.DefinitionRegistrationOptions+  RegistrationOptions Method_TextDocumentReferences = Language.LSP.Protocol.Internal.Types.ReferenceRegistrationOptions.ReferenceRegistrationOptions+  RegistrationOptions Method_TextDocumentDocumentHighlight = Language.LSP.Protocol.Internal.Types.DocumentHighlightRegistrationOptions.DocumentHighlightRegistrationOptions+  RegistrationOptions Method_TextDocumentDocumentSymbol = Language.LSP.Protocol.Internal.Types.DocumentSymbolRegistrationOptions.DocumentSymbolRegistrationOptions+  RegistrationOptions Method_TextDocumentCodeAction = Language.LSP.Protocol.Internal.Types.CodeActionRegistrationOptions.CodeActionRegistrationOptions+  RegistrationOptions Method_CodeActionResolve = Maybe Data.Void.Void+  RegistrationOptions Method_WorkspaceSymbol = Language.LSP.Protocol.Internal.Types.WorkspaceSymbolRegistrationOptions.WorkspaceSymbolRegistrationOptions+  RegistrationOptions Method_WorkspaceSymbolResolve = Maybe Data.Void.Void+  RegistrationOptions Method_TextDocumentCodeLens = Language.LSP.Protocol.Internal.Types.CodeLensRegistrationOptions.CodeLensRegistrationOptions+  RegistrationOptions Method_CodeLensResolve = Maybe Data.Void.Void+  RegistrationOptions Method_WorkspaceCodeLensRefresh = Maybe Data.Void.Void+  RegistrationOptions Method_TextDocumentDocumentLink = Language.LSP.Protocol.Internal.Types.DocumentLinkRegistrationOptions.DocumentLinkRegistrationOptions+  RegistrationOptions Method_DocumentLinkResolve = Maybe Data.Void.Void+  RegistrationOptions Method_TextDocumentFormatting = Language.LSP.Protocol.Internal.Types.DocumentFormattingRegistrationOptions.DocumentFormattingRegistrationOptions+  RegistrationOptions Method_TextDocumentRangeFormatting = Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingRegistrationOptions.DocumentRangeFormattingRegistrationOptions+  RegistrationOptions Method_TextDocumentOnTypeFormatting = Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingRegistrationOptions.DocumentOnTypeFormattingRegistrationOptions+  RegistrationOptions Method_TextDocumentRename = Language.LSP.Protocol.Internal.Types.RenameRegistrationOptions.RenameRegistrationOptions+  RegistrationOptions Method_TextDocumentPrepareRename = Maybe Data.Void.Void+  RegistrationOptions Method_WorkspaceExecuteCommand = Language.LSP.Protocol.Internal.Types.ExecuteCommandRegistrationOptions.ExecuteCommandRegistrationOptions+  RegistrationOptions Method_WorkspaceApplyEdit = Maybe Data.Void.Void+  RegistrationOptions Method_WorkspaceDidChangeWorkspaceFolders = Maybe Data.Void.Void+  RegistrationOptions Method_WindowWorkDoneProgressCancel = Maybe Data.Void.Void+  RegistrationOptions Method_WorkspaceDidCreateFiles = Language.LSP.Protocol.Internal.Types.FileOperationRegistrationOptions.FileOperationRegistrationOptions+  RegistrationOptions Method_WorkspaceDidRenameFiles = Language.LSP.Protocol.Internal.Types.FileOperationRegistrationOptions.FileOperationRegistrationOptions+  RegistrationOptions Method_WorkspaceDidDeleteFiles = Language.LSP.Protocol.Internal.Types.FileOperationRegistrationOptions.FileOperationRegistrationOptions+  RegistrationOptions Method_NotebookDocumentDidOpen = Maybe Data.Void.Void+  RegistrationOptions Method_NotebookDocumentDidChange = Maybe Data.Void.Void+  RegistrationOptions Method_NotebookDocumentDidSave = Maybe Data.Void.Void+  RegistrationOptions Method_NotebookDocumentDidClose = Maybe Data.Void.Void+  RegistrationOptions Method_Initialized = Maybe Data.Void.Void+  RegistrationOptions Method_Exit = Maybe Data.Void.Void+  RegistrationOptions Method_WorkspaceDidChangeConfiguration = Language.LSP.Protocol.Internal.Types.DidChangeConfigurationRegistrationOptions.DidChangeConfigurationRegistrationOptions+  RegistrationOptions Method_WindowShowMessage = Maybe Data.Void.Void+  RegistrationOptions Method_WindowLogMessage = Maybe Data.Void.Void+  RegistrationOptions Method_TelemetryEvent = Maybe Data.Void.Void+  RegistrationOptions Method_TextDocumentDidOpen = Language.LSP.Protocol.Internal.Types.TextDocumentRegistrationOptions.TextDocumentRegistrationOptions+  RegistrationOptions Method_TextDocumentDidChange = Language.LSP.Protocol.Internal.Types.TextDocumentChangeRegistrationOptions.TextDocumentChangeRegistrationOptions+  RegistrationOptions Method_TextDocumentDidClose = Language.LSP.Protocol.Internal.Types.TextDocumentRegistrationOptions.TextDocumentRegistrationOptions+  RegistrationOptions Method_TextDocumentDidSave = Language.LSP.Protocol.Internal.Types.TextDocumentSaveRegistrationOptions.TextDocumentSaveRegistrationOptions+  RegistrationOptions Method_TextDocumentWillSave = Language.LSP.Protocol.Internal.Types.TextDocumentRegistrationOptions.TextDocumentRegistrationOptions+  RegistrationOptions Method_WorkspaceDidChangeWatchedFiles = Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesRegistrationOptions.DidChangeWatchedFilesRegistrationOptions+  RegistrationOptions Method_TextDocumentPublishDiagnostics = Maybe Data.Void.Void+  RegistrationOptions Method_SetTrace = Maybe Data.Void.Void+  RegistrationOptions Method_LogTrace = Maybe Data.Void.Void+  RegistrationOptions Method_CancelRequest = Maybe Data.Void.Void+  RegistrationOptions Method_Progress = Maybe Data.Void.Void+  RegistrationOptions (Method_CustomMethod s) = Data.Void.Void++-- | A singleton type for 'Method'.+type SMethod :: forall f t . Method f t -> Kind.Type+data SMethod m where +  SMethod_TextDocumentImplementation :: SMethod Method_TextDocumentImplementation+  SMethod_TextDocumentTypeDefinition :: SMethod Method_TextDocumentTypeDefinition+  SMethod_WorkspaceWorkspaceFolders :: SMethod Method_WorkspaceWorkspaceFolders+  SMethod_WorkspaceConfiguration :: SMethod Method_WorkspaceConfiguration+  SMethod_TextDocumentDocumentColor :: SMethod Method_TextDocumentDocumentColor+  SMethod_TextDocumentColorPresentation :: SMethod Method_TextDocumentColorPresentation+  SMethod_TextDocumentFoldingRange :: SMethod Method_TextDocumentFoldingRange+  SMethod_TextDocumentDeclaration :: SMethod Method_TextDocumentDeclaration+  SMethod_TextDocumentSelectionRange :: SMethod Method_TextDocumentSelectionRange+  SMethod_WindowWorkDoneProgressCreate :: SMethod Method_WindowWorkDoneProgressCreate+  SMethod_TextDocumentPrepareCallHierarchy :: SMethod Method_TextDocumentPrepareCallHierarchy+  SMethod_CallHierarchyIncomingCalls :: SMethod Method_CallHierarchyIncomingCalls+  SMethod_CallHierarchyOutgoingCalls :: SMethod Method_CallHierarchyOutgoingCalls+  SMethod_TextDocumentSemanticTokensFull :: SMethod Method_TextDocumentSemanticTokensFull+  SMethod_TextDocumentSemanticTokensFullDelta :: SMethod Method_TextDocumentSemanticTokensFullDelta+  SMethod_TextDocumentSemanticTokensRange :: SMethod Method_TextDocumentSemanticTokensRange+  SMethod_WorkspaceSemanticTokensRefresh :: SMethod Method_WorkspaceSemanticTokensRefresh+  SMethod_WindowShowDocument :: SMethod Method_WindowShowDocument+  SMethod_TextDocumentLinkedEditingRange :: SMethod Method_TextDocumentLinkedEditingRange+  SMethod_WorkspaceWillCreateFiles :: SMethod Method_WorkspaceWillCreateFiles+  SMethod_WorkspaceWillRenameFiles :: SMethod Method_WorkspaceWillRenameFiles+  SMethod_WorkspaceWillDeleteFiles :: SMethod Method_WorkspaceWillDeleteFiles+  SMethod_TextDocumentMoniker :: SMethod Method_TextDocumentMoniker+  SMethod_TextDocumentPrepareTypeHierarchy :: SMethod Method_TextDocumentPrepareTypeHierarchy+  SMethod_TypeHierarchySupertypes :: SMethod Method_TypeHierarchySupertypes+  SMethod_TypeHierarchySubtypes :: SMethod Method_TypeHierarchySubtypes+  SMethod_TextDocumentInlineValue :: SMethod Method_TextDocumentInlineValue+  SMethod_WorkspaceInlineValueRefresh :: SMethod Method_WorkspaceInlineValueRefresh+  SMethod_TextDocumentInlayHint :: SMethod Method_TextDocumentInlayHint+  SMethod_InlayHintResolve :: SMethod Method_InlayHintResolve+  SMethod_WorkspaceInlayHintRefresh :: SMethod Method_WorkspaceInlayHintRefresh+  SMethod_TextDocumentDiagnostic :: SMethod Method_TextDocumentDiagnostic+  SMethod_WorkspaceDiagnostic :: SMethod Method_WorkspaceDiagnostic+  SMethod_WorkspaceDiagnosticRefresh :: SMethod Method_WorkspaceDiagnosticRefresh+  SMethod_ClientRegisterCapability :: SMethod Method_ClientRegisterCapability+  SMethod_ClientUnregisterCapability :: SMethod Method_ClientUnregisterCapability+  SMethod_Initialize :: SMethod Method_Initialize+  SMethod_Shutdown :: SMethod Method_Shutdown+  SMethod_WindowShowMessageRequest :: SMethod Method_WindowShowMessageRequest+  SMethod_TextDocumentWillSaveWaitUntil :: SMethod Method_TextDocumentWillSaveWaitUntil+  SMethod_TextDocumentCompletion :: SMethod Method_TextDocumentCompletion+  SMethod_CompletionItemResolve :: SMethod Method_CompletionItemResolve+  SMethod_TextDocumentHover :: SMethod Method_TextDocumentHover+  SMethod_TextDocumentSignatureHelp :: SMethod Method_TextDocumentSignatureHelp+  SMethod_TextDocumentDefinition :: SMethod Method_TextDocumentDefinition+  SMethod_TextDocumentReferences :: SMethod Method_TextDocumentReferences+  SMethod_TextDocumentDocumentHighlight :: SMethod Method_TextDocumentDocumentHighlight+  SMethod_TextDocumentDocumentSymbol :: SMethod Method_TextDocumentDocumentSymbol+  SMethod_TextDocumentCodeAction :: SMethod Method_TextDocumentCodeAction+  SMethod_CodeActionResolve :: SMethod Method_CodeActionResolve+  SMethod_WorkspaceSymbol :: SMethod Method_WorkspaceSymbol+  SMethod_WorkspaceSymbolResolve :: SMethod Method_WorkspaceSymbolResolve+  SMethod_TextDocumentCodeLens :: SMethod Method_TextDocumentCodeLens+  SMethod_CodeLensResolve :: SMethod Method_CodeLensResolve+  SMethod_WorkspaceCodeLensRefresh :: SMethod Method_WorkspaceCodeLensRefresh+  SMethod_TextDocumentDocumentLink :: SMethod Method_TextDocumentDocumentLink+  SMethod_DocumentLinkResolve :: SMethod Method_DocumentLinkResolve+  SMethod_TextDocumentFormatting :: SMethod Method_TextDocumentFormatting+  SMethod_TextDocumentRangeFormatting :: SMethod Method_TextDocumentRangeFormatting+  SMethod_TextDocumentOnTypeFormatting :: SMethod Method_TextDocumentOnTypeFormatting+  SMethod_TextDocumentRename :: SMethod Method_TextDocumentRename+  SMethod_TextDocumentPrepareRename :: SMethod Method_TextDocumentPrepareRename+  SMethod_WorkspaceExecuteCommand :: SMethod Method_WorkspaceExecuteCommand+  SMethod_WorkspaceApplyEdit :: SMethod Method_WorkspaceApplyEdit+  SMethod_WorkspaceDidChangeWorkspaceFolders :: SMethod Method_WorkspaceDidChangeWorkspaceFolders+  SMethod_WindowWorkDoneProgressCancel :: SMethod Method_WindowWorkDoneProgressCancel+  SMethod_WorkspaceDidCreateFiles :: SMethod Method_WorkspaceDidCreateFiles+  SMethod_WorkspaceDidRenameFiles :: SMethod Method_WorkspaceDidRenameFiles+  SMethod_WorkspaceDidDeleteFiles :: SMethod Method_WorkspaceDidDeleteFiles+  SMethod_NotebookDocumentDidOpen :: SMethod Method_NotebookDocumentDidOpen+  SMethod_NotebookDocumentDidChange :: SMethod Method_NotebookDocumentDidChange+  SMethod_NotebookDocumentDidSave :: SMethod Method_NotebookDocumentDidSave+  SMethod_NotebookDocumentDidClose :: SMethod Method_NotebookDocumentDidClose+  SMethod_Initialized :: SMethod Method_Initialized+  SMethod_Exit :: SMethod Method_Exit+  SMethod_WorkspaceDidChangeConfiguration :: SMethod Method_WorkspaceDidChangeConfiguration+  SMethod_WindowShowMessage :: SMethod Method_WindowShowMessage+  SMethod_WindowLogMessage :: SMethod Method_WindowLogMessage+  SMethod_TelemetryEvent :: SMethod Method_TelemetryEvent+  SMethod_TextDocumentDidOpen :: SMethod Method_TextDocumentDidOpen+  SMethod_TextDocumentDidChange :: SMethod Method_TextDocumentDidChange+  SMethod_TextDocumentDidClose :: SMethod Method_TextDocumentDidClose+  SMethod_TextDocumentDidSave :: SMethod Method_TextDocumentDidSave+  SMethod_TextDocumentWillSave :: SMethod Method_TextDocumentWillSave+  SMethod_WorkspaceDidChangeWatchedFiles :: SMethod Method_WorkspaceDidChangeWatchedFiles+  SMethod_TextDocumentPublishDiagnostics :: SMethod Method_TextDocumentPublishDiagnostics+  SMethod_SetTrace :: SMethod Method_SetTrace+  SMethod_LogTrace :: SMethod Method_LogTrace+  SMethod_CancelRequest :: SMethod Method_CancelRequest+  SMethod_Progress :: SMethod Method_Progress+  SMethod_CustomMethod :: forall s . GHC.TypeLits.KnownSymbol s => Data.Proxy.Proxy s -> SMethod (Method_CustomMethod s)++-- | A method which isn't statically known.+data SomeMethod where +  SomeMethod :: forall m . SMethod m -> SomeMethod++-- | Turn a 'SomeMethod' into its LSP method string.+someMethodToMethodString :: SomeMethod -> String+someMethodToMethodString (SomeMethod SMethod_TextDocumentImplementation) = "textDocument/implementation"+someMethodToMethodString (SomeMethod SMethod_TextDocumentTypeDefinition) = "textDocument/typeDefinition"+someMethodToMethodString (SomeMethod SMethod_WorkspaceWorkspaceFolders) = "workspace/workspaceFolders"+someMethodToMethodString (SomeMethod SMethod_WorkspaceConfiguration) = "workspace/configuration"+someMethodToMethodString (SomeMethod SMethod_TextDocumentDocumentColor) = "textDocument/documentColor"+someMethodToMethodString (SomeMethod SMethod_TextDocumentColorPresentation) = "textDocument/colorPresentation"+someMethodToMethodString (SomeMethod SMethod_TextDocumentFoldingRange) = "textDocument/foldingRange"+someMethodToMethodString (SomeMethod SMethod_TextDocumentDeclaration) = "textDocument/declaration"+someMethodToMethodString (SomeMethod SMethod_TextDocumentSelectionRange) = "textDocument/selectionRange"+someMethodToMethodString (SomeMethod SMethod_WindowWorkDoneProgressCreate) = "window/workDoneProgress/create"+someMethodToMethodString (SomeMethod SMethod_TextDocumentPrepareCallHierarchy) = "textDocument/prepareCallHierarchy"+someMethodToMethodString (SomeMethod SMethod_CallHierarchyIncomingCalls) = "callHierarchy/incomingCalls"+someMethodToMethodString (SomeMethod SMethod_CallHierarchyOutgoingCalls) = "callHierarchy/outgoingCalls"+someMethodToMethodString (SomeMethod SMethod_TextDocumentSemanticTokensFull) = "textDocument/semanticTokens/full"+someMethodToMethodString (SomeMethod SMethod_TextDocumentSemanticTokensFullDelta) = "textDocument/semanticTokens/full/delta"+someMethodToMethodString (SomeMethod SMethod_TextDocumentSemanticTokensRange) = "textDocument/semanticTokens/range"+someMethodToMethodString (SomeMethod SMethod_WorkspaceSemanticTokensRefresh) = "workspace/semanticTokens/refresh"+someMethodToMethodString (SomeMethod SMethod_WindowShowDocument) = "window/showDocument"+someMethodToMethodString (SomeMethod SMethod_TextDocumentLinkedEditingRange) = "textDocument/linkedEditingRange"+someMethodToMethodString (SomeMethod SMethod_WorkspaceWillCreateFiles) = "workspace/willCreateFiles"+someMethodToMethodString (SomeMethod SMethod_WorkspaceWillRenameFiles) = "workspace/willRenameFiles"+someMethodToMethodString (SomeMethod SMethod_WorkspaceWillDeleteFiles) = "workspace/willDeleteFiles"+someMethodToMethodString (SomeMethod SMethod_TextDocumentMoniker) = "textDocument/moniker"+someMethodToMethodString (SomeMethod SMethod_TextDocumentPrepareTypeHierarchy) = "textDocument/prepareTypeHierarchy"+someMethodToMethodString (SomeMethod SMethod_TypeHierarchySupertypes) = "typeHierarchy/supertypes"+someMethodToMethodString (SomeMethod SMethod_TypeHierarchySubtypes) = "typeHierarchy/subtypes"+someMethodToMethodString (SomeMethod SMethod_TextDocumentInlineValue) = "textDocument/inlineValue"+someMethodToMethodString (SomeMethod SMethod_WorkspaceInlineValueRefresh) = "workspace/inlineValue/refresh"+someMethodToMethodString (SomeMethod SMethod_TextDocumentInlayHint) = "textDocument/inlayHint"+someMethodToMethodString (SomeMethod SMethod_InlayHintResolve) = "inlayHint/resolve"+someMethodToMethodString (SomeMethod SMethod_WorkspaceInlayHintRefresh) = "workspace/inlayHint/refresh"+someMethodToMethodString (SomeMethod SMethod_TextDocumentDiagnostic) = "textDocument/diagnostic"+someMethodToMethodString (SomeMethod SMethod_WorkspaceDiagnostic) = "workspace/diagnostic"+someMethodToMethodString (SomeMethod SMethod_WorkspaceDiagnosticRefresh) = "workspace/diagnostic/refresh"+someMethodToMethodString (SomeMethod SMethod_ClientRegisterCapability) = "client/registerCapability"+someMethodToMethodString (SomeMethod SMethod_ClientUnregisterCapability) = "client/unregisterCapability"+someMethodToMethodString (SomeMethod SMethod_Initialize) = "initialize"+someMethodToMethodString (SomeMethod SMethod_Shutdown) = "shutdown"+someMethodToMethodString (SomeMethod SMethod_WindowShowMessageRequest) = "window/showMessageRequest"+someMethodToMethodString (SomeMethod SMethod_TextDocumentWillSaveWaitUntil) = "textDocument/willSaveWaitUntil"+someMethodToMethodString (SomeMethod SMethod_TextDocumentCompletion) = "textDocument/completion"+someMethodToMethodString (SomeMethod SMethod_CompletionItemResolve) = "completionItem/resolve"+someMethodToMethodString (SomeMethod SMethod_TextDocumentHover) = "textDocument/hover"+someMethodToMethodString (SomeMethod SMethod_TextDocumentSignatureHelp) = "textDocument/signatureHelp"+someMethodToMethodString (SomeMethod SMethod_TextDocumentDefinition) = "textDocument/definition"+someMethodToMethodString (SomeMethod SMethod_TextDocumentReferences) = "textDocument/references"+someMethodToMethodString (SomeMethod SMethod_TextDocumentDocumentHighlight) = "textDocument/documentHighlight"+someMethodToMethodString (SomeMethod SMethod_TextDocumentDocumentSymbol) = "textDocument/documentSymbol"+someMethodToMethodString (SomeMethod SMethod_TextDocumentCodeAction) = "textDocument/codeAction"+someMethodToMethodString (SomeMethod SMethod_CodeActionResolve) = "codeAction/resolve"+someMethodToMethodString (SomeMethod SMethod_WorkspaceSymbol) = "workspace/symbol"+someMethodToMethodString (SomeMethod SMethod_WorkspaceSymbolResolve) = "workspaceSymbol/resolve"+someMethodToMethodString (SomeMethod SMethod_TextDocumentCodeLens) = "textDocument/codeLens"+someMethodToMethodString (SomeMethod SMethod_CodeLensResolve) = "codeLens/resolve"+someMethodToMethodString (SomeMethod SMethod_WorkspaceCodeLensRefresh) = "workspace/codeLens/refresh"+someMethodToMethodString (SomeMethod SMethod_TextDocumentDocumentLink) = "textDocument/documentLink"+someMethodToMethodString (SomeMethod SMethod_DocumentLinkResolve) = "documentLink/resolve"+someMethodToMethodString (SomeMethod SMethod_TextDocumentFormatting) = "textDocument/formatting"+someMethodToMethodString (SomeMethod SMethod_TextDocumentRangeFormatting) = "textDocument/rangeFormatting"+someMethodToMethodString (SomeMethod SMethod_TextDocumentOnTypeFormatting) = "textDocument/onTypeFormatting"+someMethodToMethodString (SomeMethod SMethod_TextDocumentRename) = "textDocument/rename"+someMethodToMethodString (SomeMethod SMethod_TextDocumentPrepareRename) = "textDocument/prepareRename"+someMethodToMethodString (SomeMethod SMethod_WorkspaceExecuteCommand) = "workspace/executeCommand"+someMethodToMethodString (SomeMethod SMethod_WorkspaceApplyEdit) = "workspace/applyEdit"+someMethodToMethodString (SomeMethod SMethod_WorkspaceDidChangeWorkspaceFolders) = "workspace/didChangeWorkspaceFolders"+someMethodToMethodString (SomeMethod SMethod_WindowWorkDoneProgressCancel) = "window/workDoneProgress/cancel"+someMethodToMethodString (SomeMethod SMethod_WorkspaceDidCreateFiles) = "workspace/didCreateFiles"+someMethodToMethodString (SomeMethod SMethod_WorkspaceDidRenameFiles) = "workspace/didRenameFiles"+someMethodToMethodString (SomeMethod SMethod_WorkspaceDidDeleteFiles) = "workspace/didDeleteFiles"+someMethodToMethodString (SomeMethod SMethod_NotebookDocumentDidOpen) = "notebookDocument/didOpen"+someMethodToMethodString (SomeMethod SMethod_NotebookDocumentDidChange) = "notebookDocument/didChange"+someMethodToMethodString (SomeMethod SMethod_NotebookDocumentDidSave) = "notebookDocument/didSave"+someMethodToMethodString (SomeMethod SMethod_NotebookDocumentDidClose) = "notebookDocument/didClose"+someMethodToMethodString (SomeMethod SMethod_Initialized) = "initialized"+someMethodToMethodString (SomeMethod SMethod_Exit) = "exit"+someMethodToMethodString (SomeMethod SMethod_WorkspaceDidChangeConfiguration) = "workspace/didChangeConfiguration"+someMethodToMethodString (SomeMethod SMethod_WindowShowMessage) = "window/showMessage"+someMethodToMethodString (SomeMethod SMethod_WindowLogMessage) = "window/logMessage"+someMethodToMethodString (SomeMethod SMethod_TelemetryEvent) = "telemetry/event"+someMethodToMethodString (SomeMethod SMethod_TextDocumentDidOpen) = "textDocument/didOpen"+someMethodToMethodString (SomeMethod SMethod_TextDocumentDidChange) = "textDocument/didChange"+someMethodToMethodString (SomeMethod SMethod_TextDocumentDidClose) = "textDocument/didClose"+someMethodToMethodString (SomeMethod SMethod_TextDocumentDidSave) = "textDocument/didSave"+someMethodToMethodString (SomeMethod SMethod_TextDocumentWillSave) = "textDocument/willSave"+someMethodToMethodString (SomeMethod SMethod_WorkspaceDidChangeWatchedFiles) = "workspace/didChangeWatchedFiles"+someMethodToMethodString (SomeMethod SMethod_TextDocumentPublishDiagnostics) = "textDocument/publishDiagnostics"+someMethodToMethodString (SomeMethod SMethod_SetTrace) = "$/setTrace"+someMethodToMethodString (SomeMethod SMethod_LogTrace) = "$/logTrace"+someMethodToMethodString (SomeMethod SMethod_CancelRequest) = "$/cancelRequest"+someMethodToMethodString (SomeMethod SMethod_Progress) = "$/progress"+someMethodToMethodString (SomeMethod (SMethod_CustomMethod v)) = GHC.TypeLits.symbolVal v++-- | Turn a LSP method string into a 'SomeMethod'.+methodStringToSomeMethod :: String -> SomeMethod+methodStringToSomeMethod "textDocument/implementation" = SomeMethod SMethod_TextDocumentImplementation+methodStringToSomeMethod "textDocument/typeDefinition" = SomeMethod SMethod_TextDocumentTypeDefinition+methodStringToSomeMethod "workspace/workspaceFolders" = SomeMethod SMethod_WorkspaceWorkspaceFolders+methodStringToSomeMethod "workspace/configuration" = SomeMethod SMethod_WorkspaceConfiguration+methodStringToSomeMethod "textDocument/documentColor" = SomeMethod SMethod_TextDocumentDocumentColor+methodStringToSomeMethod "textDocument/colorPresentation" = SomeMethod SMethod_TextDocumentColorPresentation+methodStringToSomeMethod "textDocument/foldingRange" = SomeMethod SMethod_TextDocumentFoldingRange+methodStringToSomeMethod "textDocument/declaration" = SomeMethod SMethod_TextDocumentDeclaration+methodStringToSomeMethod "textDocument/selectionRange" = SomeMethod SMethod_TextDocumentSelectionRange+methodStringToSomeMethod "window/workDoneProgress/create" = SomeMethod SMethod_WindowWorkDoneProgressCreate+methodStringToSomeMethod "textDocument/prepareCallHierarchy" = SomeMethod SMethod_TextDocumentPrepareCallHierarchy+methodStringToSomeMethod "callHierarchy/incomingCalls" = SomeMethod SMethod_CallHierarchyIncomingCalls+methodStringToSomeMethod "callHierarchy/outgoingCalls" = SomeMethod SMethod_CallHierarchyOutgoingCalls+methodStringToSomeMethod "textDocument/semanticTokens/full" = SomeMethod SMethod_TextDocumentSemanticTokensFull+methodStringToSomeMethod "textDocument/semanticTokens/full/delta" = SomeMethod SMethod_TextDocumentSemanticTokensFullDelta+methodStringToSomeMethod "textDocument/semanticTokens/range" = SomeMethod SMethod_TextDocumentSemanticTokensRange+methodStringToSomeMethod "workspace/semanticTokens/refresh" = SomeMethod SMethod_WorkspaceSemanticTokensRefresh+methodStringToSomeMethod "window/showDocument" = SomeMethod SMethod_WindowShowDocument+methodStringToSomeMethod "textDocument/linkedEditingRange" = SomeMethod SMethod_TextDocumentLinkedEditingRange+methodStringToSomeMethod "workspace/willCreateFiles" = SomeMethod SMethod_WorkspaceWillCreateFiles+methodStringToSomeMethod "workspace/willRenameFiles" = SomeMethod SMethod_WorkspaceWillRenameFiles+methodStringToSomeMethod "workspace/willDeleteFiles" = SomeMethod SMethod_WorkspaceWillDeleteFiles+methodStringToSomeMethod "textDocument/moniker" = SomeMethod SMethod_TextDocumentMoniker+methodStringToSomeMethod "textDocument/prepareTypeHierarchy" = SomeMethod SMethod_TextDocumentPrepareTypeHierarchy+methodStringToSomeMethod "typeHierarchy/supertypes" = SomeMethod SMethod_TypeHierarchySupertypes+methodStringToSomeMethod "typeHierarchy/subtypes" = SomeMethod SMethod_TypeHierarchySubtypes+methodStringToSomeMethod "textDocument/inlineValue" = SomeMethod SMethod_TextDocumentInlineValue+methodStringToSomeMethod "workspace/inlineValue/refresh" = SomeMethod SMethod_WorkspaceInlineValueRefresh+methodStringToSomeMethod "textDocument/inlayHint" = SomeMethod SMethod_TextDocumentInlayHint+methodStringToSomeMethod "inlayHint/resolve" = SomeMethod SMethod_InlayHintResolve+methodStringToSomeMethod "workspace/inlayHint/refresh" = SomeMethod SMethod_WorkspaceInlayHintRefresh+methodStringToSomeMethod "textDocument/diagnostic" = SomeMethod SMethod_TextDocumentDiagnostic+methodStringToSomeMethod "workspace/diagnostic" = SomeMethod SMethod_WorkspaceDiagnostic+methodStringToSomeMethod "workspace/diagnostic/refresh" = SomeMethod SMethod_WorkspaceDiagnosticRefresh+methodStringToSomeMethod "client/registerCapability" = SomeMethod SMethod_ClientRegisterCapability+methodStringToSomeMethod "client/unregisterCapability" = SomeMethod SMethod_ClientUnregisterCapability+methodStringToSomeMethod "initialize" = SomeMethod SMethod_Initialize+methodStringToSomeMethod "shutdown" = SomeMethod SMethod_Shutdown+methodStringToSomeMethod "window/showMessageRequest" = SomeMethod SMethod_WindowShowMessageRequest+methodStringToSomeMethod "textDocument/willSaveWaitUntil" = SomeMethod SMethod_TextDocumentWillSaveWaitUntil+methodStringToSomeMethod "textDocument/completion" = SomeMethod SMethod_TextDocumentCompletion+methodStringToSomeMethod "completionItem/resolve" = SomeMethod SMethod_CompletionItemResolve+methodStringToSomeMethod "textDocument/hover" = SomeMethod SMethod_TextDocumentHover+methodStringToSomeMethod "textDocument/signatureHelp" = SomeMethod SMethod_TextDocumentSignatureHelp+methodStringToSomeMethod "textDocument/definition" = SomeMethod SMethod_TextDocumentDefinition+methodStringToSomeMethod "textDocument/references" = SomeMethod SMethod_TextDocumentReferences+methodStringToSomeMethod "textDocument/documentHighlight" = SomeMethod SMethod_TextDocumentDocumentHighlight+methodStringToSomeMethod "textDocument/documentSymbol" = SomeMethod SMethod_TextDocumentDocumentSymbol+methodStringToSomeMethod "textDocument/codeAction" = SomeMethod SMethod_TextDocumentCodeAction+methodStringToSomeMethod "codeAction/resolve" = SomeMethod SMethod_CodeActionResolve+methodStringToSomeMethod "workspace/symbol" = SomeMethod SMethod_WorkspaceSymbol+methodStringToSomeMethod "workspaceSymbol/resolve" = SomeMethod SMethod_WorkspaceSymbolResolve+methodStringToSomeMethod "textDocument/codeLens" = SomeMethod SMethod_TextDocumentCodeLens+methodStringToSomeMethod "codeLens/resolve" = SomeMethod SMethod_CodeLensResolve+methodStringToSomeMethod "workspace/codeLens/refresh" = SomeMethod SMethod_WorkspaceCodeLensRefresh+methodStringToSomeMethod "textDocument/documentLink" = SomeMethod SMethod_TextDocumentDocumentLink+methodStringToSomeMethod "documentLink/resolve" = SomeMethod SMethod_DocumentLinkResolve+methodStringToSomeMethod "textDocument/formatting" = SomeMethod SMethod_TextDocumentFormatting+methodStringToSomeMethod "textDocument/rangeFormatting" = SomeMethod SMethod_TextDocumentRangeFormatting+methodStringToSomeMethod "textDocument/onTypeFormatting" = SomeMethod SMethod_TextDocumentOnTypeFormatting+methodStringToSomeMethod "textDocument/rename" = SomeMethod SMethod_TextDocumentRename+methodStringToSomeMethod "textDocument/prepareRename" = SomeMethod SMethod_TextDocumentPrepareRename+methodStringToSomeMethod "workspace/executeCommand" = SomeMethod SMethod_WorkspaceExecuteCommand+methodStringToSomeMethod "workspace/applyEdit" = SomeMethod SMethod_WorkspaceApplyEdit+methodStringToSomeMethod "workspace/didChangeWorkspaceFolders" = SomeMethod SMethod_WorkspaceDidChangeWorkspaceFolders+methodStringToSomeMethod "window/workDoneProgress/cancel" = SomeMethod SMethod_WindowWorkDoneProgressCancel+methodStringToSomeMethod "workspace/didCreateFiles" = SomeMethod SMethod_WorkspaceDidCreateFiles+methodStringToSomeMethod "workspace/didRenameFiles" = SomeMethod SMethod_WorkspaceDidRenameFiles+methodStringToSomeMethod "workspace/didDeleteFiles" = SomeMethod SMethod_WorkspaceDidDeleteFiles+methodStringToSomeMethod "notebookDocument/didOpen" = SomeMethod SMethod_NotebookDocumentDidOpen+methodStringToSomeMethod "notebookDocument/didChange" = SomeMethod SMethod_NotebookDocumentDidChange+methodStringToSomeMethod "notebookDocument/didSave" = SomeMethod SMethod_NotebookDocumentDidSave+methodStringToSomeMethod "notebookDocument/didClose" = SomeMethod SMethod_NotebookDocumentDidClose+methodStringToSomeMethod "initialized" = SomeMethod SMethod_Initialized+methodStringToSomeMethod "exit" = SomeMethod SMethod_Exit+methodStringToSomeMethod "workspace/didChangeConfiguration" = SomeMethod SMethod_WorkspaceDidChangeConfiguration+methodStringToSomeMethod "window/showMessage" = SomeMethod SMethod_WindowShowMessage+methodStringToSomeMethod "window/logMessage" = SomeMethod SMethod_WindowLogMessage+methodStringToSomeMethod "telemetry/event" = SomeMethod SMethod_TelemetryEvent+methodStringToSomeMethod "textDocument/didOpen" = SomeMethod SMethod_TextDocumentDidOpen+methodStringToSomeMethod "textDocument/didChange" = SomeMethod SMethod_TextDocumentDidChange+methodStringToSomeMethod "textDocument/didClose" = SomeMethod SMethod_TextDocumentDidClose+methodStringToSomeMethod "textDocument/didSave" = SomeMethod SMethod_TextDocumentDidSave+methodStringToSomeMethod "textDocument/willSave" = SomeMethod SMethod_TextDocumentWillSave+methodStringToSomeMethod "workspace/didChangeWatchedFiles" = SomeMethod SMethod_WorkspaceDidChangeWatchedFiles+methodStringToSomeMethod "textDocument/publishDiagnostics" = SomeMethod SMethod_TextDocumentPublishDiagnostics+methodStringToSomeMethod "$/setTrace" = SomeMethod SMethod_SetTrace+methodStringToSomeMethod "$/logTrace" = SomeMethod SMethod_LogTrace+methodStringToSomeMethod "$/cancelRequest" = SomeMethod SMethod_CancelRequest+methodStringToSomeMethod "$/progress" = SomeMethod SMethod_Progress+methodStringToSomeMethod v = case GHC.TypeLits.someSymbolVal v of { GHC.TypeLits.SomeSymbol p -> SomeMethod (SMethod_CustomMethod p) ; }++-- | Get a singleton witness for the message direction of a 'SMethod'.+messageDirection :: forall f t (m :: Method f t) . SMethod m -> MM.SMessageDirection f+messageDirection SMethod_TextDocumentImplementation = MM.SClientToServer+messageDirection SMethod_TextDocumentTypeDefinition = MM.SClientToServer+messageDirection SMethod_WorkspaceWorkspaceFolders = MM.SServerToClient+messageDirection SMethod_WorkspaceConfiguration = MM.SServerToClient+messageDirection SMethod_TextDocumentDocumentColor = MM.SClientToServer+messageDirection SMethod_TextDocumentColorPresentation = MM.SClientToServer+messageDirection SMethod_TextDocumentFoldingRange = MM.SClientToServer+messageDirection SMethod_TextDocumentDeclaration = MM.SClientToServer+messageDirection SMethod_TextDocumentSelectionRange = MM.SClientToServer+messageDirection SMethod_WindowWorkDoneProgressCreate = MM.SServerToClient+messageDirection SMethod_TextDocumentPrepareCallHierarchy = MM.SClientToServer+messageDirection SMethod_CallHierarchyIncomingCalls = MM.SClientToServer+messageDirection SMethod_CallHierarchyOutgoingCalls = MM.SClientToServer+messageDirection SMethod_TextDocumentSemanticTokensFull = MM.SClientToServer+messageDirection SMethod_TextDocumentSemanticTokensFullDelta = MM.SClientToServer+messageDirection SMethod_TextDocumentSemanticTokensRange = MM.SClientToServer+messageDirection SMethod_WorkspaceSemanticTokensRefresh = MM.SServerToClient+messageDirection SMethod_WindowShowDocument = MM.SServerToClient+messageDirection SMethod_TextDocumentLinkedEditingRange = MM.SClientToServer+messageDirection SMethod_WorkspaceWillCreateFiles = MM.SClientToServer+messageDirection SMethod_WorkspaceWillRenameFiles = MM.SClientToServer+messageDirection SMethod_WorkspaceWillDeleteFiles = MM.SClientToServer+messageDirection SMethod_TextDocumentMoniker = MM.SClientToServer+messageDirection SMethod_TextDocumentPrepareTypeHierarchy = MM.SClientToServer+messageDirection SMethod_TypeHierarchySupertypes = MM.SClientToServer+messageDirection SMethod_TypeHierarchySubtypes = MM.SClientToServer+messageDirection SMethod_TextDocumentInlineValue = MM.SClientToServer+messageDirection SMethod_WorkspaceInlineValueRefresh = MM.SServerToClient+messageDirection SMethod_TextDocumentInlayHint = MM.SClientToServer+messageDirection SMethod_InlayHintResolve = MM.SClientToServer+messageDirection SMethod_WorkspaceInlayHintRefresh = MM.SServerToClient+messageDirection SMethod_TextDocumentDiagnostic = MM.SClientToServer+messageDirection SMethod_WorkspaceDiagnostic = MM.SClientToServer+messageDirection SMethod_WorkspaceDiagnosticRefresh = MM.SServerToClient+messageDirection SMethod_ClientRegisterCapability = MM.SServerToClient+messageDirection SMethod_ClientUnregisterCapability = MM.SServerToClient+messageDirection SMethod_Initialize = MM.SClientToServer+messageDirection SMethod_Shutdown = MM.SClientToServer+messageDirection SMethod_WindowShowMessageRequest = MM.SServerToClient+messageDirection SMethod_TextDocumentWillSaveWaitUntil = MM.SClientToServer+messageDirection SMethod_TextDocumentCompletion = MM.SClientToServer+messageDirection SMethod_CompletionItemResolve = MM.SClientToServer+messageDirection SMethod_TextDocumentHover = MM.SClientToServer+messageDirection SMethod_TextDocumentSignatureHelp = MM.SClientToServer+messageDirection SMethod_TextDocumentDefinition = MM.SClientToServer+messageDirection SMethod_TextDocumentReferences = MM.SClientToServer+messageDirection SMethod_TextDocumentDocumentHighlight = MM.SClientToServer+messageDirection SMethod_TextDocumentDocumentSymbol = MM.SClientToServer+messageDirection SMethod_TextDocumentCodeAction = MM.SClientToServer+messageDirection SMethod_CodeActionResolve = MM.SClientToServer+messageDirection SMethod_WorkspaceSymbol = MM.SClientToServer+messageDirection SMethod_WorkspaceSymbolResolve = MM.SClientToServer+messageDirection SMethod_TextDocumentCodeLens = MM.SClientToServer+messageDirection SMethod_CodeLensResolve = MM.SClientToServer+messageDirection SMethod_WorkspaceCodeLensRefresh = MM.SServerToClient+messageDirection SMethod_TextDocumentDocumentLink = MM.SClientToServer+messageDirection SMethod_DocumentLinkResolve = MM.SClientToServer+messageDirection SMethod_TextDocumentFormatting = MM.SClientToServer+messageDirection SMethod_TextDocumentRangeFormatting = MM.SClientToServer+messageDirection SMethod_TextDocumentOnTypeFormatting = MM.SClientToServer+messageDirection SMethod_TextDocumentRename = MM.SClientToServer+messageDirection SMethod_TextDocumentPrepareRename = MM.SClientToServer+messageDirection SMethod_WorkspaceExecuteCommand = MM.SClientToServer+messageDirection SMethod_WorkspaceApplyEdit = MM.SServerToClient+messageDirection SMethod_WorkspaceDidChangeWorkspaceFolders = MM.SClientToServer+messageDirection SMethod_WindowWorkDoneProgressCancel = MM.SClientToServer+messageDirection SMethod_WorkspaceDidCreateFiles = MM.SClientToServer+messageDirection SMethod_WorkspaceDidRenameFiles = MM.SClientToServer+messageDirection SMethod_WorkspaceDidDeleteFiles = MM.SClientToServer+messageDirection SMethod_NotebookDocumentDidOpen = MM.SClientToServer+messageDirection SMethod_NotebookDocumentDidChange = MM.SClientToServer+messageDirection SMethod_NotebookDocumentDidSave = MM.SClientToServer+messageDirection SMethod_NotebookDocumentDidClose = MM.SClientToServer+messageDirection SMethod_Initialized = MM.SClientToServer+messageDirection SMethod_Exit = MM.SClientToServer+messageDirection SMethod_WorkspaceDidChangeConfiguration = MM.SClientToServer+messageDirection SMethod_WindowShowMessage = MM.SServerToClient+messageDirection SMethod_WindowLogMessage = MM.SServerToClient+messageDirection SMethod_TelemetryEvent = MM.SServerToClient+messageDirection SMethod_TextDocumentDidOpen = MM.SClientToServer+messageDirection SMethod_TextDocumentDidChange = MM.SClientToServer+messageDirection SMethod_TextDocumentDidClose = MM.SClientToServer+messageDirection SMethod_TextDocumentDidSave = MM.SClientToServer+messageDirection SMethod_TextDocumentWillSave = MM.SClientToServer+messageDirection SMethod_WorkspaceDidChangeWatchedFiles = MM.SClientToServer+messageDirection SMethod_TextDocumentPublishDiagnostics = MM.SServerToClient+messageDirection SMethod_SetTrace = MM.SClientToServer+messageDirection SMethod_LogTrace = MM.SServerToClient+messageDirection SMethod_CancelRequest = MM.SBothDirections+messageDirection SMethod_Progress = MM.SBothDirections+messageDirection (SMethod_CustomMethod _) = MM.SBothDirections++-- | Get a singleton witness for the message kind of a 'SMethod'.+messageKind :: forall f t (m :: Method f t) . SMethod m -> MM.SMessageKind t+messageKind SMethod_TextDocumentImplementation = MM.SRequest+messageKind SMethod_TextDocumentTypeDefinition = MM.SRequest+messageKind SMethod_WorkspaceWorkspaceFolders = MM.SRequest+messageKind SMethod_WorkspaceConfiguration = MM.SRequest+messageKind SMethod_TextDocumentDocumentColor = MM.SRequest+messageKind SMethod_TextDocumentColorPresentation = MM.SRequest+messageKind SMethod_TextDocumentFoldingRange = MM.SRequest+messageKind SMethod_TextDocumentDeclaration = MM.SRequest+messageKind SMethod_TextDocumentSelectionRange = MM.SRequest+messageKind SMethod_WindowWorkDoneProgressCreate = MM.SRequest+messageKind SMethod_TextDocumentPrepareCallHierarchy = MM.SRequest+messageKind SMethod_CallHierarchyIncomingCalls = MM.SRequest+messageKind SMethod_CallHierarchyOutgoingCalls = MM.SRequest+messageKind SMethod_TextDocumentSemanticTokensFull = MM.SRequest+messageKind SMethod_TextDocumentSemanticTokensFullDelta = MM.SRequest+messageKind SMethod_TextDocumentSemanticTokensRange = MM.SRequest+messageKind SMethod_WorkspaceSemanticTokensRefresh = MM.SRequest+messageKind SMethod_WindowShowDocument = MM.SRequest+messageKind SMethod_TextDocumentLinkedEditingRange = MM.SRequest+messageKind SMethod_WorkspaceWillCreateFiles = MM.SRequest+messageKind SMethod_WorkspaceWillRenameFiles = MM.SRequest+messageKind SMethod_WorkspaceWillDeleteFiles = MM.SRequest+messageKind SMethod_TextDocumentMoniker = MM.SRequest+messageKind SMethod_TextDocumentPrepareTypeHierarchy = MM.SRequest+messageKind SMethod_TypeHierarchySupertypes = MM.SRequest+messageKind SMethod_TypeHierarchySubtypes = MM.SRequest+messageKind SMethod_TextDocumentInlineValue = MM.SRequest+messageKind SMethod_WorkspaceInlineValueRefresh = MM.SRequest+messageKind SMethod_TextDocumentInlayHint = MM.SRequest+messageKind SMethod_InlayHintResolve = MM.SRequest+messageKind SMethod_WorkspaceInlayHintRefresh = MM.SRequest+messageKind SMethod_TextDocumentDiagnostic = MM.SRequest+messageKind SMethod_WorkspaceDiagnostic = MM.SRequest+messageKind SMethod_WorkspaceDiagnosticRefresh = MM.SRequest+messageKind SMethod_ClientRegisterCapability = MM.SRequest+messageKind SMethod_ClientUnregisterCapability = MM.SRequest+messageKind SMethod_Initialize = MM.SRequest+messageKind SMethod_Shutdown = MM.SRequest+messageKind SMethod_WindowShowMessageRequest = MM.SRequest+messageKind SMethod_TextDocumentWillSaveWaitUntil = MM.SRequest+messageKind SMethod_TextDocumentCompletion = MM.SRequest+messageKind SMethod_CompletionItemResolve = MM.SRequest+messageKind SMethod_TextDocumentHover = MM.SRequest+messageKind SMethod_TextDocumentSignatureHelp = MM.SRequest+messageKind SMethod_TextDocumentDefinition = MM.SRequest+messageKind SMethod_TextDocumentReferences = MM.SRequest+messageKind SMethod_TextDocumentDocumentHighlight = MM.SRequest+messageKind SMethod_TextDocumentDocumentSymbol = MM.SRequest+messageKind SMethod_TextDocumentCodeAction = MM.SRequest+messageKind SMethod_CodeActionResolve = MM.SRequest+messageKind SMethod_WorkspaceSymbol = MM.SRequest+messageKind SMethod_WorkspaceSymbolResolve = MM.SRequest+messageKind SMethod_TextDocumentCodeLens = MM.SRequest+messageKind SMethod_CodeLensResolve = MM.SRequest+messageKind SMethod_WorkspaceCodeLensRefresh = MM.SRequest+messageKind SMethod_TextDocumentDocumentLink = MM.SRequest+messageKind SMethod_DocumentLinkResolve = MM.SRequest+messageKind SMethod_TextDocumentFormatting = MM.SRequest+messageKind SMethod_TextDocumentRangeFormatting = MM.SRequest+messageKind SMethod_TextDocumentOnTypeFormatting = MM.SRequest+messageKind SMethod_TextDocumentRename = MM.SRequest+messageKind SMethod_TextDocumentPrepareRename = MM.SRequest+messageKind SMethod_WorkspaceExecuteCommand = MM.SRequest+messageKind SMethod_WorkspaceApplyEdit = MM.SRequest+messageKind SMethod_WorkspaceDidChangeWorkspaceFolders = MM.SNotification+messageKind SMethod_WindowWorkDoneProgressCancel = MM.SNotification+messageKind SMethod_WorkspaceDidCreateFiles = MM.SNotification+messageKind SMethod_WorkspaceDidRenameFiles = MM.SNotification+messageKind SMethod_WorkspaceDidDeleteFiles = MM.SNotification+messageKind SMethod_NotebookDocumentDidOpen = MM.SNotification+messageKind SMethod_NotebookDocumentDidChange = MM.SNotification+messageKind SMethod_NotebookDocumentDidSave = MM.SNotification+messageKind SMethod_NotebookDocumentDidClose = MM.SNotification+messageKind SMethod_Initialized = MM.SNotification+messageKind SMethod_Exit = MM.SNotification+messageKind SMethod_WorkspaceDidChangeConfiguration = MM.SNotification+messageKind SMethod_WindowShowMessage = MM.SNotification+messageKind SMethod_WindowLogMessage = MM.SNotification+messageKind SMethod_TelemetryEvent = MM.SNotification+messageKind SMethod_TextDocumentDidOpen = MM.SNotification+messageKind SMethod_TextDocumentDidChange = MM.SNotification+messageKind SMethod_TextDocumentDidClose = MM.SNotification+messageKind SMethod_TextDocumentDidSave = MM.SNotification+messageKind SMethod_TextDocumentWillSave = MM.SNotification+messageKind SMethod_WorkspaceDidChangeWatchedFiles = MM.SNotification+messageKind SMethod_TextDocumentPublishDiagnostics = MM.SNotification+messageKind SMethod_SetTrace = MM.SNotification+messageKind SMethod_LogTrace = MM.SNotification+messageKind SMethod_CancelRequest = MM.SNotification+messageKind SMethod_Progress = MM.SNotification+messageKind (SMethod_CustomMethod _) = MM.SBothTypes
+ generated/Language/LSP/Protocol/Internal/Types.hs view
@@ -0,0 +1,376 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types (module Export) where++import Language.LSP.Protocol.Internal.Types.AnnotatedTextEdit as Export+import Language.LSP.Protocol.Internal.Types.ApplyWorkspaceEditParams as Export+import Language.LSP.Protocol.Internal.Types.ApplyWorkspaceEditResult as Export+import Language.LSP.Protocol.Internal.Types.BaseSymbolInformation as Export+import Language.LSP.Protocol.Internal.Types.CallHierarchyClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.CallHierarchyIncomingCall as Export+import Language.LSP.Protocol.Internal.Types.CallHierarchyIncomingCallsParams as Export+import Language.LSP.Protocol.Internal.Types.CallHierarchyItem as Export+import Language.LSP.Protocol.Internal.Types.CallHierarchyOptions as Export+import Language.LSP.Protocol.Internal.Types.CallHierarchyOutgoingCall as Export+import Language.LSP.Protocol.Internal.Types.CallHierarchyOutgoingCallsParams as Export+import Language.LSP.Protocol.Internal.Types.CallHierarchyPrepareParams as Export+import Language.LSP.Protocol.Internal.Types.CallHierarchyRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.CancelParams as Export+import Language.LSP.Protocol.Internal.Types.ChangeAnnotation as Export+import Language.LSP.Protocol.Internal.Types.ChangeAnnotationIdentifier as Export+import Language.LSP.Protocol.Internal.Types.ClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.CodeAction as Export+import Language.LSP.Protocol.Internal.Types.CodeActionClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.CodeActionContext as Export+import Language.LSP.Protocol.Internal.Types.CodeActionKind as Export+import Language.LSP.Protocol.Internal.Types.CodeActionOptions as Export+import Language.LSP.Protocol.Internal.Types.CodeActionParams as Export+import Language.LSP.Protocol.Internal.Types.CodeActionRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.CodeActionTriggerKind as Export+import Language.LSP.Protocol.Internal.Types.CodeDescription as Export+import Language.LSP.Protocol.Internal.Types.CodeLens as Export+import Language.LSP.Protocol.Internal.Types.CodeLensClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.CodeLensOptions as Export+import Language.LSP.Protocol.Internal.Types.CodeLensParams as Export+import Language.LSP.Protocol.Internal.Types.CodeLensRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.CodeLensWorkspaceClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.Color as Export+import Language.LSP.Protocol.Internal.Types.ColorInformation as Export+import Language.LSP.Protocol.Internal.Types.ColorPresentation as Export+import Language.LSP.Protocol.Internal.Types.ColorPresentationParams as Export+import Language.LSP.Protocol.Internal.Types.Command as Export+import Language.LSP.Protocol.Internal.Types.CompletionClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.CompletionContext as Export+import Language.LSP.Protocol.Internal.Types.CompletionItem as Export+import Language.LSP.Protocol.Internal.Types.CompletionItemKind as Export+import Language.LSP.Protocol.Internal.Types.CompletionItemLabelDetails as Export+import Language.LSP.Protocol.Internal.Types.CompletionItemTag as Export+import Language.LSP.Protocol.Internal.Types.CompletionList as Export+import Language.LSP.Protocol.Internal.Types.CompletionOptions as Export+import Language.LSP.Protocol.Internal.Types.CompletionParams as Export+import Language.LSP.Protocol.Internal.Types.CompletionRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.CompletionTriggerKind as Export+import Language.LSP.Protocol.Internal.Types.ConfigurationItem as Export+import Language.LSP.Protocol.Internal.Types.ConfigurationParams as Export+import Language.LSP.Protocol.Internal.Types.CreateFile as Export+import Language.LSP.Protocol.Internal.Types.CreateFileOptions as Export+import Language.LSP.Protocol.Internal.Types.CreateFilesParams as Export+import Language.LSP.Protocol.Internal.Types.Declaration as Export+import Language.LSP.Protocol.Internal.Types.DeclarationClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.DeclarationLink as Export+import Language.LSP.Protocol.Internal.Types.DeclarationOptions as Export+import Language.LSP.Protocol.Internal.Types.DeclarationParams as Export+import Language.LSP.Protocol.Internal.Types.DeclarationRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.Definition as Export+import Language.LSP.Protocol.Internal.Types.DefinitionClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.DefinitionLink as Export+import Language.LSP.Protocol.Internal.Types.DefinitionOptions as Export+import Language.LSP.Protocol.Internal.Types.DefinitionParams as Export+import Language.LSP.Protocol.Internal.Types.DefinitionRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.DeleteFile as Export+import Language.LSP.Protocol.Internal.Types.DeleteFileOptions as Export+import Language.LSP.Protocol.Internal.Types.DeleteFilesParams as Export+import Language.LSP.Protocol.Internal.Types.Diagnostic as Export+import Language.LSP.Protocol.Internal.Types.DiagnosticClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.DiagnosticOptions as Export+import Language.LSP.Protocol.Internal.Types.DiagnosticRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.DiagnosticRelatedInformation as Export+import Language.LSP.Protocol.Internal.Types.DiagnosticServerCancellationData as Export+import Language.LSP.Protocol.Internal.Types.DiagnosticSeverity as Export+import Language.LSP.Protocol.Internal.Types.DiagnosticTag as Export+import Language.LSP.Protocol.Internal.Types.DiagnosticWorkspaceClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.DidChangeConfigurationClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.DidChangeConfigurationParams as Export+import Language.LSP.Protocol.Internal.Types.DidChangeConfigurationRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.DidChangeNotebookDocumentParams as Export+import Language.LSP.Protocol.Internal.Types.DidChangeTextDocumentParams as Export+import Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesParams as Export+import Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.DidChangeWorkspaceFoldersParams as Export+import Language.LSP.Protocol.Internal.Types.DidCloseNotebookDocumentParams as Export+import Language.LSP.Protocol.Internal.Types.DidCloseTextDocumentParams as Export+import Language.LSP.Protocol.Internal.Types.DidOpenNotebookDocumentParams as Export+import Language.LSP.Protocol.Internal.Types.DidOpenTextDocumentParams as Export+import Language.LSP.Protocol.Internal.Types.DidSaveNotebookDocumentParams as Export+import Language.LSP.Protocol.Internal.Types.DidSaveTextDocumentParams as Export+import Language.LSP.Protocol.Internal.Types.DocumentColorClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.DocumentColorOptions as Export+import Language.LSP.Protocol.Internal.Types.DocumentColorParams as Export+import Language.LSP.Protocol.Internal.Types.DocumentColorRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.DocumentDiagnosticParams as Export+import Language.LSP.Protocol.Internal.Types.DocumentDiagnosticReport as Export+import Language.LSP.Protocol.Internal.Types.DocumentDiagnosticReportKind as Export+import Language.LSP.Protocol.Internal.Types.DocumentDiagnosticReportPartialResult as Export+import Language.LSP.Protocol.Internal.Types.DocumentFilter as Export+import Language.LSP.Protocol.Internal.Types.DocumentFormattingClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.DocumentFormattingOptions as Export+import Language.LSP.Protocol.Internal.Types.DocumentFormattingParams as Export+import Language.LSP.Protocol.Internal.Types.DocumentFormattingRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.DocumentHighlight as Export+import Language.LSP.Protocol.Internal.Types.DocumentHighlightClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.DocumentHighlightKind as Export+import Language.LSP.Protocol.Internal.Types.DocumentHighlightOptions as Export+import Language.LSP.Protocol.Internal.Types.DocumentHighlightParams as Export+import Language.LSP.Protocol.Internal.Types.DocumentHighlightRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.DocumentLink as Export+import Language.LSP.Protocol.Internal.Types.DocumentLinkClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.DocumentLinkOptions as Export+import Language.LSP.Protocol.Internal.Types.DocumentLinkParams as Export+import Language.LSP.Protocol.Internal.Types.DocumentLinkRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingOptions as Export+import Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingParams as Export+import Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingOptions as Export+import Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingParams as Export+import Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.DocumentSelector as Export+import Language.LSP.Protocol.Internal.Types.DocumentSymbol as Export+import Language.LSP.Protocol.Internal.Types.DocumentSymbolClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.DocumentSymbolOptions as Export+import Language.LSP.Protocol.Internal.Types.DocumentSymbolParams as Export+import Language.LSP.Protocol.Internal.Types.DocumentSymbolRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.ErrorCodes as Export+import Language.LSP.Protocol.Internal.Types.ExecuteCommandClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.ExecuteCommandOptions as Export+import Language.LSP.Protocol.Internal.Types.ExecuteCommandParams as Export+import Language.LSP.Protocol.Internal.Types.ExecuteCommandRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.ExecutionSummary as Export+import Language.LSP.Protocol.Internal.Types.FailureHandlingKind as Export+import Language.LSP.Protocol.Internal.Types.FileChangeType as Export+import Language.LSP.Protocol.Internal.Types.FileCreate as Export+import Language.LSP.Protocol.Internal.Types.FileDelete as Export+import Language.LSP.Protocol.Internal.Types.FileEvent as Export+import Language.LSP.Protocol.Internal.Types.FileOperationClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.FileOperationFilter as Export+import Language.LSP.Protocol.Internal.Types.FileOperationOptions as Export+import Language.LSP.Protocol.Internal.Types.FileOperationPattern as Export+import Language.LSP.Protocol.Internal.Types.FileOperationPatternKind as Export+import Language.LSP.Protocol.Internal.Types.FileOperationPatternOptions as Export+import Language.LSP.Protocol.Internal.Types.FileOperationRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.FileRename as Export+import Language.LSP.Protocol.Internal.Types.FileSystemWatcher as Export+import Language.LSP.Protocol.Internal.Types.FoldingRange as Export+import Language.LSP.Protocol.Internal.Types.FoldingRangeClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.FoldingRangeKind as Export+import Language.LSP.Protocol.Internal.Types.FoldingRangeOptions as Export+import Language.LSP.Protocol.Internal.Types.FoldingRangeParams as Export+import Language.LSP.Protocol.Internal.Types.FoldingRangeRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.FormattingOptions as Export+import Language.LSP.Protocol.Internal.Types.FullDocumentDiagnosticReport as Export+import Language.LSP.Protocol.Internal.Types.GeneralClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.GlobPattern as Export+import Language.LSP.Protocol.Internal.Types.Hover as Export+import Language.LSP.Protocol.Internal.Types.HoverClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.HoverOptions as Export+import Language.LSP.Protocol.Internal.Types.HoverParams as Export+import Language.LSP.Protocol.Internal.Types.HoverRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.ImplementationClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.ImplementationOptions as Export+import Language.LSP.Protocol.Internal.Types.ImplementationParams as Export+import Language.LSP.Protocol.Internal.Types.ImplementationRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.InitializeError as Export+import Language.LSP.Protocol.Internal.Types.InitializeParams as Export+import Language.LSP.Protocol.Internal.Types.InitializeResult as Export+import Language.LSP.Protocol.Internal.Types.InitializedParams as Export+import Language.LSP.Protocol.Internal.Types.InlayHint as Export+import Language.LSP.Protocol.Internal.Types.InlayHintClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.InlayHintKind as Export+import Language.LSP.Protocol.Internal.Types.InlayHintLabelPart as Export+import Language.LSP.Protocol.Internal.Types.InlayHintOptions as Export+import Language.LSP.Protocol.Internal.Types.InlayHintParams as Export+import Language.LSP.Protocol.Internal.Types.InlayHintRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.InlayHintWorkspaceClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.InlineValue as Export+import Language.LSP.Protocol.Internal.Types.InlineValueClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.InlineValueContext as Export+import Language.LSP.Protocol.Internal.Types.InlineValueEvaluatableExpression as Export+import Language.LSP.Protocol.Internal.Types.InlineValueOptions as Export+import Language.LSP.Protocol.Internal.Types.InlineValueParams as Export+import Language.LSP.Protocol.Internal.Types.InlineValueRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.InlineValueText as Export+import Language.LSP.Protocol.Internal.Types.InlineValueVariableLookup as Export+import Language.LSP.Protocol.Internal.Types.InlineValueWorkspaceClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.InsertReplaceEdit as Export+import Language.LSP.Protocol.Internal.Types.InsertTextFormat as Export+import Language.LSP.Protocol.Internal.Types.InsertTextMode as Export+import Language.LSP.Protocol.Internal.Types.LSPErrorCodes as Export+import Language.LSP.Protocol.Internal.Types.LinkedEditingRangeClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.LinkedEditingRangeOptions as Export+import Language.LSP.Protocol.Internal.Types.LinkedEditingRangeParams as Export+import Language.LSP.Protocol.Internal.Types.LinkedEditingRangeRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.LinkedEditingRanges as Export+import Language.LSP.Protocol.Internal.Types.Location as Export+import Language.LSP.Protocol.Internal.Types.LocationLink as Export+import Language.LSP.Protocol.Internal.Types.LogMessageParams as Export+import Language.LSP.Protocol.Internal.Types.LogTraceParams as Export+import Language.LSP.Protocol.Internal.Types.MarkdownClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.MarkedString as Export+import Language.LSP.Protocol.Internal.Types.MarkupContent as Export+import Language.LSP.Protocol.Internal.Types.MarkupKind as Export+import Language.LSP.Protocol.Internal.Types.MessageActionItem as Export+import Language.LSP.Protocol.Internal.Types.MessageType as Export+import Language.LSP.Protocol.Internal.Types.Moniker as Export+import Language.LSP.Protocol.Internal.Types.MonikerClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.MonikerKind as Export+import Language.LSP.Protocol.Internal.Types.MonikerOptions as Export+import Language.LSP.Protocol.Internal.Types.MonikerParams as Export+import Language.LSP.Protocol.Internal.Types.MonikerRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.NotebookCell as Export+import Language.LSP.Protocol.Internal.Types.NotebookCellArrayChange as Export+import Language.LSP.Protocol.Internal.Types.NotebookCellKind as Export+import Language.LSP.Protocol.Internal.Types.NotebookCellTextDocumentFilter as Export+import Language.LSP.Protocol.Internal.Types.NotebookDocument as Export+import Language.LSP.Protocol.Internal.Types.NotebookDocumentChangeEvent as Export+import Language.LSP.Protocol.Internal.Types.NotebookDocumentClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.NotebookDocumentFilter as Export+import Language.LSP.Protocol.Internal.Types.NotebookDocumentIdentifier as Export+import Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncOptions as Export+import Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.OptionalVersionedTextDocumentIdentifier as Export+import Language.LSP.Protocol.Internal.Types.ParameterInformation as Export+import Language.LSP.Protocol.Internal.Types.PartialResultParams as Export+import Language.LSP.Protocol.Internal.Types.Pattern as Export+import Language.LSP.Protocol.Internal.Types.Position as Export+import Language.LSP.Protocol.Internal.Types.PositionEncodingKind as Export+import Language.LSP.Protocol.Internal.Types.PrepareRenameParams as Export+import Language.LSP.Protocol.Internal.Types.PrepareRenameResult as Export+import Language.LSP.Protocol.Internal.Types.PrepareSupportDefaultBehavior as Export+import Language.LSP.Protocol.Internal.Types.PreviousResultId as Export+import Language.LSP.Protocol.Internal.Types.ProgressParams as Export+import Language.LSP.Protocol.Internal.Types.ProgressToken as Export+import Language.LSP.Protocol.Internal.Types.PublishDiagnosticsClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.PublishDiagnosticsParams as Export+import Language.LSP.Protocol.Internal.Types.Range as Export+import Language.LSP.Protocol.Internal.Types.ReferenceClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.ReferenceContext as Export+import Language.LSP.Protocol.Internal.Types.ReferenceOptions as Export+import Language.LSP.Protocol.Internal.Types.ReferenceParams as Export+import Language.LSP.Protocol.Internal.Types.ReferenceRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.Registration as Export+import Language.LSP.Protocol.Internal.Types.RegistrationParams as Export+import Language.LSP.Protocol.Internal.Types.RegularExpressionsClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.RelatedFullDocumentDiagnosticReport as Export+import Language.LSP.Protocol.Internal.Types.RelatedUnchangedDocumentDiagnosticReport as Export+import Language.LSP.Protocol.Internal.Types.RelativePattern as Export+import Language.LSP.Protocol.Internal.Types.RenameClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.RenameFile as Export+import Language.LSP.Protocol.Internal.Types.RenameFileOptions as Export+import Language.LSP.Protocol.Internal.Types.RenameFilesParams as Export+import Language.LSP.Protocol.Internal.Types.RenameOptions as Export+import Language.LSP.Protocol.Internal.Types.RenameParams as Export+import Language.LSP.Protocol.Internal.Types.RenameRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.ResourceOperation as Export+import Language.LSP.Protocol.Internal.Types.ResourceOperationKind as Export+import Language.LSP.Protocol.Internal.Types.SaveOptions as Export+import Language.LSP.Protocol.Internal.Types.SelectionRange as Export+import Language.LSP.Protocol.Internal.Types.SelectionRangeClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.SelectionRangeOptions as Export+import Language.LSP.Protocol.Internal.Types.SelectionRangeParams as Export+import Language.LSP.Protocol.Internal.Types.SelectionRangeRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.SemanticTokenModifiers as Export+import Language.LSP.Protocol.Internal.Types.SemanticTokenTypes as Export+import Language.LSP.Protocol.Internal.Types.SemanticTokens as Export+import Language.LSP.Protocol.Internal.Types.SemanticTokensClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.SemanticTokensDelta as Export+import Language.LSP.Protocol.Internal.Types.SemanticTokensDeltaParams as Export+import Language.LSP.Protocol.Internal.Types.SemanticTokensDeltaPartialResult as Export+import Language.LSP.Protocol.Internal.Types.SemanticTokensEdit as Export+import Language.LSP.Protocol.Internal.Types.SemanticTokensLegend as Export+import Language.LSP.Protocol.Internal.Types.SemanticTokensOptions as Export+import Language.LSP.Protocol.Internal.Types.SemanticTokensParams as Export+import Language.LSP.Protocol.Internal.Types.SemanticTokensPartialResult as Export+import Language.LSP.Protocol.Internal.Types.SemanticTokensRangeParams as Export+import Language.LSP.Protocol.Internal.Types.SemanticTokensRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.SemanticTokensWorkspaceClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.ServerCapabilities as Export+import Language.LSP.Protocol.Internal.Types.SetTraceParams as Export+import Language.LSP.Protocol.Internal.Types.ShowDocumentClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.ShowDocumentParams as Export+import Language.LSP.Protocol.Internal.Types.ShowDocumentResult as Export+import Language.LSP.Protocol.Internal.Types.ShowMessageParams as Export+import Language.LSP.Protocol.Internal.Types.ShowMessageRequestClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.ShowMessageRequestParams as Export+import Language.LSP.Protocol.Internal.Types.SignatureHelp as Export+import Language.LSP.Protocol.Internal.Types.SignatureHelpClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.SignatureHelpContext as Export+import Language.LSP.Protocol.Internal.Types.SignatureHelpOptions as Export+import Language.LSP.Protocol.Internal.Types.SignatureHelpParams as Export+import Language.LSP.Protocol.Internal.Types.SignatureHelpRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.SignatureHelpTriggerKind as Export+import Language.LSP.Protocol.Internal.Types.SignatureInformation as Export+import Language.LSP.Protocol.Internal.Types.StaticRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.SymbolInformation as Export+import Language.LSP.Protocol.Internal.Types.SymbolKind as Export+import Language.LSP.Protocol.Internal.Types.SymbolTag as Export+import Language.LSP.Protocol.Internal.Types.TextDocumentChangeRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.TextDocumentClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.TextDocumentContentChangeEvent as Export+import Language.LSP.Protocol.Internal.Types.TextDocumentEdit as Export+import Language.LSP.Protocol.Internal.Types.TextDocumentFilter as Export+import Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier as Export+import Language.LSP.Protocol.Internal.Types.TextDocumentItem as Export+import Language.LSP.Protocol.Internal.Types.TextDocumentPositionParams as Export+import Language.LSP.Protocol.Internal.Types.TextDocumentRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.TextDocumentSaveReason as Export+import Language.LSP.Protocol.Internal.Types.TextDocumentSaveRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.TextDocumentSyncClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.TextDocumentSyncKind as Export+import Language.LSP.Protocol.Internal.Types.TextDocumentSyncOptions as Export+import Language.LSP.Protocol.Internal.Types.TextEdit as Export+import Language.LSP.Protocol.Internal.Types.TokenFormat as Export+import Language.LSP.Protocol.Internal.Types.TraceValues as Export+import Language.LSP.Protocol.Internal.Types.TypeDefinitionClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.TypeDefinitionOptions as Export+import Language.LSP.Protocol.Internal.Types.TypeDefinitionParams as Export+import Language.LSP.Protocol.Internal.Types.TypeDefinitionRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.TypeHierarchyClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.TypeHierarchyItem as Export+import Language.LSP.Protocol.Internal.Types.TypeHierarchyOptions as Export+import Language.LSP.Protocol.Internal.Types.TypeHierarchyPrepareParams as Export+import Language.LSP.Protocol.Internal.Types.TypeHierarchyRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.TypeHierarchySubtypesParams as Export+import Language.LSP.Protocol.Internal.Types.TypeHierarchySupertypesParams as Export+import Language.LSP.Protocol.Internal.Types.UInitializeParams as Export+import Language.LSP.Protocol.Internal.Types.UnchangedDocumentDiagnosticReport as Export+import Language.LSP.Protocol.Internal.Types.UniquenessLevel as Export+import Language.LSP.Protocol.Internal.Types.Unregistration as Export+import Language.LSP.Protocol.Internal.Types.UnregistrationParams as Export+import Language.LSP.Protocol.Internal.Types.VersionedNotebookDocumentIdentifier as Export+import Language.LSP.Protocol.Internal.Types.VersionedTextDocumentIdentifier as Export+import Language.LSP.Protocol.Internal.Types.WatchKind as Export+import Language.LSP.Protocol.Internal.Types.WillSaveTextDocumentParams as Export+import Language.LSP.Protocol.Internal.Types.WindowClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.WorkDoneProgressBegin as Export+import Language.LSP.Protocol.Internal.Types.WorkDoneProgressCancelParams as Export+import Language.LSP.Protocol.Internal.Types.WorkDoneProgressCreateParams as Export+import Language.LSP.Protocol.Internal.Types.WorkDoneProgressEnd as Export+import Language.LSP.Protocol.Internal.Types.WorkDoneProgressOptions as Export+import Language.LSP.Protocol.Internal.Types.WorkDoneProgressParams as Export+import Language.LSP.Protocol.Internal.Types.WorkDoneProgressReport as Export+import Language.LSP.Protocol.Internal.Types.WorkspaceClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticParams as Export+import Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticReport as Export+import Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticReportPartialResult as Export+import Language.LSP.Protocol.Internal.Types.WorkspaceDocumentDiagnosticReport as Export+import Language.LSP.Protocol.Internal.Types.WorkspaceEdit as Export+import Language.LSP.Protocol.Internal.Types.WorkspaceEditClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.WorkspaceFolder as Export+import Language.LSP.Protocol.Internal.Types.WorkspaceFoldersChangeEvent as Export+import Language.LSP.Protocol.Internal.Types.WorkspaceFoldersInitializeParams as Export+import Language.LSP.Protocol.Internal.Types.WorkspaceFoldersServerCapabilities as Export+import Language.LSP.Protocol.Internal.Types.WorkspaceFullDocumentDiagnosticReport as Export+import Language.LSP.Protocol.Internal.Types.WorkspaceSymbol as Export+import Language.LSP.Protocol.Internal.Types.WorkspaceSymbolClientCapabilities as Export+import Language.LSP.Protocol.Internal.Types.WorkspaceSymbolOptions as Export+import Language.LSP.Protocol.Internal.Types.WorkspaceSymbolParams as Export+import Language.LSP.Protocol.Internal.Types.WorkspaceSymbolRegistrationOptions as Export+import Language.LSP.Protocol.Internal.Types.WorkspaceUnchangedDocumentDiagnosticReport as Export++
+ generated/Language/LSP/Protocol/Internal/Types/AnnotatedTextEdit.hs view
@@ -0,0 +1,49 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.AnnotatedTextEdit where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.ChangeAnnotationIdentifier+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|+A special text edit with an additional change annotation.++@since 3.16.0.+-}+data AnnotatedTextEdit = AnnotatedTextEdit +  { {-|+  The range of the text document to be manipulated. To insert+  text into a document create a range where start === end.+  -}+  _range :: Language.LSP.Protocol.Internal.Types.Range.Range+  , {-|+  The string to be inserted. For delete operations use an+  empty string.+  -}+  _newText :: Data.Text.Text+  , {-|+  The actual identifier of the change annotation+  -}+  _annotationId :: Language.LSP.Protocol.Internal.Types.ChangeAnnotationIdentifier.ChangeAnnotationIdentifier+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON AnnotatedTextEdit where+  toJSON (AnnotatedTextEdit arg0 arg1 arg2) = Aeson.object $ concat $  [["range" Aeson..= arg0]+    ,["newText" Aeson..= arg1]+    ,["annotationId" Aeson..= arg2]]++instance Aeson.FromJSON AnnotatedTextEdit where+  parseJSON = Aeson.withObject "AnnotatedTextEdit" $ \arg -> AnnotatedTextEdit <$> arg Aeson..: "range" <*> arg Aeson..: "newText" <*> arg Aeson..: "annotationId"
+ generated/Language/LSP/Protocol/Internal/Types/ApplyWorkspaceEditParams.hs view
@@ -0,0 +1,41 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ApplyWorkspaceEditParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceEdit+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters passed via a apply workspace edit request.+-}+data ApplyWorkspaceEditParams = ApplyWorkspaceEditParams +  { {-|+  An optional label of the workspace edit. This label is+  presented in the user interface for example on an undo+  stack to undo the workspace edit.+  -}+  _label :: (Maybe Data.Text.Text)+  , {-|+  The edits to apply.+  -}+  _edit :: Language.LSP.Protocol.Internal.Types.WorkspaceEdit.WorkspaceEdit+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON ApplyWorkspaceEditParams where+  toJSON (ApplyWorkspaceEditParams arg0 arg1) = Aeson.object $ concat $  ["label" Language.LSP.Protocol.Types.Common..=? arg0+    ,["edit" Aeson..= arg1]]++instance Aeson.FromJSON ApplyWorkspaceEditParams where+  parseJSON = Aeson.withObject "ApplyWorkspaceEditParams" $ \arg -> ApplyWorkspaceEditParams <$> arg Aeson..:! "label" <*> arg Aeson..: "edit"
+ generated/Language/LSP/Protocol/Internal/Types/ApplyWorkspaceEditResult.hs view
@@ -0,0 +1,49 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ApplyWorkspaceEditResult where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+The result returned from the apply workspace edit request.++@since 3.17 renamed from ApplyWorkspaceEditResponse+-}+data ApplyWorkspaceEditResult = ApplyWorkspaceEditResult +  { {-|+  Indicates whether the edit was applied or not.+  -}+  _applied :: Bool+  , {-|+  An optional textual description for why the edit was not applied.+  This may be used by the server for diagnostic logging or to provide+  a suitable error for a request that triggered the edit.+  -}+  _failureReason :: (Maybe Data.Text.Text)+  , {-|+  Depending on the client's failure handling strategy `failedChange` might+  contain the index of the change that failed. This property is only available+  if the client signals a `failureHandlingStrategy` in its client capabilities.+  -}+  _failedChange :: (Maybe Language.LSP.Protocol.Types.Common.UInt)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON ApplyWorkspaceEditResult where+  toJSON (ApplyWorkspaceEditResult arg0 arg1 arg2) = Aeson.object $ concat $  [["applied" Aeson..= arg0]+    ,"failureReason" Language.LSP.Protocol.Types.Common..=? arg1+    ,"failedChange" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON ApplyWorkspaceEditResult where+  parseJSON = Aeson.withObject "ApplyWorkspaceEditResult" $ \arg -> ApplyWorkspaceEditResult <$> arg Aeson..: "applied" <*> arg Aeson..:! "failureReason" <*> arg Aeson..:! "failedChange"
+ generated/Language/LSP/Protocol/Internal/Types/BaseSymbolInformation.hs view
@@ -0,0 +1,55 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.BaseSymbolInformation where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.SymbolKind+import qualified Language.LSP.Protocol.Internal.Types.SymbolTag+import qualified Language.LSP.Protocol.Types.Common++{-|+A base for all symbol information.+-}+data BaseSymbolInformation = BaseSymbolInformation +  { {-|+  The name of this symbol.+  -}+  _name :: Data.Text.Text+  , {-|+  The kind of this symbol.+  -}+  _kind :: Language.LSP.Protocol.Internal.Types.SymbolKind.SymbolKind+  , {-|+  Tags for this symbol.++  @since 3.16.0+  -}+  _tags :: (Maybe [Language.LSP.Protocol.Internal.Types.SymbolTag.SymbolTag])+  , {-|+  The name of the symbol containing this symbol. This information is for+  user interface purposes (e.g. to render a qualifier in the user interface+  if necessary). It can't be used to re-infer a hierarchy for the document+  symbols.+  -}+  _containerName :: (Maybe Data.Text.Text)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON BaseSymbolInformation where+  toJSON (BaseSymbolInformation arg0 arg1 arg2 arg3) = Aeson.object $ concat $  [["name" Aeson..= arg0]+    ,["kind" Aeson..= arg1]+    ,"tags" Language.LSP.Protocol.Types.Common..=? arg2+    ,"containerName" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON BaseSymbolInformation where+  parseJSON = Aeson.withObject "BaseSymbolInformation" $ \arg -> BaseSymbolInformation <$> arg Aeson..: "name" <*> arg Aeson..: "kind" <*> arg Aeson..:! "tags" <*> arg Aeson..:! "containerName"
+ generated/Language/LSP/Protocol/Internal/Types/CallHierarchyClientCapabilities.hs view
@@ -0,0 +1,34 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CallHierarchyClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.16.0+-}+data CallHierarchyClientCapabilities = CallHierarchyClientCapabilities +  { {-|+  Whether implementation supports dynamic registration. If this is set to `true`+  the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`+  return value for the corresponding server capability as well.+  -}+  _dynamicRegistration :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON CallHierarchyClientCapabilities where+  toJSON (CallHierarchyClientCapabilities arg0) = Aeson.object $ concat $  ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON CallHierarchyClientCapabilities where+  parseJSON = Aeson.withObject "CallHierarchyClientCapabilities" $ \arg -> CallHierarchyClientCapabilities <$> arg Aeson..:! "dynamicRegistration"
+ generated/Language/LSP/Protocol/Internal/Types/CallHierarchyIncomingCall.hs view
@@ -0,0 +1,42 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CallHierarchyIncomingCall where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.CallHierarchyItem+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|+Represents an incoming call, e.g. a caller of a method or constructor.++@since 3.16.0+-}+data CallHierarchyIncomingCall = CallHierarchyIncomingCall +  { {-|+  The item that makes the call.+  -}+  _from :: Language.LSP.Protocol.Internal.Types.CallHierarchyItem.CallHierarchyItem+  , {-|+  The ranges at which the calls appear. This is relative to the caller+  denoted by `CallHierarchyIncomingCall.from`.+  -}+  _fromRanges :: [Language.LSP.Protocol.Internal.Types.Range.Range]+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON CallHierarchyIncomingCall where+  toJSON (CallHierarchyIncomingCall arg0 arg1) = Aeson.object $ concat $  [["from" Aeson..= arg0]+    ,["fromRanges" Aeson..= arg1]]++instance Aeson.FromJSON CallHierarchyIncomingCall where+  parseJSON = Aeson.withObject "CallHierarchyIncomingCall" $ \arg -> CallHierarchyIncomingCall <$> arg Aeson..: "from" <*> arg Aeson..: "fromRanges"
+ generated/Language/LSP/Protocol/Internal/Types/CallHierarchyIncomingCallsParams.hs view
@@ -0,0 +1,47 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CallHierarchyIncomingCallsParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.CallHierarchyItem+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameter of a `callHierarchy/incomingCalls` request.++@since 3.16.0+-}+data CallHierarchyIncomingCallsParams = CallHierarchyIncomingCallsParams +  { {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  An optional token that a server can use to report partial results (e.g. streaming) to+  the client.+  -}+  _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|++  -}+  _item :: Language.LSP.Protocol.Internal.Types.CallHierarchyItem.CallHierarchyItem+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON CallHierarchyIncomingCallsParams where+  toJSON (CallHierarchyIncomingCallsParams arg0 arg1 arg2) = Aeson.object $ concat $  ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+    ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg1+    ,["item" Aeson..= arg2]]++instance Aeson.FromJSON CallHierarchyIncomingCallsParams where+  parseJSON = Aeson.withObject "CallHierarchyIncomingCallsParams" $ \arg -> CallHierarchyIncomingCallsParams <$> arg Aeson..:! "workDoneToken" <*> arg Aeson..:! "partialResultToken" <*> arg Aeson..: "item"
+ generated/Language/LSP/Protocol/Internal/Types/CallHierarchyItem.hs view
@@ -0,0 +1,78 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CallHierarchyItem where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Internal.Types.SymbolKind+import qualified Language.LSP.Protocol.Internal.Types.SymbolTag+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+Represents programming constructs like functions or constructors in the context+of call hierarchy.++@since 3.16.0+-}+data CallHierarchyItem = CallHierarchyItem +  { {-|+  The name of this item.+  -}+  _name :: Data.Text.Text+  , {-|+  The kind of this item.+  -}+  _kind :: Language.LSP.Protocol.Internal.Types.SymbolKind.SymbolKind+  , {-|+  Tags for this item.+  -}+  _tags :: (Maybe [Language.LSP.Protocol.Internal.Types.SymbolTag.SymbolTag])+  , {-|+  More detail for this item, e.g. the signature of a function.+  -}+  _detail :: (Maybe Data.Text.Text)+  , {-|+  The resource identifier of this item.+  -}+  _uri :: Language.LSP.Protocol.Types.Uri.Uri+  , {-|+  The range enclosing this symbol not including leading/trailing whitespace but everything else, e.g. comments and code.+  -}+  _range :: Language.LSP.Protocol.Internal.Types.Range.Range+  , {-|+  The range that should be selected and revealed when this symbol is being picked, e.g. the name of a function.+  Must be contained by the `CallHierarchyItem.range`.+  -}+  _selectionRange :: Language.LSP.Protocol.Internal.Types.Range.Range+  , {-|+  A data entry field that is preserved between a call hierarchy prepare and+  incoming calls or outgoing calls requests.+  -}+  _data_ :: (Maybe Data.Aeson.Value)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON CallHierarchyItem where+  toJSON (CallHierarchyItem arg0 arg1 arg2 arg3 arg4 arg5 arg6 arg7) = Aeson.object $ concat $  [["name" Aeson..= arg0]+    ,["kind" Aeson..= arg1]+    ,"tags" Language.LSP.Protocol.Types.Common..=? arg2+    ,"detail" Language.LSP.Protocol.Types.Common..=? arg3+    ,["uri" Aeson..= arg4]+    ,["range" Aeson..= arg5]+    ,["selectionRange" Aeson..= arg6]+    ,"data" Language.LSP.Protocol.Types.Common..=? arg7]++instance Aeson.FromJSON CallHierarchyItem where+  parseJSON = Aeson.withObject "CallHierarchyItem" $ \arg -> CallHierarchyItem <$> arg Aeson..: "name" <*> arg Aeson..: "kind" <*> arg Aeson..:! "tags" <*> arg Aeson..:! "detail" <*> arg Aeson..: "uri" <*> arg Aeson..: "range" <*> arg Aeson..: "selectionRange" <*> arg Aeson..:! "data"
+ generated/Language/LSP/Protocol/Internal/Types/CallHierarchyOptions.hs view
@@ -0,0 +1,34 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CallHierarchyOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Call hierarchy options used during static registration.++@since 3.16.0+-}+data CallHierarchyOptions = CallHierarchyOptions +  { {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON CallHierarchyOptions where+  toJSON (CallHierarchyOptions arg0) = Aeson.object $ concat $  ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON CallHierarchyOptions where+  parseJSON = Aeson.withObject "CallHierarchyOptions" $ \arg -> CallHierarchyOptions <$> arg Aeson..:! "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/CallHierarchyOutgoingCall.hs view
@@ -0,0 +1,43 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CallHierarchyOutgoingCall where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.CallHierarchyItem+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|+Represents an outgoing call, e.g. calling a getter from a method or a method from a constructor etc.++@since 3.16.0+-}+data CallHierarchyOutgoingCall = CallHierarchyOutgoingCall +  { {-|+  The item that is called.+  -}+  _to :: Language.LSP.Protocol.Internal.Types.CallHierarchyItem.CallHierarchyItem+  , {-|+  The range at which this item is called. This is the range relative to the caller, e.g the item+  passed to `CallHierarchyItemProvider.provideCallHierarchyOutgoingCalls`+  and not `CallHierarchyOutgoingCall.to`.+  -}+  _fromRanges :: [Language.LSP.Protocol.Internal.Types.Range.Range]+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON CallHierarchyOutgoingCall where+  toJSON (CallHierarchyOutgoingCall arg0 arg1) = Aeson.object $ concat $  [["to" Aeson..= arg0]+    ,["fromRanges" Aeson..= arg1]]++instance Aeson.FromJSON CallHierarchyOutgoingCall where+  parseJSON = Aeson.withObject "CallHierarchyOutgoingCall" $ \arg -> CallHierarchyOutgoingCall <$> arg Aeson..: "to" <*> arg Aeson..: "fromRanges"
+ generated/Language/LSP/Protocol/Internal/Types/CallHierarchyOutgoingCallsParams.hs view
@@ -0,0 +1,47 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CallHierarchyOutgoingCallsParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.CallHierarchyItem+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameter of a `callHierarchy/outgoingCalls` request.++@since 3.16.0+-}+data CallHierarchyOutgoingCallsParams = CallHierarchyOutgoingCallsParams +  { {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  An optional token that a server can use to report partial results (e.g. streaming) to+  the client.+  -}+  _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|++  -}+  _item :: Language.LSP.Protocol.Internal.Types.CallHierarchyItem.CallHierarchyItem+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON CallHierarchyOutgoingCallsParams where+  toJSON (CallHierarchyOutgoingCallsParams arg0 arg1 arg2) = Aeson.object $ concat $  ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+    ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg1+    ,["item" Aeson..= arg2]]++instance Aeson.FromJSON CallHierarchyOutgoingCallsParams where+  parseJSON = Aeson.withObject "CallHierarchyOutgoingCallsParams" $ \arg -> CallHierarchyOutgoingCallsParams <$> arg Aeson..:! "workDoneToken" <*> arg Aeson..:! "partialResultToken" <*> arg Aeson..: "item"
+ generated/Language/LSP/Protocol/Internal/Types/CallHierarchyPrepareParams.hs view
@@ -0,0 +1,47 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CallHierarchyPrepareParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameter of a `textDocument/prepareCallHierarchy` request.++@since 3.16.0+-}+data CallHierarchyPrepareParams = CallHierarchyPrepareParams +  { {-|+  The text document.+  -}+  _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+  , {-|+  The position inside the text document.+  -}+  _position :: Language.LSP.Protocol.Internal.Types.Position.Position+  , {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON CallHierarchyPrepareParams where+  toJSON (CallHierarchyPrepareParams arg0 arg1 arg2) = Aeson.object $ concat $  [["textDocument" Aeson..= arg0]+    ,["position" Aeson..= arg1]+    ,"workDoneToken" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON CallHierarchyPrepareParams where+  parseJSON = Aeson.withObject "CallHierarchyPrepareParams" $ \arg -> CallHierarchyPrepareParams <$> arg Aeson..: "textDocument" <*> arg Aeson..: "position" <*> arg Aeson..:! "workDoneToken"
+ generated/Language/LSP/Protocol/Internal/Types/CallHierarchyRegistrationOptions.hs view
@@ -0,0 +1,48 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CallHierarchyRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+Call hierarchy options used during static or dynamic registration.++@since 3.16.0+-}+data CallHierarchyRegistrationOptions = CallHierarchyRegistrationOptions +  { {-|+  A document selector to identify the scope of the registration. If set to null+  the document selector provided on the client side will be used.+  -}+  _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  , {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  , {-|+  The id used to register the request. The id can be used to deregister+  the request again. See also Registration#id.+  -}+  _id :: (Maybe Data.Text.Text)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON CallHierarchyRegistrationOptions where+  toJSON (CallHierarchyRegistrationOptions arg0 arg1 arg2) = Aeson.object $ concat $  [["documentSelector" Aeson..= arg0]+    ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1+    ,"id" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON CallHierarchyRegistrationOptions where+  parseJSON = Aeson.withObject "CallHierarchyRegistrationOptions" $ \arg -> CallHierarchyRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Aeson..:! "workDoneProgress" <*> arg Aeson..:! "id"
+ generated/Language/LSP/Protocol/Internal/Types/CancelParams.hs view
@@ -0,0 +1,33 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CancelParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data CancelParams = CancelParams +  { {-|+  The request id to cancel.+  -}+  _id :: (Language.LSP.Protocol.Types.Common.Int32 Language.LSP.Protocol.Types.Common.|? Data.Text.Text)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON CancelParams where+  toJSON (CancelParams arg0) = Aeson.object $ concat $  [["id" Aeson..= arg0]]++instance Aeson.FromJSON CancelParams where+  parseJSON = Aeson.withObject "CancelParams" $ \arg -> CancelParams <$> arg Aeson..: "id"
+ generated/Language/LSP/Protocol/Internal/Types/ChangeAnnotation.hs view
@@ -0,0 +1,48 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ChangeAnnotation where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+Additional information that describes document changes.++@since 3.16.0+-}+data ChangeAnnotation = ChangeAnnotation +  { {-|+  A human-readable string describing the actual change. The string+  is rendered prominent in the user interface.+  -}+  _label :: Data.Text.Text+  , {-|+  A flag which indicates that user confirmation is needed+  before applying the change.+  -}+  _needsConfirmation :: (Maybe Bool)+  , {-|+  A human-readable string which is rendered less prominent in+  the user interface.+  -}+  _description :: (Maybe Data.Text.Text)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON ChangeAnnotation where+  toJSON (ChangeAnnotation arg0 arg1 arg2) = Aeson.object $ concat $  [["label" Aeson..= arg0]+    ,"needsConfirmation" Language.LSP.Protocol.Types.Common..=? arg1+    ,"description" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON ChangeAnnotation where+  parseJSON = Aeson.withObject "ChangeAnnotation" $ \arg -> ChangeAnnotation <$> arg Aeson..: "label" <*> arg Aeson..:! "needsConfirmation" <*> arg Aeson..:! "description"
+ generated/Language/LSP/Protocol/Internal/Types/ChangeAnnotationIdentifier.hs view
@@ -0,0 +1,25 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ChangeAnnotationIdentifier where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text++{-|+An identifier to refer to a change annotation stored with a workspace edit.+-}+newtype ChangeAnnotationIdentifier = ChangeAnnotationIdentifier Data.Text.Text+  deriving newtype ( Aeson.ToJSON+  , Aeson.FromJSON+  , Aeson.ToJSONKey+  , Aeson.FromJSONKey )+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)
+ generated/Language/LSP/Protocol/Internal/Types/ClientCapabilities.hs view
@@ -0,0 +1,67 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.GeneralClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocumentClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.WindowClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceClientCapabilities+import qualified Language.LSP.Protocol.Types.Common++{-|+Defines the capabilities provided by the client.+-}+data ClientCapabilities = ClientCapabilities +  { {-|+  Workspace specific client capabilities.+  -}+  _workspace :: (Maybe Language.LSP.Protocol.Internal.Types.WorkspaceClientCapabilities.WorkspaceClientCapabilities)+  , {-|+  Text document specific client capabilities.+  -}+  _textDocument :: (Maybe Language.LSP.Protocol.Internal.Types.TextDocumentClientCapabilities.TextDocumentClientCapabilities)+  , {-|+  Capabilities specific to the notebook document support.++  @since 3.17.0+  -}+  _notebookDocument :: (Maybe Language.LSP.Protocol.Internal.Types.NotebookDocumentClientCapabilities.NotebookDocumentClientCapabilities)+  , {-|+  Window specific client capabilities.+  -}+  _window :: (Maybe Language.LSP.Protocol.Internal.Types.WindowClientCapabilities.WindowClientCapabilities)+  , {-|+  General client capabilities.++  @since 3.16.0+  -}+  _general :: (Maybe Language.LSP.Protocol.Internal.Types.GeneralClientCapabilities.GeneralClientCapabilities)+  , {-|+  Experimental client capabilities.+  -}+  _experimental :: (Maybe Data.Aeson.Value)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON ClientCapabilities where+  toJSON (ClientCapabilities arg0 arg1 arg2 arg3 arg4 arg5) = Aeson.object $ concat $  ["workspace" Language.LSP.Protocol.Types.Common..=? arg0+    ,"textDocument" Language.LSP.Protocol.Types.Common..=? arg1+    ,"notebookDocument" Language.LSP.Protocol.Types.Common..=? arg2+    ,"window" Language.LSP.Protocol.Types.Common..=? arg3+    ,"general" Language.LSP.Protocol.Types.Common..=? arg4+    ,"experimental" Language.LSP.Protocol.Types.Common..=? arg5]++instance Aeson.FromJSON ClientCapabilities where+  parseJSON = Aeson.withObject "ClientCapabilities" $ \arg -> ClientCapabilities <$> arg Aeson..:! "workspace" <*> arg Aeson..:! "textDocument" <*> arg Aeson..:! "notebookDocument" <*> arg Aeson..:! "window" <*> arg Aeson..:! "general" <*> arg Aeson..:! "experimental"
+ generated/Language/LSP/Protocol/Internal/Types/CodeAction.hs view
@@ -0,0 +1,104 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CodeAction where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row as Row+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.CodeActionKind+import qualified Language.LSP.Protocol.Internal.Types.Command+import qualified Language.LSP.Protocol.Internal.Types.Diagnostic+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceEdit+import qualified Language.LSP.Protocol.Types.Common++{-|+A code action represents a change that can be performed in code, e.g. to fix a problem or+to refactor code.++A CodeAction must set either `edit` and/or a `command`. If both are supplied, the `edit` is applied first, then the `command` is executed.+-}+data CodeAction = CodeAction +  { {-|+  A short, human-readable, title for this code action.+  -}+  _title :: Data.Text.Text+  , {-|+  The kind of the code action.++  Used to filter code actions.+  -}+  _kind :: (Maybe Language.LSP.Protocol.Internal.Types.CodeActionKind.CodeActionKind)+  , {-|+  The diagnostics that this code action resolves.+  -}+  _diagnostics :: (Maybe [Language.LSP.Protocol.Internal.Types.Diagnostic.Diagnostic])+  , {-|+  Marks this as a preferred action. Preferred actions are used by the `auto fix` command and can be targeted+  by keybindings.++  A quick fix should be marked preferred if it properly addresses the underlying error.+  A refactoring should be marked preferred if it is the most reasonable choice of actions to take.++  @since 3.15.0+  -}+  _isPreferred :: (Maybe Bool)+  , {-|+  Marks that the code action cannot currently be applied.++  Clients should follow the following guidelines regarding disabled code actions:++    - Disabled code actions are not shown in automatic [lightbulbs](https://code.visualstudio.com/docs/editor/editingevolved#_code-action)+      code action menus.++    - Disabled actions are shown as faded out in the code action menu when the user requests a more specific type+      of code action, such as refactorings.++    - If the user has a [keybinding](https://code.visualstudio.com/docs/editor/refactoring#_keybindings-for-code-actions)+      that auto applies a code action and only disabled code actions are returned, the client should show the user an+      error message with `reason` in the editor.++  @since 3.16.0+  -}+  _disabled :: (Maybe (Row.Rec ("reason" Row..== Data.Text.Text Row..+ Row.Empty)))+  , {-|+  The workspace edit this code action performs.+  -}+  _edit :: (Maybe Language.LSP.Protocol.Internal.Types.WorkspaceEdit.WorkspaceEdit)+  , {-|+  A command this code action executes. If a code action+  provides an edit and a command, first the edit is+  executed and then the command.+  -}+  _command :: (Maybe Language.LSP.Protocol.Internal.Types.Command.Command)+  , {-|+  A data entry field that is preserved on a code action between+  a `textDocument/codeAction` and a `codeAction/resolve` request.++  @since 3.16.0+  -}+  _data_ :: (Maybe Data.Aeson.Value)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON CodeAction where+  toJSON (CodeAction arg0 arg1 arg2 arg3 arg4 arg5 arg6 arg7) = Aeson.object $ concat $  [["title" Aeson..= arg0]+    ,"kind" Language.LSP.Protocol.Types.Common..=? arg1+    ,"diagnostics" Language.LSP.Protocol.Types.Common..=? arg2+    ,"isPreferred" Language.LSP.Protocol.Types.Common..=? arg3+    ,"disabled" Language.LSP.Protocol.Types.Common..=? arg4+    ,"edit" Language.LSP.Protocol.Types.Common..=? arg5+    ,"command" Language.LSP.Protocol.Types.Common..=? arg6+    ,"data" Language.LSP.Protocol.Types.Common..=? arg7]++instance Aeson.FromJSON CodeAction where+  parseJSON = Aeson.withObject "CodeAction" $ \arg -> CodeAction <$> arg Aeson..: "title" <*> arg Aeson..:! "kind" <*> arg Aeson..:! "diagnostics" <*> arg Aeson..:! "isPreferred" <*> arg Aeson..:! "disabled" <*> arg Aeson..:! "edit" <*> arg Aeson..:! "command" <*> arg Aeson..:! "data"
+ generated/Language/LSP/Protocol/Internal/Types/CodeActionClientCapabilities.hs view
@@ -0,0 +1,86 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CodeActionClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row as Row+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.CodeActionKind+import qualified Language.LSP.Protocol.Types.Common++{-|+The Client Capabilities of a `CodeActionRequest`.+-}+data CodeActionClientCapabilities = CodeActionClientCapabilities +  { {-|+  Whether code action supports dynamic registration.+  -}+  _dynamicRegistration :: (Maybe Bool)+  , {-|+  The client support code action literals of type `CodeAction` as a valid+  response of the `textDocument/codeAction` request. If the property is not+  set the request can only return `Command` literals.++  @since 3.8.0+  -}+  _codeActionLiteralSupport :: (Maybe (Row.Rec ("codeActionKind" Row..== (Row.Rec ("valueSet" Row..== [Language.LSP.Protocol.Internal.Types.CodeActionKind.CodeActionKind] Row..+ Row.Empty)) Row..+ Row.Empty)))+  , {-|+  Whether code action supports the `isPreferred` property.++  @since 3.15.0+  -}+  _isPreferredSupport :: (Maybe Bool)+  , {-|+  Whether code action supports the `disabled` property.++  @since 3.16.0+  -}+  _disabledSupport :: (Maybe Bool)+  , {-|+  Whether code action supports the `data` property which is+  preserved between a `textDocument/codeAction` and a+  `codeAction/resolve` request.++  @since 3.16.0+  -}+  _dataSupport :: (Maybe Bool)+  , {-|+  Whether the client supports resolving additional code action+  properties via a separate `codeAction/resolve` request.++  @since 3.16.0+  -}+  _resolveSupport :: (Maybe (Row.Rec ("properties" Row..== [Data.Text.Text] Row..+ Row.Empty)))+  , {-|+  Whether the client honors the change annotations in+  text edits and resource operations returned via the+  `CodeAction#edit` property by for example presenting+  the workspace edit in the user interface and asking+  for confirmation.++  @since 3.16.0+  -}+  _honorsChangeAnnotations :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON CodeActionClientCapabilities where+  toJSON (CodeActionClientCapabilities arg0 arg1 arg2 arg3 arg4 arg5 arg6) = Aeson.object $ concat $  ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+    ,"codeActionLiteralSupport" Language.LSP.Protocol.Types.Common..=? arg1+    ,"isPreferredSupport" Language.LSP.Protocol.Types.Common..=? arg2+    ,"disabledSupport" Language.LSP.Protocol.Types.Common..=? arg3+    ,"dataSupport" Language.LSP.Protocol.Types.Common..=? arg4+    ,"resolveSupport" Language.LSP.Protocol.Types.Common..=? arg5+    ,"honorsChangeAnnotations" Language.LSP.Protocol.Types.Common..=? arg6]++instance Aeson.FromJSON CodeActionClientCapabilities where+  parseJSON = Aeson.withObject "CodeActionClientCapabilities" $ \arg -> CodeActionClientCapabilities <$> arg Aeson..:! "dynamicRegistration" <*> arg Aeson..:! "codeActionLiteralSupport" <*> arg Aeson..:! "isPreferredSupport" <*> arg Aeson..:! "disabledSupport" <*> arg Aeson..:! "dataSupport" <*> arg Aeson..:! "resolveSupport" <*> arg Aeson..:! "honorsChangeAnnotations"
+ generated/Language/LSP/Protocol/Internal/Types/CodeActionContext.hs view
@@ -0,0 +1,55 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CodeActionContext where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.CodeActionKind+import qualified Language.LSP.Protocol.Internal.Types.CodeActionTriggerKind+import qualified Language.LSP.Protocol.Internal.Types.Diagnostic+import qualified Language.LSP.Protocol.Types.Common++{-|+Contains additional diagnostic information about the context in which+a `CodeActionProvider.provideCodeActions` is run.+-}+data CodeActionContext = CodeActionContext +  { {-|+  An array of diagnostics known on the client side overlapping the range provided to the+  `textDocument/codeAction` request. They are provided so that the server knows which+  errors are currently presented to the user for the given range. There is no guarantee+  that these accurately reflect the error state of the resource. The primary parameter+  to compute code actions is the provided range.+  -}+  _diagnostics :: [Language.LSP.Protocol.Internal.Types.Diagnostic.Diagnostic]+  , {-|+  Requested kind of actions to return.++  Actions not of this kind are filtered out by the client before being shown. So servers+  can omit computing them.+  -}+  _only :: (Maybe [Language.LSP.Protocol.Internal.Types.CodeActionKind.CodeActionKind])+  , {-|+  The reason why code actions were requested.++  @since 3.17.0+  -}+  _triggerKind :: (Maybe Language.LSP.Protocol.Internal.Types.CodeActionTriggerKind.CodeActionTriggerKind)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON CodeActionContext where+  toJSON (CodeActionContext arg0 arg1 arg2) = Aeson.object $ concat $  [["diagnostics" Aeson..= arg0]+    ,"only" Language.LSP.Protocol.Types.Common..=? arg1+    ,"triggerKind" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON CodeActionContext where+  parseJSON = Aeson.withObject "CodeActionContext" $ \arg -> CodeActionContext <$> arg Aeson..: "diagnostics" <*> arg Aeson..:! "only" <*> arg Aeson..:! "triggerKind"
+ generated/Language/LSP/Protocol/Internal/Types/CodeActionKind.hs view
@@ -0,0 +1,131 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CodeActionKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+A set of predefined code action kinds+-}+data CodeActionKind = +    {-|+  Empty kind.+  -}+  CodeActionKind_Empty+  | {-|+  Base kind for quickfix actions: 'quickfix'+  -}+  CodeActionKind_QuickFix+  | {-|+  Base kind for refactoring actions: 'refactor'+  -}+  CodeActionKind_Refactor+  | {-|+  Base kind for refactoring extraction actions: 'refactor.extract'++  Example extract actions:++  - Extract method+  - Extract function+  - Extract variable+  - Extract interface from class+  - ...+  -}+  CodeActionKind_RefactorExtract+  | {-|+  Base kind for refactoring inline actions: 'refactor.inline'++  Example inline actions:++  - Inline function+  - Inline variable+  - Inline constant+  - ...+  -}+  CodeActionKind_RefactorInline+  | {-|+  Base kind for refactoring rewrite actions: 'refactor.rewrite'++  Example rewrite actions:++  - Convert JavaScript function to class+  - Add or remove parameter+  - Encapsulate field+  - Make method static+  - Move method to base class+  - ...+  -}+  CodeActionKind_RefactorRewrite+  | {-|+  Base kind for source actions: `source`++  Source code actions apply to the entire file.+  -}+  CodeActionKind_Source+  | {-|+  Base kind for an organize imports source action: `source.organizeImports`+  -}+  CodeActionKind_SourceOrganizeImports+  | {-|+  Base kind for auto-fix source actions: `source.fixAll`.++  Fix all actions automatically fix errors that have a clear fix that do not require user input.+  They should not suppress errors or perform unsafe fixes such as generating new types or classes.++  @since 3.15.0+  -}+  CodeActionKind_SourceFixAll+  | CodeActionKind_Custom Data.Text.Text+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)+  deriving ( Aeson.ToJSON+  , Aeson.FromJSON+  , Data.String.IsString ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum CodeActionKind Data.Text.Text)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum CodeActionKind where+  knownValues = Data.Set.fromList [CodeActionKind_Empty+    ,CodeActionKind_QuickFix+    ,CodeActionKind_Refactor+    ,CodeActionKind_RefactorExtract+    ,CodeActionKind_RefactorInline+    ,CodeActionKind_RefactorRewrite+    ,CodeActionKind_Source+    ,CodeActionKind_SourceOrganizeImports+    ,CodeActionKind_SourceFixAll]+  type EnumBaseType CodeActionKind = Data.Text.Text+  toEnumBaseType CodeActionKind_Empty = ""+  toEnumBaseType CodeActionKind_QuickFix = "quickfix"+  toEnumBaseType CodeActionKind_Refactor = "refactor"+  toEnumBaseType CodeActionKind_RefactorExtract = "refactor.extract"+  toEnumBaseType CodeActionKind_RefactorInline = "refactor.inline"+  toEnumBaseType CodeActionKind_RefactorRewrite = "refactor.rewrite"+  toEnumBaseType CodeActionKind_Source = "source"+  toEnumBaseType CodeActionKind_SourceOrganizeImports = "source.organizeImports"+  toEnumBaseType CodeActionKind_SourceFixAll = "source.fixAll"+  toEnumBaseType (CodeActionKind_Custom arg) = arg++instance Language.LSP.Protocol.Types.LspEnum.LspOpenEnum CodeActionKind where+  fromOpenEnumBaseType "" = CodeActionKind_Empty+  fromOpenEnumBaseType "quickfix" = CodeActionKind_QuickFix+  fromOpenEnumBaseType "refactor" = CodeActionKind_Refactor+  fromOpenEnumBaseType "refactor.extract" = CodeActionKind_RefactorExtract+  fromOpenEnumBaseType "refactor.inline" = CodeActionKind_RefactorInline+  fromOpenEnumBaseType "refactor.rewrite" = CodeActionKind_RefactorRewrite+  fromOpenEnumBaseType "source" = CodeActionKind_Source+  fromOpenEnumBaseType "source.organizeImports" = CodeActionKind_SourceOrganizeImports+  fromOpenEnumBaseType "source.fixAll" = CodeActionKind_SourceFixAll+  fromOpenEnumBaseType arg = CodeActionKind_Custom arg++
+ generated/Language/LSP/Protocol/Internal/Types/CodeActionOptions.hs view
@@ -0,0 +1,49 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CodeActionOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.CodeActionKind+import qualified Language.LSP.Protocol.Types.Common++{-|+Provider options for a `CodeActionRequest`.+-}+data CodeActionOptions = CodeActionOptions +  { {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  , {-|+  CodeActionKinds that this server may return.++  The list of kinds may be generic, such as `CodeActionKind.Refactor`, or the server+  may list out every specific kind they provide.+  -}+  _codeActionKinds :: (Maybe [Language.LSP.Protocol.Internal.Types.CodeActionKind.CodeActionKind])+  , {-|+  The server provides support to resolve additional+  information for a code action.++  @since 3.16.0+  -}+  _resolveProvider :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON CodeActionOptions where+  toJSON (CodeActionOptions arg0 arg1 arg2) = Aeson.object $ concat $  ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0+    ,"codeActionKinds" Language.LSP.Protocol.Types.Common..=? arg1+    ,"resolveProvider" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON CodeActionOptions where+  parseJSON = Aeson.withObject "CodeActionOptions" $ \arg -> CodeActionOptions <$> arg Aeson..:! "workDoneProgress" <*> arg Aeson..:! "codeActionKinds" <*> arg Aeson..:! "resolveProvider"
+ generated/Language/LSP/Protocol/Internal/Types/CodeActionParams.hs view
@@ -0,0 +1,57 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CodeActionParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.CodeActionContext+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters of a `CodeActionRequest`.+-}+data CodeActionParams = CodeActionParams +  { {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  An optional token that a server can use to report partial results (e.g. streaming) to+  the client.+  -}+  _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  The document in which the command was invoked.+  -}+  _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+  , {-|+  The range for which the command was invoked.+  -}+  _range :: Language.LSP.Protocol.Internal.Types.Range.Range+  , {-|+  Context carrying additional information.+  -}+  _context :: Language.LSP.Protocol.Internal.Types.CodeActionContext.CodeActionContext+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON CodeActionParams where+  toJSON (CodeActionParams arg0 arg1 arg2 arg3 arg4) = Aeson.object $ concat $  ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+    ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg1+    ,["textDocument" Aeson..= arg2]+    ,["range" Aeson..= arg3]+    ,["context" Aeson..= arg4]]++instance Aeson.FromJSON CodeActionParams where+  parseJSON = Aeson.withObject "CodeActionParams" $ \arg -> CodeActionParams <$> arg Aeson..:! "workDoneToken" <*> arg Aeson..:! "partialResultToken" <*> arg Aeson..: "textDocument" <*> arg Aeson..: "range" <*> arg Aeson..: "context"
+ generated/Language/LSP/Protocol/Internal/Types/CodeActionRegistrationOptions.hs view
@@ -0,0 +1,56 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CodeActionRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.CodeActionKind+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+Registration options for a `CodeActionRequest`.+-}+data CodeActionRegistrationOptions = CodeActionRegistrationOptions +  { {-|+  A document selector to identify the scope of the registration. If set to null+  the document selector provided on the client side will be used.+  -}+  _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  , {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  , {-|+  CodeActionKinds that this server may return.++  The list of kinds may be generic, such as `CodeActionKind.Refactor`, or the server+  may list out every specific kind they provide.+  -}+  _codeActionKinds :: (Maybe [Language.LSP.Protocol.Internal.Types.CodeActionKind.CodeActionKind])+  , {-|+  The server provides support to resolve additional+  information for a code action.++  @since 3.16.0+  -}+  _resolveProvider :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON CodeActionRegistrationOptions where+  toJSON (CodeActionRegistrationOptions arg0 arg1 arg2 arg3) = Aeson.object $ concat $  [["documentSelector" Aeson..= arg0]+    ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1+    ,"codeActionKinds" Language.LSP.Protocol.Types.Common..=? arg2+    ,"resolveProvider" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON CodeActionRegistrationOptions where+  parseJSON = Aeson.withObject "CodeActionRegistrationOptions" $ \arg -> CodeActionRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Aeson..:! "workDoneProgress" <*> arg Aeson..:! "codeActionKinds" <*> arg Aeson..:! "resolveProvider"
+ generated/Language/LSP/Protocol/Internal/Types/CodeActionTriggerKind.hs view
@@ -0,0 +1,51 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CodeActionTriggerKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+The reason why code actions were requested.++@since 3.17.0+-}+data CodeActionTriggerKind = +    {-|+  Code actions were explicitly requested by the user or by an extension.+  -}+  CodeActionTriggerKind_Invoked+  | {-|+  Code actions were requested automatically.++  This typically happens when current selection in a file changes, but can+  also be triggered when file content changes.+  -}+  CodeActionTriggerKind_Automatic+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)+  deriving ( Aeson.ToJSON+  , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum CodeActionTriggerKind Language.LSP.Protocol.Types.Common.UInt)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum CodeActionTriggerKind where+  knownValues = Data.Set.fromList [CodeActionTriggerKind_Invoked+    ,CodeActionTriggerKind_Automatic]+  type EnumBaseType CodeActionTriggerKind = Language.LSP.Protocol.Types.Common.UInt+  toEnumBaseType CodeActionTriggerKind_Invoked = 1+  toEnumBaseType CodeActionTriggerKind_Automatic = 2+  fromEnumBaseType 1 = pure CodeActionTriggerKind_Invoked+  fromEnumBaseType 2 = pure CodeActionTriggerKind_Automatic+  fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/CodeDescription.hs view
@@ -0,0 +1,35 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CodeDescription where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+Structure to capture a description for an error code.++@since 3.16.0+-}+data CodeDescription = CodeDescription +  { {-|+  An URI to open with more information about the diagnostic error.+  -}+  _href :: Language.LSP.Protocol.Types.Uri.Uri+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON CodeDescription where+  toJSON (CodeDescription arg0) = Aeson.object $ concat $  [["href" Aeson..= arg0]]++instance Aeson.FromJSON CodeDescription where+  parseJSON = Aeson.withObject "CodeDescription" $ \arg -> CodeDescription <$> arg Aeson..: "href"
+ generated/Language/LSP/Protocol/Internal/Types/CodeLens.hs view
@@ -0,0 +1,50 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CodeLens where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Command+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|+A code lens represents a `Command` that should be shown along with+source text, like the number of references, a way to run tests, etc.++A code lens is _unresolved_ when no command is associated to it. For performance+reasons the creation of a code lens and resolving should be done in two stages.+-}+data CodeLens = CodeLens +  { {-|+  The range in which this code lens is valid. Should only span a single line.+  -}+  _range :: Language.LSP.Protocol.Internal.Types.Range.Range+  , {-|+  The command this code lens represents.+  -}+  _command :: (Maybe Language.LSP.Protocol.Internal.Types.Command.Command)+  , {-|+  A data entry field that is preserved on a code lens item between+  a `CodeLensRequest` and a `CodeLensResolveRequest`+  -}+  _data_ :: (Maybe Data.Aeson.Value)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON CodeLens where+  toJSON (CodeLens arg0 arg1 arg2) = Aeson.object $ concat $  [["range" Aeson..= arg0]+    ,"command" Language.LSP.Protocol.Types.Common..=? arg1+    ,"data" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON CodeLens where+  parseJSON = Aeson.withObject "CodeLens" $ \arg -> CodeLens <$> arg Aeson..: "range" <*> arg Aeson..:! "command" <*> arg Aeson..:! "data"
+ generated/Language/LSP/Protocol/Internal/Types/CodeLensClientCapabilities.hs view
@@ -0,0 +1,32 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CodeLensClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+The client capabilities  of a `CodeLensRequest`.+-}+data CodeLensClientCapabilities = CodeLensClientCapabilities +  { {-|+  Whether code lens supports dynamic registration.+  -}+  _dynamicRegistration :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON CodeLensClientCapabilities where+  toJSON (CodeLensClientCapabilities arg0) = Aeson.object $ concat $  ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON CodeLensClientCapabilities where+  parseJSON = Aeson.withObject "CodeLensClientCapabilities" $ \arg -> CodeLensClientCapabilities <$> arg Aeson..:! "dynamicRegistration"
+ generated/Language/LSP/Protocol/Internal/Types/CodeLensOptions.hs view
@@ -0,0 +1,37 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CodeLensOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Code Lens provider options of a `CodeLensRequest`.+-}+data CodeLensOptions = CodeLensOptions +  { {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  , {-|+  Code lens has a resolve provider as well.+  -}+  _resolveProvider :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON CodeLensOptions where+  toJSON (CodeLensOptions arg0 arg1) = Aeson.object $ concat $  ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0+    ,"resolveProvider" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON CodeLensOptions where+  parseJSON = Aeson.withObject "CodeLensOptions" $ \arg -> CodeLensOptions <$> arg Aeson..:! "workDoneProgress" <*> arg Aeson..:! "resolveProvider"
+ generated/Language/LSP/Protocol/Internal/Types/CodeLensParams.hs view
@@ -0,0 +1,45 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CodeLensParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters of a `CodeLensRequest`.+-}+data CodeLensParams = CodeLensParams +  { {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  An optional token that a server can use to report partial results (e.g. streaming) to+  the client.+  -}+  _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  The document to request code lens for.+  -}+  _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON CodeLensParams where+  toJSON (CodeLensParams arg0 arg1 arg2) = Aeson.object $ concat $  ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+    ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg1+    ,["textDocument" Aeson..= arg2]]++instance Aeson.FromJSON CodeLensParams where+  parseJSON = Aeson.withObject "CodeLensParams" $ \arg -> CodeLensParams <$> arg Aeson..:! "workDoneToken" <*> arg Aeson..:! "partialResultToken" <*> arg Aeson..: "textDocument"
+ generated/Language/LSP/Protocol/Internal/Types/CodeLensRegistrationOptions.hs view
@@ -0,0 +1,44 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CodeLensRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+Registration options for a `CodeLensRequest`.+-}+data CodeLensRegistrationOptions = CodeLensRegistrationOptions +  { {-|+  A document selector to identify the scope of the registration. If set to null+  the document selector provided on the client side will be used.+  -}+  _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  , {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  , {-|+  Code lens has a resolve provider as well.+  -}+  _resolveProvider :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON CodeLensRegistrationOptions where+  toJSON (CodeLensRegistrationOptions arg0 arg1 arg2) = Aeson.object $ concat $  [["documentSelector" Aeson..= arg0]+    ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1+    ,"resolveProvider" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON CodeLensRegistrationOptions where+  parseJSON = Aeson.withObject "CodeLensRegistrationOptions" $ \arg -> CodeLensRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Aeson..:! "workDoneProgress" <*> arg Aeson..:! "resolveProvider"
+ generated/Language/LSP/Protocol/Internal/Types/CodeLensWorkspaceClientCapabilities.hs view
@@ -0,0 +1,38 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CodeLensWorkspaceClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.16.0+-}+data CodeLensWorkspaceClientCapabilities = CodeLensWorkspaceClientCapabilities +  { {-|+  Whether the client implementation supports a refresh request sent from the+  server to the client.++  Note that this event is global and will force the client to refresh all+  code lenses currently shown. It should be used with absolute care and is+  useful for situation where a server for example detect a project wide+  change that requires such a calculation.+  -}+  _refreshSupport :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON CodeLensWorkspaceClientCapabilities where+  toJSON (CodeLensWorkspaceClientCapabilities arg0) = Aeson.object $ concat $  ["refreshSupport" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON CodeLensWorkspaceClientCapabilities where+  parseJSON = Aeson.withObject "CodeLensWorkspaceClientCapabilities" $ \arg -> CodeLensWorkspaceClientCapabilities <$> arg Aeson..:! "refreshSupport"
+ generated/Language/LSP/Protocol/Internal/Types/Color.hs view
@@ -0,0 +1,47 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.Color where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Represents a color in RGBA space.+-}+data Color = Color +  { {-|+  The red component of this color in the range [0-1].+  -}+  _red :: Float+  , {-|+  The green component of this color in the range [0-1].+  -}+  _green :: Float+  , {-|+  The blue component of this color in the range [0-1].+  -}+  _blue :: Float+  , {-|+  The alpha component of this color in the range [0-1].+  -}+  _alpha :: Float+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON Color where+  toJSON (Color arg0 arg1 arg2 arg3) = Aeson.object $ concat $  [["red" Aeson..= arg0]+    ,["green" Aeson..= arg1]+    ,["blue" Aeson..= arg2]+    ,["alpha" Aeson..= arg3]]++instance Aeson.FromJSON Color where+  parseJSON = Aeson.withObject "Color" $ \arg -> Color <$> arg Aeson..: "red" <*> arg Aeson..: "green" <*> arg Aeson..: "blue" <*> arg Aeson..: "alpha"
+ generated/Language/LSP/Protocol/Internal/Types/ColorInformation.hs view
@@ -0,0 +1,39 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ColorInformation where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Color+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|+Represents a color range from a document.+-}+data ColorInformation = ColorInformation +  { {-|+  The range in the document where this color appears.+  -}+  _range :: Language.LSP.Protocol.Internal.Types.Range.Range+  , {-|+  The actual color value for this color range.+  -}+  _color :: Language.LSP.Protocol.Internal.Types.Color.Color+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON ColorInformation where+  toJSON (ColorInformation arg0 arg1) = Aeson.object $ concat $  [["range" Aeson..= arg0]+    ,["color" Aeson..= arg1]]++instance Aeson.FromJSON ColorInformation where+  parseJSON = Aeson.withObject "ColorInformation" $ \arg -> ColorInformation <$> arg Aeson..: "range" <*> arg Aeson..: "color"
+ generated/Language/LSP/Protocol/Internal/Types/ColorPresentation.hs view
@@ -0,0 +1,49 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ColorPresentation where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.TextEdit+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data ColorPresentation = ColorPresentation +  { {-|+  The label of this color presentation. It will be shown on the color+  picker header. By default this is also the text that is inserted when selecting+  this color presentation.+  -}+  _label :: Data.Text.Text+  , {-|+  An `TextEdit` which is applied to a document when selecting+  this presentation for the color.  When `falsy` the `ColorPresentation.label`+  is used.+  -}+  _textEdit :: (Maybe Language.LSP.Protocol.Internal.Types.TextEdit.TextEdit)+  , {-|+  An optional array of additional `TextEdit` that are applied when+  selecting this color presentation. Edits must not overlap with the main `ColorPresentation.textEdit` nor with themselves.+  -}+  _additionalTextEdits :: (Maybe [Language.LSP.Protocol.Internal.Types.TextEdit.TextEdit])+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON ColorPresentation where+  toJSON (ColorPresentation arg0 arg1 arg2) = Aeson.object $ concat $  [["label" Aeson..= arg0]+    ,"textEdit" Language.LSP.Protocol.Types.Common..=? arg1+    ,"additionalTextEdits" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON ColorPresentation where+  parseJSON = Aeson.withObject "ColorPresentation" $ \arg -> ColorPresentation <$> arg Aeson..: "label" <*> arg Aeson..:! "textEdit" <*> arg Aeson..:! "additionalTextEdits"
+ generated/Language/LSP/Protocol/Internal/Types/ColorPresentationParams.hs view
@@ -0,0 +1,57 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ColorPresentationParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Color+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+Parameters for a `ColorPresentationRequest`.+-}+data ColorPresentationParams = ColorPresentationParams +  { {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  An optional token that a server can use to report partial results (e.g. streaming) to+  the client.+  -}+  _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  The text document.+  -}+  _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+  , {-|+  The color to request presentations for.+  -}+  _color :: Language.LSP.Protocol.Internal.Types.Color.Color+  , {-|+  The range where the color would be inserted. Serves as a context.+  -}+  _range :: Language.LSP.Protocol.Internal.Types.Range.Range+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON ColorPresentationParams where+  toJSON (ColorPresentationParams arg0 arg1 arg2 arg3 arg4) = Aeson.object $ concat $  ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+    ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg1+    ,["textDocument" Aeson..= arg2]+    ,["color" Aeson..= arg3]+    ,["range" Aeson..= arg4]]++instance Aeson.FromJSON ColorPresentationParams where+  parseJSON = Aeson.withObject "ColorPresentationParams" $ \arg -> ColorPresentationParams <$> arg Aeson..:! "workDoneToken" <*> arg Aeson..:! "partialResultToken" <*> arg Aeson..: "textDocument" <*> arg Aeson..: "color" <*> arg Aeson..: "range"
+ generated/Language/LSP/Protocol/Internal/Types/Command.hs view
@@ -0,0 +1,48 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.Command where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+Represents a reference to a command. Provides a title which+will be used to represent a command in the UI and, optionally,+an array of arguments which will be passed to the command handler+function when invoked.+-}+data Command = Command +  { {-|+  Title of the command, like `save`.+  -}+  _title :: Data.Text.Text+  , {-|+  The identifier of the actual command handler.+  -}+  _command :: Data.Text.Text+  , {-|+  Arguments that the command handler should be+  invoked with.+  -}+  _arguments :: (Maybe [Data.Aeson.Value])+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON Command where+  toJSON (Command arg0 arg1 arg2) = Aeson.object $ concat $  [["title" Aeson..= arg0]+    ,["command" Aeson..= arg1]+    ,"arguments" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON Command where+  parseJSON = Aeson.withObject "Command" $ \arg -> Command <$> arg Aeson..: "title" <*> arg Aeson..: "command" <*> arg Aeson..:! "arguments"
+ generated/Language/LSP/Protocol/Internal/Types/CompletionClientCapabilities.hs view
@@ -0,0 +1,72 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CompletionClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row as Row+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.CompletionItemKind+import qualified Language.LSP.Protocol.Internal.Types.CompletionItemTag+import qualified Language.LSP.Protocol.Internal.Types.InsertTextMode+import qualified Language.LSP.Protocol.Internal.Types.MarkupKind+import qualified Language.LSP.Protocol.Types.Common++{-|+Completion client capabilities+-}+data CompletionClientCapabilities = CompletionClientCapabilities +  { {-|+  Whether completion supports dynamic registration.+  -}+  _dynamicRegistration :: (Maybe Bool)+  , {-|+  The client supports the following `CompletionItem` specific+  capabilities.+  -}+  _completionItem :: (Maybe (Row.Rec ("snippetSupport" Row..== (Maybe Bool) Row..+ ("commitCharactersSupport" Row..== (Maybe Bool) Row..+ ("documentationFormat" Row..== (Maybe [Language.LSP.Protocol.Internal.Types.MarkupKind.MarkupKind]) Row..+ ("deprecatedSupport" Row..== (Maybe Bool) Row..+ ("preselectSupport" Row..== (Maybe Bool) Row..+ ("tagSupport" Row..== (Maybe (Row.Rec ("valueSet" Row..== [Language.LSP.Protocol.Internal.Types.CompletionItemTag.CompletionItemTag] Row..+ Row.Empty))) Row..+ ("insertReplaceSupport" Row..== (Maybe Bool) Row..+ ("resolveSupport" Row..== (Maybe (Row.Rec ("properties" Row..== [Data.Text.Text] Row..+ Row.Empty))) Row..+ ("insertTextModeSupport" Row..== (Maybe (Row.Rec ("valueSet" Row..== [Language.LSP.Protocol.Internal.Types.InsertTextMode.InsertTextMode] Row..+ Row.Empty))) Row..+ ("labelDetailsSupport" Row..== (Maybe Bool) Row..+ Row.Empty))))))))))))+  , {-|++  -}+  _completionItemKind :: (Maybe (Row.Rec ("valueSet" Row..== (Maybe [Language.LSP.Protocol.Internal.Types.CompletionItemKind.CompletionItemKind]) Row..+ Row.Empty)))+  , {-|+  Defines how the client handles whitespace and indentation+  when accepting a completion item that uses multi line+  text in either `insertText` or `textEdit`.++  @since 3.17.0+  -}+  _insertTextMode :: (Maybe Language.LSP.Protocol.Internal.Types.InsertTextMode.InsertTextMode)+  , {-|+  The client supports to send additional context information for a+  `textDocument/completion` request.+  -}+  _contextSupport :: (Maybe Bool)+  , {-|+  The client supports the following `CompletionList` specific+  capabilities.++  @since 3.17.0+  -}+  _completionList :: (Maybe (Row.Rec ("itemDefaults" Row..== (Maybe [Data.Text.Text]) Row..+ Row.Empty)))+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON CompletionClientCapabilities where+  toJSON (CompletionClientCapabilities arg0 arg1 arg2 arg3 arg4 arg5) = Aeson.object $ concat $  ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+    ,"completionItem" Language.LSP.Protocol.Types.Common..=? arg1+    ,"completionItemKind" Language.LSP.Protocol.Types.Common..=? arg2+    ,"insertTextMode" Language.LSP.Protocol.Types.Common..=? arg3+    ,"contextSupport" Language.LSP.Protocol.Types.Common..=? arg4+    ,"completionList" Language.LSP.Protocol.Types.Common..=? arg5]++instance Aeson.FromJSON CompletionClientCapabilities where+  parseJSON = Aeson.withObject "CompletionClientCapabilities" $ \arg -> CompletionClientCapabilities <$> arg Aeson..:! "dynamicRegistration" <*> arg Aeson..:! "completionItem" <*> arg Aeson..:! "completionItemKind" <*> arg Aeson..:! "insertTextMode" <*> arg Aeson..:! "contextSupport" <*> arg Aeson..:! "completionList"
+ generated/Language/LSP/Protocol/Internal/Types/CompletionContext.hs view
@@ -0,0 +1,40 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CompletionContext where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.CompletionTriggerKind+import qualified Language.LSP.Protocol.Types.Common++{-|+Contains additional information about the context in which a completion request is triggered.+-}+data CompletionContext = CompletionContext +  { {-|+  How the completion was triggered.+  -}+  _triggerKind :: Language.LSP.Protocol.Internal.Types.CompletionTriggerKind.CompletionTriggerKind+  , {-|+  The trigger character (a single character) that has trigger code complete.+  Is undefined if `triggerKind !== CompletionTriggerKind.TriggerCharacter`+  -}+  _triggerCharacter :: (Maybe Data.Text.Text)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON CompletionContext where+  toJSON (CompletionContext arg0 arg1) = Aeson.object $ concat $  [["triggerKind" Aeson..= arg0]+    ,"triggerCharacter" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON CompletionContext where+  parseJSON = Aeson.withObject "CompletionContext" $ \arg -> CompletionContext <$> arg Aeson..: "triggerKind" <*> arg Aeson..:! "triggerCharacter"
+ generated/Language/LSP/Protocol/Internal/Types/CompletionItem.hs view
@@ -0,0 +1,214 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CompletionItem where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Command+import qualified Language.LSP.Protocol.Internal.Types.CompletionItemKind+import qualified Language.LSP.Protocol.Internal.Types.CompletionItemLabelDetails+import qualified Language.LSP.Protocol.Internal.Types.CompletionItemTag+import qualified Language.LSP.Protocol.Internal.Types.InsertReplaceEdit+import qualified Language.LSP.Protocol.Internal.Types.InsertTextFormat+import qualified Language.LSP.Protocol.Internal.Types.InsertTextMode+import qualified Language.LSP.Protocol.Internal.Types.MarkupContent+import qualified Language.LSP.Protocol.Internal.Types.TextEdit+import qualified Language.LSP.Protocol.Types.Common++{-# DEPRECATED _deprecated "Use `tags` instead." #-}+{-|+A completion item represents a text snippet that is+proposed to complete text that is being typed.+-}+data CompletionItem = CompletionItem +  { {-|+  The label of this completion item.++  The label property is also by default the text that+  is inserted when selecting this completion.++  If label details are provided the label itself should+  be an unqualified name of the completion item.+  -}+  _label :: Data.Text.Text+  , {-|+  Additional details for the label++  @since 3.17.0+  -}+  _labelDetails :: (Maybe Language.LSP.Protocol.Internal.Types.CompletionItemLabelDetails.CompletionItemLabelDetails)+  , {-|+  The kind of this completion item. Based of the kind+  an icon is chosen by the editor.+  -}+  _kind :: (Maybe Language.LSP.Protocol.Internal.Types.CompletionItemKind.CompletionItemKind)+  , {-|+  Tags for this completion item.++  @since 3.15.0+  -}+  _tags :: (Maybe [Language.LSP.Protocol.Internal.Types.CompletionItemTag.CompletionItemTag])+  , {-|+  A human-readable string with additional information+  about this item, like type or symbol information.+  -}+  _detail :: (Maybe Data.Text.Text)+  , {-|+  A human-readable string that represents a doc-comment.+  -}+  _documentation :: (Maybe (Data.Text.Text Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.MarkupContent.MarkupContent))+  , {-|+  Indicates if this item is deprecated.+  @deprecated Use `tags` instead.+  -}+  _deprecated :: (Maybe Bool)+  , {-|+  Select this item when showing.++  *Note* that only one completion item can be selected and that the+  tool / client decides which item that is. The rule is that the *first*+  item of those that match best is selected.+  -}+  _preselect :: (Maybe Bool)+  , {-|+  A string that should be used when comparing this item+  with other items. When `falsy` the `CompletionItem.label`+  is used.+  -}+  _sortText :: (Maybe Data.Text.Text)+  , {-|+  A string that should be used when filtering a set of+  completion items. When `falsy` the `CompletionItem.label`+  is used.+  -}+  _filterText :: (Maybe Data.Text.Text)+  , {-|+  A string that should be inserted into a document when selecting+  this completion. When `falsy` the `CompletionItem.label`+  is used.++  The `insertText` is subject to interpretation by the client side.+  Some tools might not take the string literally. For example+  VS Code when code complete is requested in this example+  `con<cursor position>` and a completion item with an `insertText` of+  `console` is provided it will only insert `sole`. Therefore it is+  recommended to use `textEdit` instead since it avoids additional client+  side interpretation.+  -}+  _insertText :: (Maybe Data.Text.Text)+  , {-|+  The format of the insert text. The format applies to both the+  `insertText` property and the `newText` property of a provided+  `textEdit`. If omitted defaults to `InsertTextFormat.PlainText`.++  Please note that the insertTextFormat doesn't apply to+  `additionalTextEdits`.+  -}+  _insertTextFormat :: (Maybe Language.LSP.Protocol.Internal.Types.InsertTextFormat.InsertTextFormat)+  , {-|+  How whitespace and indentation is handled during completion+  item insertion. If not provided the clients default value depends on+  the `textDocument.completion.insertTextMode` client capability.++  @since 3.16.0+  -}+  _insertTextMode :: (Maybe Language.LSP.Protocol.Internal.Types.InsertTextMode.InsertTextMode)+  , {-|+  An `TextEdit` which is applied to a document when selecting+  this completion. When an edit is provided the value of+  `CompletionItem.insertText` is ignored.++  Most editors support two different operations when accepting a completion+  item. One is to insert a completion text and the other is to replace an+  existing text with a completion text. Since this can usually not be+  predetermined by a server it can report both ranges. Clients need to+  signal support for `InsertReplaceEdits` via the+  `textDocument.completion.insertReplaceSupport` client capability+  property.++  *Note 1:* The text edit's range as well as both ranges from an insert+  replace edit must be a [single line] and they must contain the position+  at which completion has been requested.+  *Note 2:* If an `InsertReplaceEdit` is returned the edit's insert range+  must be a prefix of the edit's replace range, that means it must be+  contained and starting at the same position.++  @since 3.16.0 additional type `InsertReplaceEdit`+  -}+  _textEdit :: (Maybe (Language.LSP.Protocol.Internal.Types.TextEdit.TextEdit Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.InsertReplaceEdit.InsertReplaceEdit))+  , {-|+  The edit text used if the completion item is part of a CompletionList and+  CompletionList defines an item default for the text edit range.++  Clients will only honor this property if they opt into completion list+  item defaults using the capability `completionList.itemDefaults`.++  If not provided and a list's default range is provided the label+  property is used as a text.++  @since 3.17.0+  -}+  _textEditText :: (Maybe Data.Text.Text)+  , {-|+  An optional array of additional `TextEdit` that are applied when+  selecting this completion. Edits must not overlap (including the same insert position)+  with the main `CompletionItem.textEdit` nor with themselves.++  Additional text edits should be used to change text unrelated to the current cursor position+  (for example adding an import statement at the top of the file if the completion item will+  insert an unqualified type).+  -}+  _additionalTextEdits :: (Maybe [Language.LSP.Protocol.Internal.Types.TextEdit.TextEdit])+  , {-|+  An optional set of characters that when pressed while this completion is active will accept it first and+  then type that character. *Note* that all commit characters should have `length=1` and that superfluous+  characters will be ignored.+  -}+  _commitCharacters :: (Maybe [Data.Text.Text])+  , {-|+  An optional `Command` that is executed *after* inserting this completion. *Note* that+  additional modifications to the current document should be described with the+  `CompletionItem.additionalTextEdits`-property.+  -}+  _command :: (Maybe Language.LSP.Protocol.Internal.Types.Command.Command)+  , {-|+  A data entry field that is preserved on a completion item between a+  `CompletionRequest`.+  -}+  _data_ :: (Maybe Data.Aeson.Value)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON CompletionItem where+  toJSON (CompletionItem arg0 arg1 arg2 arg3 arg4 arg5 arg6 arg7 arg8 arg9 arg10 arg11 arg12 arg13 arg14 arg15 arg16 arg17 arg18) = Aeson.object $ concat $  [["label" Aeson..= arg0]+    ,"labelDetails" Language.LSP.Protocol.Types.Common..=? arg1+    ,"kind" Language.LSP.Protocol.Types.Common..=? arg2+    ,"tags" Language.LSP.Protocol.Types.Common..=? arg3+    ,"detail" Language.LSP.Protocol.Types.Common..=? arg4+    ,"documentation" Language.LSP.Protocol.Types.Common..=? arg5+    ,"deprecated" Language.LSP.Protocol.Types.Common..=? arg6+    ,"preselect" Language.LSP.Protocol.Types.Common..=? arg7+    ,"sortText" Language.LSP.Protocol.Types.Common..=? arg8+    ,"filterText" Language.LSP.Protocol.Types.Common..=? arg9+    ,"insertText" Language.LSP.Protocol.Types.Common..=? arg10+    ,"insertTextFormat" Language.LSP.Protocol.Types.Common..=? arg11+    ,"insertTextMode" Language.LSP.Protocol.Types.Common..=? arg12+    ,"textEdit" Language.LSP.Protocol.Types.Common..=? arg13+    ,"textEditText" Language.LSP.Protocol.Types.Common..=? arg14+    ,"additionalTextEdits" Language.LSP.Protocol.Types.Common..=? arg15+    ,"commitCharacters" Language.LSP.Protocol.Types.Common..=? arg16+    ,"command" Language.LSP.Protocol.Types.Common..=? arg17+    ,"data" Language.LSP.Protocol.Types.Common..=? arg18]++instance Aeson.FromJSON CompletionItem where+  parseJSON = Aeson.withObject "CompletionItem" $ \arg -> CompletionItem <$> arg Aeson..: "label" <*> arg Aeson..:! "labelDetails" <*> arg Aeson..:! "kind" <*> arg Aeson..:! "tags" <*> arg Aeson..:! "detail" <*> arg Aeson..:! "documentation" <*> arg Aeson..:! "deprecated" <*> arg Aeson..:! "preselect" <*> arg Aeson..:! "sortText" <*> arg Aeson..:! "filterText" <*> arg Aeson..:! "insertText" <*> arg Aeson..:! "insertTextFormat" <*> arg Aeson..:! "insertTextMode" <*> arg Aeson..:! "textEdit" <*> arg Aeson..:! "textEditText" <*> arg Aeson..:! "additionalTextEdits" <*> arg Aeson..:! "commitCharacters" <*> arg Aeson..:! "command" <*> arg Aeson..:! "data"
+ generated/Language/LSP/Protocol/Internal/Types/CompletionItemKind.hs view
@@ -0,0 +1,207 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CompletionItemKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+The kind of a completion entry.+-}+data CompletionItemKind = +    {-|++  -}+  CompletionItemKind_Text+  | {-|++  -}+  CompletionItemKind_Method+  | {-|++  -}+  CompletionItemKind_Function+  | {-|++  -}+  CompletionItemKind_Constructor+  | {-|++  -}+  CompletionItemKind_Field+  | {-|++  -}+  CompletionItemKind_Variable+  | {-|++  -}+  CompletionItemKind_Class+  | {-|++  -}+  CompletionItemKind_Interface+  | {-|++  -}+  CompletionItemKind_Module+  | {-|++  -}+  CompletionItemKind_Property+  | {-|++  -}+  CompletionItemKind_Unit+  | {-|++  -}+  CompletionItemKind_Value+  | {-|++  -}+  CompletionItemKind_Enum+  | {-|++  -}+  CompletionItemKind_Keyword+  | {-|++  -}+  CompletionItemKind_Snippet+  | {-|++  -}+  CompletionItemKind_Color+  | {-|++  -}+  CompletionItemKind_File+  | {-|++  -}+  CompletionItemKind_Reference+  | {-|++  -}+  CompletionItemKind_Folder+  | {-|++  -}+  CompletionItemKind_EnumMember+  | {-|++  -}+  CompletionItemKind_Constant+  | {-|++  -}+  CompletionItemKind_Struct+  | {-|++  -}+  CompletionItemKind_Event+  | {-|++  -}+  CompletionItemKind_Operator+  | {-|++  -}+  CompletionItemKind_TypeParameter+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)+  deriving ( Aeson.ToJSON+  , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum CompletionItemKind Language.LSP.Protocol.Types.Common.UInt)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum CompletionItemKind where+  knownValues = Data.Set.fromList [CompletionItemKind_Text+    ,CompletionItemKind_Method+    ,CompletionItemKind_Function+    ,CompletionItemKind_Constructor+    ,CompletionItemKind_Field+    ,CompletionItemKind_Variable+    ,CompletionItemKind_Class+    ,CompletionItemKind_Interface+    ,CompletionItemKind_Module+    ,CompletionItemKind_Property+    ,CompletionItemKind_Unit+    ,CompletionItemKind_Value+    ,CompletionItemKind_Enum+    ,CompletionItemKind_Keyword+    ,CompletionItemKind_Snippet+    ,CompletionItemKind_Color+    ,CompletionItemKind_File+    ,CompletionItemKind_Reference+    ,CompletionItemKind_Folder+    ,CompletionItemKind_EnumMember+    ,CompletionItemKind_Constant+    ,CompletionItemKind_Struct+    ,CompletionItemKind_Event+    ,CompletionItemKind_Operator+    ,CompletionItemKind_TypeParameter]+  type EnumBaseType CompletionItemKind = Language.LSP.Protocol.Types.Common.UInt+  toEnumBaseType CompletionItemKind_Text = 1+  toEnumBaseType CompletionItemKind_Method = 2+  toEnumBaseType CompletionItemKind_Function = 3+  toEnumBaseType CompletionItemKind_Constructor = 4+  toEnumBaseType CompletionItemKind_Field = 5+  toEnumBaseType CompletionItemKind_Variable = 6+  toEnumBaseType CompletionItemKind_Class = 7+  toEnumBaseType CompletionItemKind_Interface = 8+  toEnumBaseType CompletionItemKind_Module = 9+  toEnumBaseType CompletionItemKind_Property = 10+  toEnumBaseType CompletionItemKind_Unit = 11+  toEnumBaseType CompletionItemKind_Value = 12+  toEnumBaseType CompletionItemKind_Enum = 13+  toEnumBaseType CompletionItemKind_Keyword = 14+  toEnumBaseType CompletionItemKind_Snippet = 15+  toEnumBaseType CompletionItemKind_Color = 16+  toEnumBaseType CompletionItemKind_File = 17+  toEnumBaseType CompletionItemKind_Reference = 18+  toEnumBaseType CompletionItemKind_Folder = 19+  toEnumBaseType CompletionItemKind_EnumMember = 20+  toEnumBaseType CompletionItemKind_Constant = 21+  toEnumBaseType CompletionItemKind_Struct = 22+  toEnumBaseType CompletionItemKind_Event = 23+  toEnumBaseType CompletionItemKind_Operator = 24+  toEnumBaseType CompletionItemKind_TypeParameter = 25+  fromEnumBaseType 1 = pure CompletionItemKind_Text+  fromEnumBaseType 2 = pure CompletionItemKind_Method+  fromEnumBaseType 3 = pure CompletionItemKind_Function+  fromEnumBaseType 4 = pure CompletionItemKind_Constructor+  fromEnumBaseType 5 = pure CompletionItemKind_Field+  fromEnumBaseType 6 = pure CompletionItemKind_Variable+  fromEnumBaseType 7 = pure CompletionItemKind_Class+  fromEnumBaseType 8 = pure CompletionItemKind_Interface+  fromEnumBaseType 9 = pure CompletionItemKind_Module+  fromEnumBaseType 10 = pure CompletionItemKind_Property+  fromEnumBaseType 11 = pure CompletionItemKind_Unit+  fromEnumBaseType 12 = pure CompletionItemKind_Value+  fromEnumBaseType 13 = pure CompletionItemKind_Enum+  fromEnumBaseType 14 = pure CompletionItemKind_Keyword+  fromEnumBaseType 15 = pure CompletionItemKind_Snippet+  fromEnumBaseType 16 = pure CompletionItemKind_Color+  fromEnumBaseType 17 = pure CompletionItemKind_File+  fromEnumBaseType 18 = pure CompletionItemKind_Reference+  fromEnumBaseType 19 = pure CompletionItemKind_Folder+  fromEnumBaseType 20 = pure CompletionItemKind_EnumMember+  fromEnumBaseType 21 = pure CompletionItemKind_Constant+  fromEnumBaseType 22 = pure CompletionItemKind_Struct+  fromEnumBaseType 23 = pure CompletionItemKind_Event+  fromEnumBaseType 24 = pure CompletionItemKind_Operator+  fromEnumBaseType 25 = pure CompletionItemKind_TypeParameter+  fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/CompletionItemLabelDetails.hs view
@@ -0,0 +1,42 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CompletionItemLabelDetails where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+Additional details for a completion item label.++@since 3.17.0+-}+data CompletionItemLabelDetails = CompletionItemLabelDetails +  { {-|+  An optional string which is rendered less prominently directly after `CompletionItem.label`,+  without any spacing. Should be used for function signatures and type annotations.+  -}+  _detail :: (Maybe Data.Text.Text)+  , {-|+  An optional string which is rendered less prominently after `CompletionItem.detail`. Should be used+  for fully qualified names and file paths.+  -}+  _description :: (Maybe Data.Text.Text)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON CompletionItemLabelDetails where+  toJSON (CompletionItemLabelDetails arg0 arg1) = Aeson.object $ concat $  ["detail" Language.LSP.Protocol.Types.Common..=? arg0+    ,"description" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON CompletionItemLabelDetails where+  parseJSON = Aeson.withObject "CompletionItemLabelDetails" $ \arg -> CompletionItemLabelDetails <$> arg Aeson..:! "detail" <*> arg Aeson..:! "description"
+ generated/Language/LSP/Protocol/Internal/Types/CompletionItemTag.hs view
@@ -0,0 +1,42 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CompletionItemTag where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+Completion item tags are extra annotations that tweak the rendering of a completion+item.++@since 3.15.0+-}+data CompletionItemTag = +    {-|+  Render a completion as obsolete, usually using a strike-out.+  -}+  CompletionItemTag_Deprecated+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)+  deriving ( Aeson.ToJSON+  , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum CompletionItemTag Language.LSP.Protocol.Types.Common.UInt)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum CompletionItemTag where+  knownValues = Data.Set.fromList [CompletionItemTag_Deprecated]+  type EnumBaseType CompletionItemTag = Language.LSP.Protocol.Types.Common.UInt+  toEnumBaseType CompletionItemTag_Deprecated = 1+  fromEnumBaseType 1 = pure CompletionItemTag_Deprecated+  fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/CompletionList.hs view
@@ -0,0 +1,65 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CompletionList where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row as Row+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.CompletionItem+import qualified Language.LSP.Protocol.Internal.Types.InsertTextFormat+import qualified Language.LSP.Protocol.Internal.Types.InsertTextMode+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|+Represents a collection of `CompletionItem` to be presented+in the editor.+-}+data CompletionList = CompletionList +  { {-|+  This list it not complete. Further typing results in recomputing this list.++  Recomputed lists have all their items replaced (not appended) in the+  incomplete completion sessions.+  -}+  _isIncomplete :: Bool+  , {-|+  In many cases the items of an actual completion result share the same+  value for properties like `commitCharacters` or the range of a text+  edit. A completion list can therefore define item defaults which will+  be used if a completion item itself doesn't specify the value.++  If a completion list specifies a default value and a completion item+  also specifies a corresponding value the one from the item is used.++  Servers are only allowed to return default values if the client+  signals support for this via the `completionList.itemDefaults`+  capability.++  @since 3.17.0+  -}+  _itemDefaults :: (Maybe (Row.Rec ("commitCharacters" Row..== (Maybe [Data.Text.Text]) Row..+ ("editRange" Row..== (Maybe (Language.LSP.Protocol.Internal.Types.Range.Range Language.LSP.Protocol.Types.Common.|? (Row.Rec ("insert" Row..== Language.LSP.Protocol.Internal.Types.Range.Range Row..+ ("replace" Row..== Language.LSP.Protocol.Internal.Types.Range.Range Row..+ Row.Empty))))) Row..+ ("insertTextFormat" Row..== (Maybe Language.LSP.Protocol.Internal.Types.InsertTextFormat.InsertTextFormat) Row..+ ("insertTextMode" Row..== (Maybe Language.LSP.Protocol.Internal.Types.InsertTextMode.InsertTextMode) Row..+ ("data" Row..== (Maybe Data.Aeson.Value) Row..+ Row.Empty)))))))+  , {-|+  The completion items.+  -}+  _items :: [Language.LSP.Protocol.Internal.Types.CompletionItem.CompletionItem]+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON CompletionList where+  toJSON (CompletionList arg0 arg1 arg2) = Aeson.object $ concat $  [["isIncomplete" Aeson..= arg0]+    ,"itemDefaults" Language.LSP.Protocol.Types.Common..=? arg1+    ,["items" Aeson..= arg2]]++instance Aeson.FromJSON CompletionList where+  parseJSON = Aeson.withObject "CompletionList" $ \arg -> CompletionList <$> arg Aeson..: "isIncomplete" <*> arg Aeson..:! "itemDefaults" <*> arg Aeson..: "items"
+ generated/Language/LSP/Protocol/Internal/Types/CompletionOptions.hs view
@@ -0,0 +1,72 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CompletionOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row as Row+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+Completion options.+-}+data CompletionOptions = CompletionOptions +  { {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  , {-|+  Most tools trigger completion request automatically without explicitly requesting+  it using a keyboard shortcut (e.g. Ctrl+Space). Typically they do so when the user+  starts to type an identifier. For example if the user types `c` in a JavaScript file+  code complete will automatically pop up present `console` besides others as a+  completion item. Characters that make up identifiers don't need to be listed here.++  If code complete should automatically be trigger on characters not being valid inside+  an identifier (for example `.` in JavaScript) list them in `triggerCharacters`.+  -}+  _triggerCharacters :: (Maybe [Data.Text.Text])+  , {-|+  The list of all possible characters that commit a completion. This field can be used+  if clients don't support individual commit characters per completion item. See+  `ClientCapabilities.textDocument.completion.completionItem.commitCharactersSupport`++  If a server provides both `allCommitCharacters` and commit characters on an individual+  completion item the ones on the completion item win.++  @since 3.2.0+  -}+  _allCommitCharacters :: (Maybe [Data.Text.Text])+  , {-|+  The server provides support to resolve additional+  information for a completion item.+  -}+  _resolveProvider :: (Maybe Bool)+  , {-|+  The server supports the following `CompletionItem` specific+  capabilities.++  @since 3.17.0+  -}+  _completionItem :: (Maybe (Row.Rec ("labelDetailsSupport" Row..== (Maybe Bool) Row..+ Row.Empty)))+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON CompletionOptions where+  toJSON (CompletionOptions arg0 arg1 arg2 arg3 arg4) = Aeson.object $ concat $  ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0+    ,"triggerCharacters" Language.LSP.Protocol.Types.Common..=? arg1+    ,"allCommitCharacters" Language.LSP.Protocol.Types.Common..=? arg2+    ,"resolveProvider" Language.LSP.Protocol.Types.Common..=? arg3+    ,"completionItem" Language.LSP.Protocol.Types.Common..=? arg4]++instance Aeson.FromJSON CompletionOptions where+  parseJSON = Aeson.withObject "CompletionOptions" $ \arg -> CompletionOptions <$> arg Aeson..:! "workDoneProgress" <*> arg Aeson..:! "triggerCharacters" <*> arg Aeson..:! "allCommitCharacters" <*> arg Aeson..:! "resolveProvider" <*> arg Aeson..:! "completionItem"
+ generated/Language/LSP/Protocol/Internal/Types/CompletionParams.hs view
@@ -0,0 +1,58 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CompletionParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.CompletionContext+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+Completion parameters+-}+data CompletionParams = CompletionParams +  { {-|+  The text document.+  -}+  _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+  , {-|+  The position inside the text document.+  -}+  _position :: Language.LSP.Protocol.Internal.Types.Position.Position+  , {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  An optional token that a server can use to report partial results (e.g. streaming) to+  the client.+  -}+  _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  The completion context. This is only available it the client specifies+  to send this using the client capability `textDocument.completion.contextSupport === true`+  -}+  _context :: (Maybe Language.LSP.Protocol.Internal.Types.CompletionContext.CompletionContext)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON CompletionParams where+  toJSON (CompletionParams arg0 arg1 arg2 arg3 arg4) = Aeson.object $ concat $  [["textDocument" Aeson..= arg0]+    ,["position" Aeson..= arg1]+    ,"workDoneToken" Language.LSP.Protocol.Types.Common..=? arg2+    ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg3+    ,"context" Language.LSP.Protocol.Types.Common..=? arg4]++instance Aeson.FromJSON CompletionParams where+  parseJSON = Aeson.withObject "CompletionParams" $ \arg -> CompletionParams <$> arg Aeson..: "textDocument" <*> arg Aeson..: "position" <*> arg Aeson..:! "workDoneToken" <*> arg Aeson..:! "partialResultToken" <*> arg Aeson..:! "context"
+ generated/Language/LSP/Protocol/Internal/Types/CompletionRegistrationOptions.hs view
@@ -0,0 +1,79 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CompletionRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row as Row+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+Registration options for a `CompletionRequest`.+-}+data CompletionRegistrationOptions = CompletionRegistrationOptions +  { {-|+  A document selector to identify the scope of the registration. If set to null+  the document selector provided on the client side will be used.+  -}+  _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  , {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  , {-|+  Most tools trigger completion request automatically without explicitly requesting+  it using a keyboard shortcut (e.g. Ctrl+Space). Typically they do so when the user+  starts to type an identifier. For example if the user types `c` in a JavaScript file+  code complete will automatically pop up present `console` besides others as a+  completion item. Characters that make up identifiers don't need to be listed here.++  If code complete should automatically be trigger on characters not being valid inside+  an identifier (for example `.` in JavaScript) list them in `triggerCharacters`.+  -}+  _triggerCharacters :: (Maybe [Data.Text.Text])+  , {-|+  The list of all possible characters that commit a completion. This field can be used+  if clients don't support individual commit characters per completion item. See+  `ClientCapabilities.textDocument.completion.completionItem.commitCharactersSupport`++  If a server provides both `allCommitCharacters` and commit characters on an individual+  completion item the ones on the completion item win.++  @since 3.2.0+  -}+  _allCommitCharacters :: (Maybe [Data.Text.Text])+  , {-|+  The server provides support to resolve additional+  information for a completion item.+  -}+  _resolveProvider :: (Maybe Bool)+  , {-|+  The server supports the following `CompletionItem` specific+  capabilities.++  @since 3.17.0+  -}+  _completionItem :: (Maybe (Row.Rec ("labelDetailsSupport" Row..== (Maybe Bool) Row..+ Row.Empty)))+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON CompletionRegistrationOptions where+  toJSON (CompletionRegistrationOptions arg0 arg1 arg2 arg3 arg4 arg5) = Aeson.object $ concat $  [["documentSelector" Aeson..= arg0]+    ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1+    ,"triggerCharacters" Language.LSP.Protocol.Types.Common..=? arg2+    ,"allCommitCharacters" Language.LSP.Protocol.Types.Common..=? arg3+    ,"resolveProvider" Language.LSP.Protocol.Types.Common..=? arg4+    ,"completionItem" Language.LSP.Protocol.Types.Common..=? arg5]++instance Aeson.FromJSON CompletionRegistrationOptions where+  parseJSON = Aeson.withObject "CompletionRegistrationOptions" $ \arg -> CompletionRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Aeson..:! "workDoneProgress" <*> arg Aeson..:! "triggerCharacters" <*> arg Aeson..:! "allCommitCharacters" <*> arg Aeson..:! "resolveProvider" <*> arg Aeson..:! "completionItem"
+ generated/Language/LSP/Protocol/Internal/Types/CompletionTriggerKind.hs view
@@ -0,0 +1,55 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CompletionTriggerKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+How a completion was triggered+-}+data CompletionTriggerKind = +    {-|+  Completion was triggered by typing an identifier (24x7 code+  complete), manual invocation (e.g Ctrl+Space) or via API.+  -}+  CompletionTriggerKind_Invoked+  | {-|+  Completion was triggered by a trigger character specified by+  the `triggerCharacters` properties of the `CompletionRegistrationOptions`.+  -}+  CompletionTriggerKind_TriggerCharacter+  | {-|+  Completion was re-triggered as current completion list is incomplete+  -}+  CompletionTriggerKind_TriggerForIncompleteCompletions+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)+  deriving ( Aeson.ToJSON+  , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum CompletionTriggerKind Language.LSP.Protocol.Types.Common.UInt)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum CompletionTriggerKind where+  knownValues = Data.Set.fromList [CompletionTriggerKind_Invoked+    ,CompletionTriggerKind_TriggerCharacter+    ,CompletionTriggerKind_TriggerForIncompleteCompletions]+  type EnumBaseType CompletionTriggerKind = Language.LSP.Protocol.Types.Common.UInt+  toEnumBaseType CompletionTriggerKind_Invoked = 1+  toEnumBaseType CompletionTriggerKind_TriggerCharacter = 2+  toEnumBaseType CompletionTriggerKind_TriggerForIncompleteCompletions = 3+  fromEnumBaseType 1 = pure CompletionTriggerKind_Invoked+  fromEnumBaseType 2 = pure CompletionTriggerKind_TriggerCharacter+  fromEnumBaseType 3 = pure CompletionTriggerKind_TriggerForIncompleteCompletions+  fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/ConfigurationItem.hs view
@@ -0,0 +1,38 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ConfigurationItem where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data ConfigurationItem = ConfigurationItem +  { {-|+  The scope to get the configuration section for.+  -}+  _scopeUri :: (Maybe Data.Text.Text)+  , {-|+  The configuration section asked for.+  -}+  _section :: (Maybe Data.Text.Text)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON ConfigurationItem where+  toJSON (ConfigurationItem arg0 arg1) = Aeson.object $ concat $  ["scopeUri" Language.LSP.Protocol.Types.Common..=? arg0+    ,"section" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON ConfigurationItem where+  parseJSON = Aeson.withObject "ConfigurationItem" $ \arg -> ConfigurationItem <$> arg Aeson..:! "scopeUri" <*> arg Aeson..:! "section"
+ generated/Language/LSP/Protocol/Internal/Types/ConfigurationParams.hs view
@@ -0,0 +1,33 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ConfigurationParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ConfigurationItem+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters of a configuration request.+-}+data ConfigurationParams = ConfigurationParams +  { {-|++  -}+  _items :: [Language.LSP.Protocol.Internal.Types.ConfigurationItem.ConfigurationItem]+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON ConfigurationParams where+  toJSON (ConfigurationParams arg0) = Aeson.object $ concat $  [["items" Aeson..= arg0]]++instance Aeson.FromJSON ConfigurationParams where+  parseJSON = Aeson.withObject "ConfigurationParams" $ \arg -> ConfigurationParams <$> arg Aeson..: "items"
+ generated/Language/LSP/Protocol/Internal/Types/CreateFile.hs view
@@ -0,0 +1,53 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CreateFile where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ChangeAnnotationIdentifier+import qualified Language.LSP.Protocol.Internal.Types.CreateFileOptions+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Singletons+import qualified Language.LSP.Protocol.Types.Uri++{-|+Create file operation.+-}+data CreateFile = CreateFile +  { {-|+  An optional annotation identifier describing the operation.++  @since 3.16.0+  -}+  _annotationId :: (Maybe Language.LSP.Protocol.Internal.Types.ChangeAnnotationIdentifier.ChangeAnnotationIdentifier)+  , {-|+  A create+  -}+  _kind :: (Language.LSP.Protocol.Types.Singletons.AString "create")+  , {-|+  The resource to create.+  -}+  _uri :: Language.LSP.Protocol.Types.Uri.Uri+  , {-|+  Additional options+  -}+  _options :: (Maybe Language.LSP.Protocol.Internal.Types.CreateFileOptions.CreateFileOptions)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON CreateFile where+  toJSON (CreateFile arg0 arg1 arg2 arg3) = Aeson.object $ concat $  ["annotationId" Language.LSP.Protocol.Types.Common..=? arg0+    ,["kind" Aeson..= arg1]+    ,["uri" Aeson..= arg2]+    ,"options" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON CreateFile where+  parseJSON = Aeson.withObject "CreateFile" $ \arg -> CreateFile <$> arg Aeson..:! "annotationId" <*> arg Aeson..: "kind" <*> arg Aeson..: "uri" <*> arg Aeson..:! "options"
+ generated/Language/LSP/Protocol/Internal/Types/CreateFileOptions.hs view
@@ -0,0 +1,37 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CreateFileOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Options to create a file.+-}+data CreateFileOptions = CreateFileOptions +  { {-|+  Overwrite existing file. Overwrite wins over `ignoreIfExists`+  -}+  _overwrite :: (Maybe Bool)+  , {-|+  Ignore if exists.+  -}+  _ignoreIfExists :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON CreateFileOptions where+  toJSON (CreateFileOptions arg0 arg1) = Aeson.object $ concat $  ["overwrite" Language.LSP.Protocol.Types.Common..=? arg0+    ,"ignoreIfExists" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON CreateFileOptions where+  parseJSON = Aeson.withObject "CreateFileOptions" $ \arg -> CreateFileOptions <$> arg Aeson..:! "overwrite" <*> arg Aeson..:! "ignoreIfExists"
+ generated/Language/LSP/Protocol/Internal/Types/CreateFilesParams.hs view
@@ -0,0 +1,36 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.CreateFilesParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.FileCreate+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters sent in notifications/requests for user-initiated creation of+files.++@since 3.16.0+-}+data CreateFilesParams = CreateFilesParams +  { {-|+  An array of all files/folders created in this operation.+  -}+  _files :: [Language.LSP.Protocol.Internal.Types.FileCreate.FileCreate]+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON CreateFilesParams where+  toJSON (CreateFilesParams arg0) = Aeson.object $ concat $  [["files" Aeson..= arg0]]++instance Aeson.FromJSON CreateFilesParams where+  parseJSON = Aeson.withObject "CreateFilesParams" $ \arg -> CreateFilesParams <$> arg Aeson..: "files"
+ generated/Language/LSP/Protocol/Internal/Types/Declaration.hs view
@@ -0,0 +1,23 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.Declaration where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Location+import qualified Language.LSP.Protocol.Types.Common++{-|+The declaration of a symbol representation as one or many `Location`.+-}+newtype Declaration = Declaration (Language.LSP.Protocol.Internal.Types.Location.Location Language.LSP.Protocol.Types.Common.|? [Language.LSP.Protocol.Internal.Types.Location.Location])+  deriving newtype (Aeson.ToJSON, Aeson.FromJSON)+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)
+ generated/Language/LSP/Protocol/Internal/Types/DeclarationClientCapabilities.hs view
@@ -0,0 +1,39 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DeclarationClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.14.0+-}+data DeclarationClientCapabilities = DeclarationClientCapabilities +  { {-|+  Whether declaration supports dynamic registration. If this is set to `true`+  the client supports the new `DeclarationRegistrationOptions` return value+  for the corresponding server capability as well.+  -}+  _dynamicRegistration :: (Maybe Bool)+  , {-|+  The client supports additional metadata in the form of declaration links.+  -}+  _linkSupport :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DeclarationClientCapabilities where+  toJSON (DeclarationClientCapabilities arg0 arg1) = Aeson.object $ concat $  ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+    ,"linkSupport" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON DeclarationClientCapabilities where+  parseJSON = Aeson.withObject "DeclarationClientCapabilities" $ \arg -> DeclarationClientCapabilities <$> arg Aeson..:! "dynamicRegistration" <*> arg Aeson..:! "linkSupport"
+ generated/Language/LSP/Protocol/Internal/Types/DeclarationLink.hs view
@@ -0,0 +1,28 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DeclarationLink where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.LocationLink++{-|+Information about where a symbol is declared.++Provides additional metadata over normal `Location` declarations, including the range of+the declaring symbol.++Servers should prefer returning `DeclarationLink` over `Declaration` if supported+by the client.+-}+newtype DeclarationLink = DeclarationLink Language.LSP.Protocol.Internal.Types.LocationLink.LocationLink+  deriving newtype (Aeson.ToJSON, Aeson.FromJSON)+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)
+ generated/Language/LSP/Protocol/Internal/Types/DeclarationOptions.hs view
@@ -0,0 +1,32 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DeclarationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data DeclarationOptions = DeclarationOptions +  { {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DeclarationOptions where+  toJSON (DeclarationOptions arg0) = Aeson.object $ concat $  ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON DeclarationOptions where+  parseJSON = Aeson.withObject "DeclarationOptions" $ \arg -> DeclarationOptions <$> arg Aeson..:! "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/DeclarationParams.hs view
@@ -0,0 +1,51 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DeclarationParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data DeclarationParams = DeclarationParams +  { {-|+  The text document.+  -}+  _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+  , {-|+  The position inside the text document.+  -}+  _position :: Language.LSP.Protocol.Internal.Types.Position.Position+  , {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  An optional token that a server can use to report partial results (e.g. streaming) to+  the client.+  -}+  _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DeclarationParams where+  toJSON (DeclarationParams arg0 arg1 arg2 arg3) = Aeson.object $ concat $  [["textDocument" Aeson..= arg0]+    ,["position" Aeson..= arg1]+    ,"workDoneToken" Language.LSP.Protocol.Types.Common..=? arg2+    ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON DeclarationParams where+  parseJSON = Aeson.withObject "DeclarationParams" $ \arg -> DeclarationParams <$> arg Aeson..: "textDocument" <*> arg Aeson..: "position" <*> arg Aeson..:! "workDoneToken" <*> arg Aeson..:! "partialResultToken"
+ generated/Language/LSP/Protocol/Internal/Types/DeclarationRegistrationOptions.hs view
@@ -0,0 +1,46 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DeclarationRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data DeclarationRegistrationOptions = DeclarationRegistrationOptions +  { {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  , {-|+  A document selector to identify the scope of the registration. If set to null+  the document selector provided on the client side will be used.+  -}+  _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  , {-|+  The id used to register the request. The id can be used to deregister+  the request again. See also Registration#id.+  -}+  _id :: (Maybe Data.Text.Text)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DeclarationRegistrationOptions where+  toJSON (DeclarationRegistrationOptions arg0 arg1 arg2) = Aeson.object $ concat $  ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0+    ,["documentSelector" Aeson..= arg1]+    ,"id" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON DeclarationRegistrationOptions where+  parseJSON = Aeson.withObject "DeclarationRegistrationOptions" $ \arg -> DeclarationRegistrationOptions <$> arg Aeson..:! "workDoneProgress" <*> arg Aeson..: "documentSelector" <*> arg Aeson..:! "id"
+ generated/Language/LSP/Protocol/Internal/Types/Definition.hs view
@@ -0,0 +1,28 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.Definition where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Location+import qualified Language.LSP.Protocol.Types.Common++{-|+The definition of a symbol represented as one or many `Location`.+For most programming languages there is only one location at which a symbol is+defined.++Servers should prefer returning `DefinitionLink` over `Definition` if supported+by the client.+-}+newtype Definition = Definition (Language.LSP.Protocol.Internal.Types.Location.Location Language.LSP.Protocol.Types.Common.|? [Language.LSP.Protocol.Internal.Types.Location.Location])+  deriving newtype (Aeson.ToJSON, Aeson.FromJSON)+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)
+ generated/Language/LSP/Protocol/Internal/Types/DefinitionClientCapabilities.hs view
@@ -0,0 +1,39 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DefinitionClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Client Capabilities for a `DefinitionRequest`.+-}+data DefinitionClientCapabilities = DefinitionClientCapabilities +  { {-|+  Whether definition supports dynamic registration.+  -}+  _dynamicRegistration :: (Maybe Bool)+  , {-|+  The client supports additional metadata in the form of definition links.++  @since 3.14.0+  -}+  _linkSupport :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DefinitionClientCapabilities where+  toJSON (DefinitionClientCapabilities arg0 arg1) = Aeson.object $ concat $  ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+    ,"linkSupport" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON DefinitionClientCapabilities where+  parseJSON = Aeson.withObject "DefinitionClientCapabilities" $ \arg -> DefinitionClientCapabilities <$> arg Aeson..:! "dynamicRegistration" <*> arg Aeson..:! "linkSupport"
+ generated/Language/LSP/Protocol/Internal/Types/DefinitionLink.hs view
@@ -0,0 +1,25 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DefinitionLink where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.LocationLink++{-|+Information about where a symbol is defined.++Provides additional metadata over normal `Location` definitions, including the range of+the defining symbol+-}+newtype DefinitionLink = DefinitionLink Language.LSP.Protocol.Internal.Types.LocationLink.LocationLink+  deriving newtype (Aeson.ToJSON, Aeson.FromJSON)+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)
+ generated/Language/LSP/Protocol/Internal/Types/DefinitionOptions.hs view
@@ -0,0 +1,32 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DefinitionOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Server Capabilities for a `DefinitionRequest`.+-}+data DefinitionOptions = DefinitionOptions +  { {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DefinitionOptions where+  toJSON (DefinitionOptions arg0) = Aeson.object $ concat $  ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON DefinitionOptions where+  parseJSON = Aeson.withObject "DefinitionOptions" $ \arg -> DefinitionOptions <$> arg Aeson..:! "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/DefinitionParams.hs view
@@ -0,0 +1,51 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DefinitionParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+Parameters for a `DefinitionRequest`.+-}+data DefinitionParams = DefinitionParams +  { {-|+  The text document.+  -}+  _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+  , {-|+  The position inside the text document.+  -}+  _position :: Language.LSP.Protocol.Internal.Types.Position.Position+  , {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  An optional token that a server can use to report partial results (e.g. streaming) to+  the client.+  -}+  _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DefinitionParams where+  toJSON (DefinitionParams arg0 arg1 arg2 arg3) = Aeson.object $ concat $  [["textDocument" Aeson..= arg0]+    ,["position" Aeson..= arg1]+    ,"workDoneToken" Language.LSP.Protocol.Types.Common..=? arg2+    ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON DefinitionParams where+  parseJSON = Aeson.withObject "DefinitionParams" $ \arg -> DefinitionParams <$> arg Aeson..: "textDocument" <*> arg Aeson..: "position" <*> arg Aeson..:! "workDoneToken" <*> arg Aeson..:! "partialResultToken"
+ generated/Language/LSP/Protocol/Internal/Types/DefinitionRegistrationOptions.hs view
@@ -0,0 +1,39 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DefinitionRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+Registration options for a `DefinitionRequest`.+-}+data DefinitionRegistrationOptions = DefinitionRegistrationOptions +  { {-|+  A document selector to identify the scope of the registration. If set to null+  the document selector provided on the client side will be used.+  -}+  _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  , {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DefinitionRegistrationOptions where+  toJSON (DefinitionRegistrationOptions arg0 arg1) = Aeson.object $ concat $  [["documentSelector" Aeson..= arg0]+    ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON DefinitionRegistrationOptions where+  parseJSON = Aeson.withObject "DefinitionRegistrationOptions" $ \arg -> DefinitionRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Aeson..:! "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/DeleteFile.hs view
@@ -0,0 +1,53 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DeleteFile where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ChangeAnnotationIdentifier+import qualified Language.LSP.Protocol.Internal.Types.DeleteFileOptions+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Singletons+import qualified Language.LSP.Protocol.Types.Uri++{-|+Delete file operation+-}+data DeleteFile = DeleteFile +  { {-|+  An optional annotation identifier describing the operation.++  @since 3.16.0+  -}+  _annotationId :: (Maybe Language.LSP.Protocol.Internal.Types.ChangeAnnotationIdentifier.ChangeAnnotationIdentifier)+  , {-|+  A delete+  -}+  _kind :: (Language.LSP.Protocol.Types.Singletons.AString "delete")+  , {-|+  The file to delete.+  -}+  _uri :: Language.LSP.Protocol.Types.Uri.Uri+  , {-|+  Delete options.+  -}+  _options :: (Maybe Language.LSP.Protocol.Internal.Types.DeleteFileOptions.DeleteFileOptions)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DeleteFile where+  toJSON (DeleteFile arg0 arg1 arg2 arg3) = Aeson.object $ concat $  ["annotationId" Language.LSP.Protocol.Types.Common..=? arg0+    ,["kind" Aeson..= arg1]+    ,["uri" Aeson..= arg2]+    ,"options" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON DeleteFile where+  parseJSON = Aeson.withObject "DeleteFile" $ \arg -> DeleteFile <$> arg Aeson..:! "annotationId" <*> arg Aeson..: "kind" <*> arg Aeson..: "uri" <*> arg Aeson..:! "options"
+ generated/Language/LSP/Protocol/Internal/Types/DeleteFileOptions.hs view
@@ -0,0 +1,37 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DeleteFileOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Delete file options+-}+data DeleteFileOptions = DeleteFileOptions +  { {-|+  Delete the content recursively if a folder is denoted.+  -}+  _recursive :: (Maybe Bool)+  , {-|+  Ignore the operation if the file doesn't exist.+  -}+  _ignoreIfNotExists :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DeleteFileOptions where+  toJSON (DeleteFileOptions arg0 arg1) = Aeson.object $ concat $  ["recursive" Language.LSP.Protocol.Types.Common..=? arg0+    ,"ignoreIfNotExists" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON DeleteFileOptions where+  parseJSON = Aeson.withObject "DeleteFileOptions" $ \arg -> DeleteFileOptions <$> arg Aeson..:! "recursive" <*> arg Aeson..:! "ignoreIfNotExists"
+ generated/Language/LSP/Protocol/Internal/Types/DeleteFilesParams.hs view
@@ -0,0 +1,36 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DeleteFilesParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.FileDelete+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters sent in notifications/requests for user-initiated deletes of+files.++@since 3.16.0+-}+data DeleteFilesParams = DeleteFilesParams +  { {-|+  An array of all files/folders deleted in this operation.+  -}+  _files :: [Language.LSP.Protocol.Internal.Types.FileDelete.FileDelete]+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DeleteFilesParams where+  toJSON (DeleteFilesParams arg0) = Aeson.object $ concat $  [["files" Aeson..= arg0]]++instance Aeson.FromJSON DeleteFilesParams where+  parseJSON = Aeson.withObject "DeleteFilesParams" $ \arg -> DeleteFilesParams <$> arg Aeson..: "files"
+ generated/Language/LSP/Protocol/Internal/Types/Diagnostic.hs view
@@ -0,0 +1,92 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.Diagnostic where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.CodeDescription+import qualified Language.LSP.Protocol.Internal.Types.DiagnosticRelatedInformation+import qualified Language.LSP.Protocol.Internal.Types.DiagnosticSeverity+import qualified Language.LSP.Protocol.Internal.Types.DiagnosticTag+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|+Represents a diagnostic, such as a compiler error or warning. Diagnostic objects+are only valid in the scope of a resource.+-}+data Diagnostic = Diagnostic +  { {-|+  The range at which the message applies+  -}+  _range :: Language.LSP.Protocol.Internal.Types.Range.Range+  , {-|+  The diagnostic's severity. Can be omitted. If omitted it is up to the+  client to interpret diagnostics as error, warning, info or hint.+  -}+  _severity :: (Maybe Language.LSP.Protocol.Internal.Types.DiagnosticSeverity.DiagnosticSeverity)+  , {-|+  The diagnostic's code, which usually appear in the user interface.+  -}+  _code :: (Maybe (Language.LSP.Protocol.Types.Common.Int32 Language.LSP.Protocol.Types.Common.|? Data.Text.Text))+  , {-|+  An optional property to describe the error code.+  Requires the code field (above) to be present/not null.++  @since 3.16.0+  -}+  _codeDescription :: (Maybe Language.LSP.Protocol.Internal.Types.CodeDescription.CodeDescription)+  , {-|+  A human-readable string describing the source of this+  diagnostic, e.g. 'typescript' or 'super lint'. It usually+  appears in the user interface.+  -}+  _source :: (Maybe Data.Text.Text)+  , {-|+  The diagnostic's message. It usually appears in the user interface+  -}+  _message :: Data.Text.Text+  , {-|+  Additional metadata about the diagnostic.++  @since 3.15.0+  -}+  _tags :: (Maybe [Language.LSP.Protocol.Internal.Types.DiagnosticTag.DiagnosticTag])+  , {-|+  An array of related diagnostic information, e.g. when symbol-names within+  a scope collide all definitions can be marked via this property.+  -}+  _relatedInformation :: (Maybe [Language.LSP.Protocol.Internal.Types.DiagnosticRelatedInformation.DiagnosticRelatedInformation])+  , {-|+  A data entry field that is preserved between a `textDocument/publishDiagnostics`+  notification and `textDocument/codeAction` request.++  @since 3.16.0+  -}+  _data_ :: (Maybe Data.Aeson.Value)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON Diagnostic where+  toJSON (Diagnostic arg0 arg1 arg2 arg3 arg4 arg5 arg6 arg7 arg8) = Aeson.object $ concat $  [["range" Aeson..= arg0]+    ,"severity" Language.LSP.Protocol.Types.Common..=? arg1+    ,"code" Language.LSP.Protocol.Types.Common..=? arg2+    ,"codeDescription" Language.LSP.Protocol.Types.Common..=? arg3+    ,"source" Language.LSP.Protocol.Types.Common..=? arg4+    ,["message" Aeson..= arg5]+    ,"tags" Language.LSP.Protocol.Types.Common..=? arg6+    ,"relatedInformation" Language.LSP.Protocol.Types.Common..=? arg7+    ,"data" Language.LSP.Protocol.Types.Common..=? arg8]++instance Aeson.FromJSON Diagnostic where+  parseJSON = Aeson.withObject "Diagnostic" $ \arg -> Diagnostic <$> arg Aeson..: "range" <*> arg Aeson..:! "severity" <*> arg Aeson..:! "code" <*> arg Aeson..:! "codeDescription" <*> arg Aeson..:! "source" <*> arg Aeson..: "message" <*> arg Aeson..:! "tags" <*> arg Aeson..:! "relatedInformation" <*> arg Aeson..:! "data"
+ generated/Language/LSP/Protocol/Internal/Types/DiagnosticClientCapabilities.hs view
@@ -0,0 +1,41 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DiagnosticClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Client capabilities specific to diagnostic pull requests.++@since 3.17.0+-}+data DiagnosticClientCapabilities = DiagnosticClientCapabilities +  { {-|+  Whether implementation supports dynamic registration. If this is set to `true`+  the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`+  return value for the corresponding server capability as well.+  -}+  _dynamicRegistration :: (Maybe Bool)+  , {-|+  Whether the clients supports related documents for document diagnostic pulls.+  -}+  _relatedDocumentSupport :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DiagnosticClientCapabilities where+  toJSON (DiagnosticClientCapabilities arg0 arg1) = Aeson.object $ concat $  ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+    ,"relatedDocumentSupport" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON DiagnosticClientCapabilities where+  parseJSON = Aeson.withObject "DiagnosticClientCapabilities" $ \arg -> DiagnosticClientCapabilities <$> arg Aeson..:! "dynamicRegistration" <*> arg Aeson..:! "relatedDocumentSupport"
+ generated/Language/LSP/Protocol/Internal/Types/DiagnosticOptions.hs view
@@ -0,0 +1,54 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DiagnosticOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+Diagnostic options.++@since 3.17.0+-}+data DiagnosticOptions = DiagnosticOptions +  { {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  , {-|+  An optional identifier under which the diagnostics are+  managed by the client.+  -}+  _identifier :: (Maybe Data.Text.Text)+  , {-|+  Whether the language has inter file dependencies meaning that+  editing code in one file can result in a different diagnostic+  set in another file. Inter file dependencies are common for+  most programming languages and typically uncommon for linters.+  -}+  _interFileDependencies :: Bool+  , {-|+  The server provides support for workspace diagnostics as well.+  -}+  _workspaceDiagnostics :: Bool+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DiagnosticOptions where+  toJSON (DiagnosticOptions arg0 arg1 arg2 arg3) = Aeson.object $ concat $  ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0+    ,"identifier" Language.LSP.Protocol.Types.Common..=? arg1+    ,["interFileDependencies" Aeson..= arg2]+    ,["workspaceDiagnostics" Aeson..= arg3]]++instance Aeson.FromJSON DiagnosticOptions where+  parseJSON = Aeson.withObject "DiagnosticOptions" $ \arg -> DiagnosticOptions <$> arg Aeson..:! "workDoneProgress" <*> arg Aeson..:! "identifier" <*> arg Aeson..: "interFileDependencies" <*> arg Aeson..: "workspaceDiagnostics"
+ generated/Language/LSP/Protocol/Internal/Types/DiagnosticRegistrationOptions.hs view
@@ -0,0 +1,67 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DiagnosticRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+Diagnostic registration options.++@since 3.17.0+-}+data DiagnosticRegistrationOptions = DiagnosticRegistrationOptions +  { {-|+  A document selector to identify the scope of the registration. If set to null+  the document selector provided on the client side will be used.+  -}+  _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  , {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  , {-|+  An optional identifier under which the diagnostics are+  managed by the client.+  -}+  _identifier :: (Maybe Data.Text.Text)+  , {-|+  Whether the language has inter file dependencies meaning that+  editing code in one file can result in a different diagnostic+  set in another file. Inter file dependencies are common for+  most programming languages and typically uncommon for linters.+  -}+  _interFileDependencies :: Bool+  , {-|+  The server provides support for workspace diagnostics as well.+  -}+  _workspaceDiagnostics :: Bool+  , {-|+  The id used to register the request. The id can be used to deregister+  the request again. See also Registration#id.+  -}+  _id :: (Maybe Data.Text.Text)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DiagnosticRegistrationOptions where+  toJSON (DiagnosticRegistrationOptions arg0 arg1 arg2 arg3 arg4 arg5) = Aeson.object $ concat $  [["documentSelector" Aeson..= arg0]+    ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1+    ,"identifier" Language.LSP.Protocol.Types.Common..=? arg2+    ,["interFileDependencies" Aeson..= arg3]+    ,["workspaceDiagnostics" Aeson..= arg4]+    ,"id" Language.LSP.Protocol.Types.Common..=? arg5]++instance Aeson.FromJSON DiagnosticRegistrationOptions where+  parseJSON = Aeson.withObject "DiagnosticRegistrationOptions" $ \arg -> DiagnosticRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Aeson..:! "workDoneProgress" <*> arg Aeson..:! "identifier" <*> arg Aeson..: "interFileDependencies" <*> arg Aeson..: "workspaceDiagnostics" <*> arg Aeson..:! "id"
+ generated/Language/LSP/Protocol/Internal/Types/DiagnosticRelatedInformation.hs view
@@ -0,0 +1,41 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DiagnosticRelatedInformation where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Location+import qualified Language.LSP.Protocol.Types.Common++{-|+Represents a related message and source code location for a diagnostic. This should be+used to point to code locations that cause or related to a diagnostics, e.g when duplicating+a symbol in a scope.+-}+data DiagnosticRelatedInformation = DiagnosticRelatedInformation +  { {-|+  The location of this related diagnostic information.+  -}+  _location :: Language.LSP.Protocol.Internal.Types.Location.Location+  , {-|+  The message of this related diagnostic information.+  -}+  _message :: Data.Text.Text+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DiagnosticRelatedInformation where+  toJSON (DiagnosticRelatedInformation arg0 arg1) = Aeson.object $ concat $  [["location" Aeson..= arg0]+    ,["message" Aeson..= arg1]]++instance Aeson.FromJSON DiagnosticRelatedInformation where+  parseJSON = Aeson.withObject "DiagnosticRelatedInformation" $ \arg -> DiagnosticRelatedInformation <$> arg Aeson..: "location" <*> arg Aeson..: "message"
+ generated/Language/LSP/Protocol/Internal/Types/DiagnosticServerCancellationData.hs view
@@ -0,0 +1,34 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DiagnosticServerCancellationData where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Cancellation data returned from a diagnostic request.++@since 3.17.0+-}+data DiagnosticServerCancellationData = DiagnosticServerCancellationData +  { {-|++  -}+  _retriggerRequest :: Bool+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DiagnosticServerCancellationData where+  toJSON (DiagnosticServerCancellationData arg0) = Aeson.object $ concat $  [["retriggerRequest" Aeson..= arg0]]++instance Aeson.FromJSON DiagnosticServerCancellationData where+  parseJSON = Aeson.withObject "DiagnosticServerCancellationData" $ \arg -> DiagnosticServerCancellationData <$> arg Aeson..: "retriggerRequest"
+ generated/Language/LSP/Protocol/Internal/Types/DiagnosticSeverity.hs view
@@ -0,0 +1,60 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DiagnosticSeverity where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+The diagnostic's severity.+-}+data DiagnosticSeverity = +    {-|+  Reports an error.+  -}+  DiagnosticSeverity_Error+  | {-|+  Reports a warning.+  -}+  DiagnosticSeverity_Warning+  | {-|+  Reports an information.+  -}+  DiagnosticSeverity_Information+  | {-|+  Reports a hint.+  -}+  DiagnosticSeverity_Hint+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)+  deriving ( Aeson.ToJSON+  , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum DiagnosticSeverity Language.LSP.Protocol.Types.Common.UInt)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum DiagnosticSeverity where+  knownValues = Data.Set.fromList [DiagnosticSeverity_Error+    ,DiagnosticSeverity_Warning+    ,DiagnosticSeverity_Information+    ,DiagnosticSeverity_Hint]+  type EnumBaseType DiagnosticSeverity = Language.LSP.Protocol.Types.Common.UInt+  toEnumBaseType DiagnosticSeverity_Error = 1+  toEnumBaseType DiagnosticSeverity_Warning = 2+  toEnumBaseType DiagnosticSeverity_Information = 3+  toEnumBaseType DiagnosticSeverity_Hint = 4+  fromEnumBaseType 1 = pure DiagnosticSeverity_Error+  fromEnumBaseType 2 = pure DiagnosticSeverity_Warning+  fromEnumBaseType 3 = pure DiagnosticSeverity_Information+  fromEnumBaseType 4 = pure DiagnosticSeverity_Hint+  fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/DiagnosticTag.hs view
@@ -0,0 +1,53 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DiagnosticTag where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+The diagnostic tags.++@since 3.15.0+-}+data DiagnosticTag = +    {-|+  Unused or unnecessary code.++  Clients are allowed to render diagnostics with this tag faded out instead of having+  an error squiggle.+  -}+  DiagnosticTag_Unnecessary+  | {-|+  Deprecated or obsolete code.++  Clients are allowed to rendered diagnostics with this tag strike through.+  -}+  DiagnosticTag_Deprecated+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)+  deriving ( Aeson.ToJSON+  , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum DiagnosticTag Language.LSP.Protocol.Types.Common.UInt)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum DiagnosticTag where+  knownValues = Data.Set.fromList [DiagnosticTag_Unnecessary+    ,DiagnosticTag_Deprecated]+  type EnumBaseType DiagnosticTag = Language.LSP.Protocol.Types.Common.UInt+  toEnumBaseType DiagnosticTag_Unnecessary = 1+  toEnumBaseType DiagnosticTag_Deprecated = 2+  fromEnumBaseType 1 = pure DiagnosticTag_Unnecessary+  fromEnumBaseType 2 = pure DiagnosticTag_Deprecated+  fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/DiagnosticWorkspaceClientCapabilities.hs view
@@ -0,0 +1,40 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DiagnosticWorkspaceClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Workspace client capabilities specific to diagnostic pull requests.++@since 3.17.0+-}+data DiagnosticWorkspaceClientCapabilities = DiagnosticWorkspaceClientCapabilities +  { {-|+  Whether the client implementation supports a refresh request sent from+  the server to the client.++  Note that this event is global and will force the client to refresh all+  pulled diagnostics currently shown. It should be used with absolute care and+  is useful for situation where a server for example detects a project wide+  change that requires such a calculation.+  -}+  _refreshSupport :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DiagnosticWorkspaceClientCapabilities where+  toJSON (DiagnosticWorkspaceClientCapabilities arg0) = Aeson.object $ concat $  ["refreshSupport" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON DiagnosticWorkspaceClientCapabilities where+  parseJSON = Aeson.withObject "DiagnosticWorkspaceClientCapabilities" $ \arg -> DiagnosticWorkspaceClientCapabilities <$> arg Aeson..:! "refreshSupport"
+ generated/Language/LSP/Protocol/Internal/Types/DidChangeConfigurationClientCapabilities.hs view
@@ -0,0 +1,32 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DidChangeConfigurationClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data DidChangeConfigurationClientCapabilities = DidChangeConfigurationClientCapabilities +  { {-|+  Did change configuration notification supports dynamic registration.+  -}+  _dynamicRegistration :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DidChangeConfigurationClientCapabilities where+  toJSON (DidChangeConfigurationClientCapabilities arg0) = Aeson.object $ concat $  ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON DidChangeConfigurationClientCapabilities where+  parseJSON = Aeson.withObject "DidChangeConfigurationClientCapabilities" $ \arg -> DidChangeConfigurationClientCapabilities <$> arg Aeson..:! "dynamicRegistration"
+ generated/Language/LSP/Protocol/Internal/Types/DidChangeConfigurationParams.hs view
@@ -0,0 +1,33 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DidChangeConfigurationParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters of a change configuration notification.+-}+data DidChangeConfigurationParams = DidChangeConfigurationParams +  { {-|+  The actual changed settings+  -}+  _settings :: Data.Aeson.Value+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DidChangeConfigurationParams where+  toJSON (DidChangeConfigurationParams arg0) = Aeson.object $ concat $  [["settings" Aeson..= arg0]]++instance Aeson.FromJSON DidChangeConfigurationParams where+  parseJSON = Aeson.withObject "DidChangeConfigurationParams" $ \arg -> DidChangeConfigurationParams <$> arg Aeson..: "settings"
+ generated/Language/LSP/Protocol/Internal/Types/DidChangeConfigurationRegistrationOptions.hs view
@@ -0,0 +1,33 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DidChangeConfigurationRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data DidChangeConfigurationRegistrationOptions = DidChangeConfigurationRegistrationOptions +  { {-|++  -}+  _section :: (Maybe (Data.Text.Text Language.LSP.Protocol.Types.Common.|? [Data.Text.Text]))+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DidChangeConfigurationRegistrationOptions where+  toJSON (DidChangeConfigurationRegistrationOptions arg0) = Aeson.object $ concat $  ["section" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON DidChangeConfigurationRegistrationOptions where+  parseJSON = Aeson.withObject "DidChangeConfigurationRegistrationOptions" $ \arg -> DidChangeConfigurationRegistrationOptions <$> arg Aeson..:! "section"
+ generated/Language/LSP/Protocol/Internal/Types/DidChangeNotebookDocumentParams.hs view
@@ -0,0 +1,56 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DidChangeNotebookDocumentParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocumentChangeEvent+import qualified Language.LSP.Protocol.Internal.Types.VersionedNotebookDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+The params sent in a change notebook document notification.++@since 3.17.0+-}+data DidChangeNotebookDocumentParams = DidChangeNotebookDocumentParams +  { {-|+  The notebook document that did change. The version number points+  to the version after all provided changes have been applied. If+  only the text document content of a cell changes the notebook version+  doesn't necessarily have to change.+  -}+  _notebookDocument :: Language.LSP.Protocol.Internal.Types.VersionedNotebookDocumentIdentifier.VersionedNotebookDocumentIdentifier+  , {-|+  The actual changes to the notebook document.++  The changes describe single state changes to the notebook document.+  So if there are two changes c1 (at array index 0) and c2 (at array+  index 1) for a notebook in state S then c1 moves the notebook from+  S to S' and c2 from S' to S''. So c1 is computed on the state S and+  c2 is computed on the state S'.++  To mirror the content of a notebook using change events use the following approach:+  - start with the same initial content+  - apply the 'notebookDocument/didChange' notifications in the order you receive them.+  - apply the `NotebookChangeEvent`s in a single notification in the order+    you receive them.+  -}+  _change :: Language.LSP.Protocol.Internal.Types.NotebookDocumentChangeEvent.NotebookDocumentChangeEvent+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DidChangeNotebookDocumentParams where+  toJSON (DidChangeNotebookDocumentParams arg0 arg1) = Aeson.object $ concat $  [["notebookDocument" Aeson..= arg0]+    ,["change" Aeson..= arg1]]++instance Aeson.FromJSON DidChangeNotebookDocumentParams where+  parseJSON = Aeson.withObject "DidChangeNotebookDocumentParams" $ \arg -> DidChangeNotebookDocumentParams <$> arg Aeson..: "notebookDocument" <*> arg Aeson..: "change"
+ generated/Language/LSP/Protocol/Internal/Types/DidChangeTextDocumentParams.hs view
@@ -0,0 +1,51 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DidChangeTextDocumentParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentContentChangeEvent+import qualified Language.LSP.Protocol.Internal.Types.VersionedTextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+The change text document notification's parameters.+-}+data DidChangeTextDocumentParams = DidChangeTextDocumentParams +  { {-|+  The document that did change. The version number points+  to the version after all provided content changes have+  been applied.+  -}+  _textDocument :: Language.LSP.Protocol.Internal.Types.VersionedTextDocumentIdentifier.VersionedTextDocumentIdentifier+  , {-|+  The actual content changes. The content changes describe single state changes+  to the document. So if there are two content changes c1 (at array index 0) and+  c2 (at array index 1) for a document in state S then c1 moves the document from+  S to S' and c2 from S' to S''. So c1 is computed on the state S and c2 is computed+  on the state S'.++  To mirror the content of a document using change events use the following approach:+  - start with the same initial content+  - apply the 'textDocument/didChange' notifications in the order you receive them.+  - apply the `TextDocumentContentChangeEvent`s in a single notification in the order+    you receive them.+  -}+  _contentChanges :: [Language.LSP.Protocol.Internal.Types.TextDocumentContentChangeEvent.TextDocumentContentChangeEvent]+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DidChangeTextDocumentParams where+  toJSON (DidChangeTextDocumentParams arg0 arg1) = Aeson.object $ concat $  [["textDocument" Aeson..= arg0]+    ,["contentChanges" Aeson..= arg1]]++instance Aeson.FromJSON DidChangeTextDocumentParams where+  parseJSON = Aeson.withObject "DidChangeTextDocumentParams" $ \arg -> DidChangeTextDocumentParams <$> arg Aeson..: "textDocument" <*> arg Aeson..: "contentChanges"
+ generated/Language/LSP/Protocol/Internal/Types/DidChangeWatchedFilesClientCapabilities.hs view
@@ -0,0 +1,42 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data DidChangeWatchedFilesClientCapabilities = DidChangeWatchedFilesClientCapabilities +  { {-|+  Did change watched files notification supports dynamic registration. Please note+  that the current protocol doesn't support static configuration for file changes+  from the server side.+  -}+  _dynamicRegistration :: (Maybe Bool)+  , {-|+  Whether the client has support for `RelativePattern`+  or not.++  @since 3.17.0+  -}+  _relativePatternSupport :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DidChangeWatchedFilesClientCapabilities where+  toJSON (DidChangeWatchedFilesClientCapabilities arg0 arg1) = Aeson.object $ concat $  ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+    ,"relativePatternSupport" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON DidChangeWatchedFilesClientCapabilities where+  parseJSON = Aeson.withObject "DidChangeWatchedFilesClientCapabilities" $ \arg -> DidChangeWatchedFilesClientCapabilities <$> arg Aeson..:! "dynamicRegistration" <*> arg Aeson..:! "relativePatternSupport"
+ generated/Language/LSP/Protocol/Internal/Types/DidChangeWatchedFilesParams.hs view
@@ -0,0 +1,33 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.FileEvent+import qualified Language.LSP.Protocol.Types.Common++{-|+The watched files change notification's parameters.+-}+data DidChangeWatchedFilesParams = DidChangeWatchedFilesParams +  { {-|+  The actual file events.+  -}+  _changes :: [Language.LSP.Protocol.Internal.Types.FileEvent.FileEvent]+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DidChangeWatchedFilesParams where+  toJSON (DidChangeWatchedFilesParams arg0) = Aeson.object $ concat $  [["changes" Aeson..= arg0]]++instance Aeson.FromJSON DidChangeWatchedFilesParams where+  parseJSON = Aeson.withObject "DidChangeWatchedFilesParams" $ \arg -> DidChangeWatchedFilesParams <$> arg Aeson..: "changes"
+ generated/Language/LSP/Protocol/Internal/Types/DidChangeWatchedFilesRegistrationOptions.hs view
@@ -0,0 +1,33 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.FileSystemWatcher+import qualified Language.LSP.Protocol.Types.Common++{-|+Describe options to be used when registered for text document change events.+-}+data DidChangeWatchedFilesRegistrationOptions = DidChangeWatchedFilesRegistrationOptions +  { {-|+  The watchers to register.+  -}+  _watchers :: [Language.LSP.Protocol.Internal.Types.FileSystemWatcher.FileSystemWatcher]+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DidChangeWatchedFilesRegistrationOptions where+  toJSON (DidChangeWatchedFilesRegistrationOptions arg0) = Aeson.object $ concat $  [["watchers" Aeson..= arg0]]++instance Aeson.FromJSON DidChangeWatchedFilesRegistrationOptions where+  parseJSON = Aeson.withObject "DidChangeWatchedFilesRegistrationOptions" $ \arg -> DidChangeWatchedFilesRegistrationOptions <$> arg Aeson..: "watchers"
+ generated/Language/LSP/Protocol/Internal/Types/DidChangeWorkspaceFoldersParams.hs view
@@ -0,0 +1,33 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DidChangeWorkspaceFoldersParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceFoldersChangeEvent+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters of a `workspace/didChangeWorkspaceFolders` notification.+-}+data DidChangeWorkspaceFoldersParams = DidChangeWorkspaceFoldersParams +  { {-|+  The actual workspace folder change event.+  -}+  _event :: Language.LSP.Protocol.Internal.Types.WorkspaceFoldersChangeEvent.WorkspaceFoldersChangeEvent+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DidChangeWorkspaceFoldersParams where+  toJSON (DidChangeWorkspaceFoldersParams arg0) = Aeson.object $ concat $  [["event" Aeson..= arg0]]++instance Aeson.FromJSON DidChangeWorkspaceFoldersParams where+  parseJSON = Aeson.withObject "DidChangeWorkspaceFoldersParams" $ \arg -> DidChangeWorkspaceFoldersParams <$> arg Aeson..: "event"
+ generated/Language/LSP/Protocol/Internal/Types/DidCloseNotebookDocumentParams.hs view
@@ -0,0 +1,42 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DidCloseNotebookDocumentParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocumentIdentifier+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+The params sent in a close notebook document notification.++@since 3.17.0+-}+data DidCloseNotebookDocumentParams = DidCloseNotebookDocumentParams +  { {-|+  The notebook document that got closed.+  -}+  _notebookDocument :: Language.LSP.Protocol.Internal.Types.NotebookDocumentIdentifier.NotebookDocumentIdentifier+  , {-|+  The text documents that represent the content+  of a notebook cell that got closed.+  -}+  _cellTextDocuments :: [Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier]+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DidCloseNotebookDocumentParams where+  toJSON (DidCloseNotebookDocumentParams arg0 arg1) = Aeson.object $ concat $  [["notebookDocument" Aeson..= arg0]+    ,["cellTextDocuments" Aeson..= arg1]]++instance Aeson.FromJSON DidCloseNotebookDocumentParams where+  parseJSON = Aeson.withObject "DidCloseNotebookDocumentParams" $ \arg -> DidCloseNotebookDocumentParams <$> arg Aeson..: "notebookDocument" <*> arg Aeson..: "cellTextDocuments"
+ generated/Language/LSP/Protocol/Internal/Types/DidCloseTextDocumentParams.hs view
@@ -0,0 +1,33 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DidCloseTextDocumentParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters sent in a close text document notification+-}+data DidCloseTextDocumentParams = DidCloseTextDocumentParams +  { {-|+  The document that was closed.+  -}+  _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DidCloseTextDocumentParams where+  toJSON (DidCloseTextDocumentParams arg0) = Aeson.object $ concat $  [["textDocument" Aeson..= arg0]]++instance Aeson.FromJSON DidCloseTextDocumentParams where+  parseJSON = Aeson.withObject "DidCloseTextDocumentParams" $ \arg -> DidCloseTextDocumentParams <$> arg Aeson..: "textDocument"
+ generated/Language/LSP/Protocol/Internal/Types/DidOpenNotebookDocumentParams.hs view
@@ -0,0 +1,42 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DidOpenNotebookDocumentParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocument+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentItem+import qualified Language.LSP.Protocol.Types.Common++{-|+The params sent in an open notebook document notification.++@since 3.17.0+-}+data DidOpenNotebookDocumentParams = DidOpenNotebookDocumentParams +  { {-|+  The notebook document that got opened.+  -}+  _notebookDocument :: Language.LSP.Protocol.Internal.Types.NotebookDocument.NotebookDocument+  , {-|+  The text documents that represent the content+  of a notebook cell.+  -}+  _cellTextDocuments :: [Language.LSP.Protocol.Internal.Types.TextDocumentItem.TextDocumentItem]+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DidOpenNotebookDocumentParams where+  toJSON (DidOpenNotebookDocumentParams arg0 arg1) = Aeson.object $ concat $  [["notebookDocument" Aeson..= arg0]+    ,["cellTextDocuments" Aeson..= arg1]]++instance Aeson.FromJSON DidOpenNotebookDocumentParams where+  parseJSON = Aeson.withObject "DidOpenNotebookDocumentParams" $ \arg -> DidOpenNotebookDocumentParams <$> arg Aeson..: "notebookDocument" <*> arg Aeson..: "cellTextDocuments"
+ generated/Language/LSP/Protocol/Internal/Types/DidOpenTextDocumentParams.hs view
@@ -0,0 +1,33 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DidOpenTextDocumentParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentItem+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters sent in an open text document notification+-}+data DidOpenTextDocumentParams = DidOpenTextDocumentParams +  { {-|+  The document that was opened.+  -}+  _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentItem.TextDocumentItem+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DidOpenTextDocumentParams where+  toJSON (DidOpenTextDocumentParams arg0) = Aeson.object $ concat $  [["textDocument" Aeson..= arg0]]++instance Aeson.FromJSON DidOpenTextDocumentParams where+  parseJSON = Aeson.withObject "DidOpenTextDocumentParams" $ \arg -> DidOpenTextDocumentParams <$> arg Aeson..: "textDocument"
+ generated/Language/LSP/Protocol/Internal/Types/DidSaveNotebookDocumentParams.hs view
@@ -0,0 +1,35 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DidSaveNotebookDocumentParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+The params sent in a save notebook document notification.++@since 3.17.0+-}+data DidSaveNotebookDocumentParams = DidSaveNotebookDocumentParams +  { {-|+  The notebook document that got saved.+  -}+  _notebookDocument :: Language.LSP.Protocol.Internal.Types.NotebookDocumentIdentifier.NotebookDocumentIdentifier+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DidSaveNotebookDocumentParams where+  toJSON (DidSaveNotebookDocumentParams arg0) = Aeson.object $ concat $  [["notebookDocument" Aeson..= arg0]]++instance Aeson.FromJSON DidSaveNotebookDocumentParams where+  parseJSON = Aeson.withObject "DidSaveNotebookDocumentParams" $ \arg -> DidSaveNotebookDocumentParams <$> arg Aeson..: "notebookDocument"
+ generated/Language/LSP/Protocol/Internal/Types/DidSaveTextDocumentParams.hs view
@@ -0,0 +1,40 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DidSaveTextDocumentParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters sent in a save text document notification+-}+data DidSaveTextDocumentParams = DidSaveTextDocumentParams +  { {-|+  The document that was saved.+  -}+  _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+  , {-|+  Optional the content when saved. Depends on the includeText value+  when the save notification was requested.+  -}+  _text :: (Maybe Data.Text.Text)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DidSaveTextDocumentParams where+  toJSON (DidSaveTextDocumentParams arg0 arg1) = Aeson.object $ concat $  [["textDocument" Aeson..= arg0]+    ,"text" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON DidSaveTextDocumentParams where+  parseJSON = Aeson.withObject "DidSaveTextDocumentParams" $ \arg -> DidSaveTextDocumentParams <$> arg Aeson..: "textDocument" <*> arg Aeson..:! "text"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentColorClientCapabilities.hs view
@@ -0,0 +1,34 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentColorClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data DocumentColorClientCapabilities = DocumentColorClientCapabilities +  { {-|+  Whether implementation supports dynamic registration. If this is set to `true`+  the client supports the new `DocumentColorRegistrationOptions` return value+  for the corresponding server capability as well.+  -}+  _dynamicRegistration :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DocumentColorClientCapabilities where+  toJSON (DocumentColorClientCapabilities arg0) = Aeson.object $ concat $  ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON DocumentColorClientCapabilities where+  parseJSON = Aeson.withObject "DocumentColorClientCapabilities" $ \arg -> DocumentColorClientCapabilities <$> arg Aeson..:! "dynamicRegistration"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentColorOptions.hs view
@@ -0,0 +1,32 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentColorOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data DocumentColorOptions = DocumentColorOptions +  { {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DocumentColorOptions where+  toJSON (DocumentColorOptions arg0) = Aeson.object $ concat $  ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON DocumentColorOptions where+  parseJSON = Aeson.withObject "DocumentColorOptions" $ \arg -> DocumentColorOptions <$> arg Aeson..:! "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentColorParams.hs view
@@ -0,0 +1,45 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentColorParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+Parameters for a `DocumentColorRequest`.+-}+data DocumentColorParams = DocumentColorParams +  { {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  An optional token that a server can use to report partial results (e.g. streaming) to+  the client.+  -}+  _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  The text document.+  -}+  _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DocumentColorParams where+  toJSON (DocumentColorParams arg0 arg1 arg2) = Aeson.object $ concat $  ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+    ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg1+    ,["textDocument" Aeson..= arg2]]++instance Aeson.FromJSON DocumentColorParams where+  parseJSON = Aeson.withObject "DocumentColorParams" $ \arg -> DocumentColorParams <$> arg Aeson..:! "workDoneToken" <*> arg Aeson..:! "partialResultToken" <*> arg Aeson..: "textDocument"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentColorRegistrationOptions.hs view
@@ -0,0 +1,46 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentColorRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data DocumentColorRegistrationOptions = DocumentColorRegistrationOptions +  { {-|+  A document selector to identify the scope of the registration. If set to null+  the document selector provided on the client side will be used.+  -}+  _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  , {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  , {-|+  The id used to register the request. The id can be used to deregister+  the request again. See also Registration#id.+  -}+  _id :: (Maybe Data.Text.Text)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DocumentColorRegistrationOptions where+  toJSON (DocumentColorRegistrationOptions arg0 arg1 arg2) = Aeson.object $ concat $  [["documentSelector" Aeson..= arg0]+    ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1+    ,"id" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON DocumentColorRegistrationOptions where+  parseJSON = Aeson.withObject "DocumentColorRegistrationOptions" $ \arg -> DocumentColorRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Aeson..:! "workDoneProgress" <*> arg Aeson..:! "id"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentDiagnosticParams.hs view
@@ -0,0 +1,58 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentDiagnosticParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+Parameters of the document diagnostic request.++@since 3.17.0+-}+data DocumentDiagnosticParams = DocumentDiagnosticParams +  { {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  An optional token that a server can use to report partial results (e.g. streaming) to+  the client.+  -}+  _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  The text document.+  -}+  _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+  , {-|+  The additional identifier  provided during registration.+  -}+  _identifier :: (Maybe Data.Text.Text)+  , {-|+  The result id of a previous response if provided.+  -}+  _previousResultId :: (Maybe Data.Text.Text)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DocumentDiagnosticParams where+  toJSON (DocumentDiagnosticParams arg0 arg1 arg2 arg3 arg4) = Aeson.object $ concat $  ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+    ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg1+    ,["textDocument" Aeson..= arg2]+    ,"identifier" Language.LSP.Protocol.Types.Common..=? arg3+    ,"previousResultId" Language.LSP.Protocol.Types.Common..=? arg4]++instance Aeson.FromJSON DocumentDiagnosticParams where+  parseJSON = Aeson.withObject "DocumentDiagnosticParams" $ \arg -> DocumentDiagnosticParams <$> arg Aeson..:! "workDoneToken" <*> arg Aeson..:! "partialResultToken" <*> arg Aeson..: "textDocument" <*> arg Aeson..:! "identifier" <*> arg Aeson..:! "previousResultId"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentDiagnosticReport.hs view
@@ -0,0 +1,30 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentDiagnosticReport where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.RelatedFullDocumentDiagnosticReport+import qualified Language.LSP.Protocol.Internal.Types.RelatedUnchangedDocumentDiagnosticReport+import qualified Language.LSP.Protocol.Types.Common++{-|+The result of a document diagnostic pull request. A report can+either be a full report containing all diagnostics for the+requested document or an unchanged report indicating that nothing+has changed in terms of diagnostics in comparison to the last+pull request.++@since 3.17.0+-}+newtype DocumentDiagnosticReport = DocumentDiagnosticReport (Language.LSP.Protocol.Internal.Types.RelatedFullDocumentDiagnosticReport.RelatedFullDocumentDiagnosticReport Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.RelatedUnchangedDocumentDiagnosticReport.RelatedUnchangedDocumentDiagnosticReport)+  deriving newtype (Aeson.ToJSON, Aeson.FromJSON)+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)
+ generated/Language/LSP/Protocol/Internal/Types/DocumentDiagnosticReportKind.hs view
@@ -0,0 +1,50 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentDiagnosticReportKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+The document diagnostic report kinds.++@since 3.17.0+-}+data DocumentDiagnosticReportKind = +    {-|+  A diagnostic report with a full+  set of problems.+  -}+  DocumentDiagnosticReportKind_Full+  | {-|+  A report indicating that the last+  returned report is still accurate.+  -}+  DocumentDiagnosticReportKind_Unchanged+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)+  deriving ( Aeson.ToJSON+  , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum DocumentDiagnosticReportKind Data.Text.Text)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum DocumentDiagnosticReportKind where+  knownValues = Data.Set.fromList [DocumentDiagnosticReportKind_Full+    ,DocumentDiagnosticReportKind_Unchanged]+  type EnumBaseType DocumentDiagnosticReportKind = Data.Text.Text+  toEnumBaseType DocumentDiagnosticReportKind_Full = "full"+  toEnumBaseType DocumentDiagnosticReportKind_Unchanged = "unchanged"+  fromEnumBaseType "full" = pure DocumentDiagnosticReportKind_Full+  fromEnumBaseType "unchanged" = pure DocumentDiagnosticReportKind_Unchanged+  fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/DocumentDiagnosticReportPartialResult.hs view
@@ -0,0 +1,38 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentDiagnosticReportPartialResult where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Map+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.FullDocumentDiagnosticReport+import qualified Language.LSP.Protocol.Internal.Types.UnchangedDocumentDiagnosticReport+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+A partial result for a document diagnostic report.++@since 3.17.0+-}+data DocumentDiagnosticReportPartialResult = DocumentDiagnosticReportPartialResult +  { {-|++  -}+  _relatedDocuments :: (Data.Map.Map Language.LSP.Protocol.Types.Uri.Uri (Language.LSP.Protocol.Internal.Types.FullDocumentDiagnosticReport.FullDocumentDiagnosticReport Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.UnchangedDocumentDiagnosticReport.UnchangedDocumentDiagnosticReport))+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DocumentDiagnosticReportPartialResult where+  toJSON (DocumentDiagnosticReportPartialResult arg0) = Aeson.object $ concat $  [["relatedDocuments" Aeson..= arg0]]++instance Aeson.FromJSON DocumentDiagnosticReportPartialResult where+  parseJSON = Aeson.withObject "DocumentDiagnosticReportPartialResult" $ \arg -> DocumentDiagnosticReportPartialResult <$> arg Aeson..: "relatedDocuments"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentFilter.hs view
@@ -0,0 +1,27 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentFilter where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.NotebookCellTextDocumentFilter+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentFilter+import qualified Language.LSP.Protocol.Types.Common++{-|+A document filter describes a top level text document or+a notebook cell document.++@since 3.17.0 - proposed support for NotebookCellTextDocumentFilter.+-}+newtype DocumentFilter = DocumentFilter (Language.LSP.Protocol.Internal.Types.TextDocumentFilter.TextDocumentFilter Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.NotebookCellTextDocumentFilter.NotebookCellTextDocumentFilter)+  deriving newtype (Aeson.ToJSON, Aeson.FromJSON)+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)
+ generated/Language/LSP/Protocol/Internal/Types/DocumentFormattingClientCapabilities.hs view
@@ -0,0 +1,32 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentFormattingClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Client capabilities of a `DocumentFormattingRequest`.+-}+data DocumentFormattingClientCapabilities = DocumentFormattingClientCapabilities +  { {-|+  Whether formatting supports dynamic registration.+  -}+  _dynamicRegistration :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DocumentFormattingClientCapabilities where+  toJSON (DocumentFormattingClientCapabilities arg0) = Aeson.object $ concat $  ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON DocumentFormattingClientCapabilities where+  parseJSON = Aeson.withObject "DocumentFormattingClientCapabilities" $ \arg -> DocumentFormattingClientCapabilities <$> arg Aeson..:! "dynamicRegistration"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentFormattingOptions.hs view
@@ -0,0 +1,32 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentFormattingOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Provider options for a `DocumentFormattingRequest`.+-}+data DocumentFormattingOptions = DocumentFormattingOptions +  { {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DocumentFormattingOptions where+  toJSON (DocumentFormattingOptions arg0) = Aeson.object $ concat $  ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON DocumentFormattingOptions where+  parseJSON = Aeson.withObject "DocumentFormattingOptions" $ \arg -> DocumentFormattingOptions <$> arg Aeson..:! "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentFormattingParams.hs view
@@ -0,0 +1,45 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentFormattingParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.FormattingOptions+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters of a `DocumentFormattingRequest`.+-}+data DocumentFormattingParams = DocumentFormattingParams +  { {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  The document to format.+  -}+  _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+  , {-|+  The format options.+  -}+  _options :: Language.LSP.Protocol.Internal.Types.FormattingOptions.FormattingOptions+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DocumentFormattingParams where+  toJSON (DocumentFormattingParams arg0 arg1 arg2) = Aeson.object $ concat $  ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+    ,["textDocument" Aeson..= arg1]+    ,["options" Aeson..= arg2]]++instance Aeson.FromJSON DocumentFormattingParams where+  parseJSON = Aeson.withObject "DocumentFormattingParams" $ \arg -> DocumentFormattingParams <$> arg Aeson..:! "workDoneToken" <*> arg Aeson..: "textDocument" <*> arg Aeson..: "options"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentFormattingRegistrationOptions.hs view
@@ -0,0 +1,39 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentFormattingRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+Registration options for a `DocumentFormattingRequest`.+-}+data DocumentFormattingRegistrationOptions = DocumentFormattingRegistrationOptions +  { {-|+  A document selector to identify the scope of the registration. If set to null+  the document selector provided on the client side will be used.+  -}+  _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  , {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DocumentFormattingRegistrationOptions where+  toJSON (DocumentFormattingRegistrationOptions arg0 arg1) = Aeson.object $ concat $  [["documentSelector" Aeson..= arg0]+    ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON DocumentFormattingRegistrationOptions where+  parseJSON = Aeson.withObject "DocumentFormattingRegistrationOptions" $ \arg -> DocumentFormattingRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Aeson..:! "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentHighlight.hs view
@@ -0,0 +1,41 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentHighlight where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.DocumentHighlightKind+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|+A document highlight is a range inside a text document which deserves+special attention. Usually a document highlight is visualized by changing+the background color of its range.+-}+data DocumentHighlight = DocumentHighlight +  { {-|+  The range this highlight applies to.+  -}+  _range :: Language.LSP.Protocol.Internal.Types.Range.Range+  , {-|+  The highlight kind, default is `DocumentHighlightKind.Text`.+  -}+  _kind :: (Maybe Language.LSP.Protocol.Internal.Types.DocumentHighlightKind.DocumentHighlightKind)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DocumentHighlight where+  toJSON (DocumentHighlight arg0 arg1) = Aeson.object $ concat $  [["range" Aeson..= arg0]+    ,"kind" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON DocumentHighlight where+  parseJSON = Aeson.withObject "DocumentHighlight" $ \arg -> DocumentHighlight <$> arg Aeson..: "range" <*> arg Aeson..:! "kind"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentHighlightClientCapabilities.hs view
@@ -0,0 +1,32 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentHighlightClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Client Capabilities for a `DocumentHighlightRequest`.+-}+data DocumentHighlightClientCapabilities = DocumentHighlightClientCapabilities +  { {-|+  Whether document highlight supports dynamic registration.+  -}+  _dynamicRegistration :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DocumentHighlightClientCapabilities where+  toJSON (DocumentHighlightClientCapabilities arg0) = Aeson.object $ concat $  ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON DocumentHighlightClientCapabilities where+  parseJSON = Aeson.withObject "DocumentHighlightClientCapabilities" $ \arg -> DocumentHighlightClientCapabilities <$> arg Aeson..:! "dynamicRegistration"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentHighlightKind.hs view
@@ -0,0 +1,53 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentHighlightKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+A document highlight kind.+-}+data DocumentHighlightKind = +    {-|+  A textual occurrence.+  -}+  DocumentHighlightKind_Text+  | {-|+  Read-access of a symbol, like reading a variable.+  -}+  DocumentHighlightKind_Read+  | {-|+  Write-access of a symbol, like writing to a variable.+  -}+  DocumentHighlightKind_Write+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)+  deriving ( Aeson.ToJSON+  , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum DocumentHighlightKind Language.LSP.Protocol.Types.Common.UInt)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum DocumentHighlightKind where+  knownValues = Data.Set.fromList [DocumentHighlightKind_Text+    ,DocumentHighlightKind_Read+    ,DocumentHighlightKind_Write]+  type EnumBaseType DocumentHighlightKind = Language.LSP.Protocol.Types.Common.UInt+  toEnumBaseType DocumentHighlightKind_Text = 1+  toEnumBaseType DocumentHighlightKind_Read = 2+  toEnumBaseType DocumentHighlightKind_Write = 3+  fromEnumBaseType 1 = pure DocumentHighlightKind_Text+  fromEnumBaseType 2 = pure DocumentHighlightKind_Read+  fromEnumBaseType 3 = pure DocumentHighlightKind_Write+  fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/DocumentHighlightOptions.hs view
@@ -0,0 +1,32 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentHighlightOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Provider options for a `DocumentHighlightRequest`.+-}+data DocumentHighlightOptions = DocumentHighlightOptions +  { {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DocumentHighlightOptions where+  toJSON (DocumentHighlightOptions arg0) = Aeson.object $ concat $  ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON DocumentHighlightOptions where+  parseJSON = Aeson.withObject "DocumentHighlightOptions" $ \arg -> DocumentHighlightOptions <$> arg Aeson..:! "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentHighlightParams.hs view
@@ -0,0 +1,51 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentHighlightParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+Parameters for a `DocumentHighlightRequest`.+-}+data DocumentHighlightParams = DocumentHighlightParams +  { {-|+  The text document.+  -}+  _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+  , {-|+  The position inside the text document.+  -}+  _position :: Language.LSP.Protocol.Internal.Types.Position.Position+  , {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  An optional token that a server can use to report partial results (e.g. streaming) to+  the client.+  -}+  _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DocumentHighlightParams where+  toJSON (DocumentHighlightParams arg0 arg1 arg2 arg3) = Aeson.object $ concat $  [["textDocument" Aeson..= arg0]+    ,["position" Aeson..= arg1]+    ,"workDoneToken" Language.LSP.Protocol.Types.Common..=? arg2+    ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON DocumentHighlightParams where+  parseJSON = Aeson.withObject "DocumentHighlightParams" $ \arg -> DocumentHighlightParams <$> arg Aeson..: "textDocument" <*> arg Aeson..: "position" <*> arg Aeson..:! "workDoneToken" <*> arg Aeson..:! "partialResultToken"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentHighlightRegistrationOptions.hs view
@@ -0,0 +1,39 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentHighlightRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+Registration options for a `DocumentHighlightRequest`.+-}+data DocumentHighlightRegistrationOptions = DocumentHighlightRegistrationOptions +  { {-|+  A document selector to identify the scope of the registration. If set to null+  the document selector provided on the client side will be used.+  -}+  _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  , {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DocumentHighlightRegistrationOptions where+  toJSON (DocumentHighlightRegistrationOptions arg0 arg1) = Aeson.object $ concat $  [["documentSelector" Aeson..= arg0]+    ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON DocumentHighlightRegistrationOptions where+  parseJSON = Aeson.withObject "DocumentHighlightRegistrationOptions" $ \arg -> DocumentHighlightRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Aeson..:! "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentLink.hs view
@@ -0,0 +1,58 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentLink where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|+A document link is a range in a text document that links to an internal or external resource, like another+text document or a web site.+-}+data DocumentLink = DocumentLink +  { {-|+  The range this link applies to.+  -}+  _range :: Language.LSP.Protocol.Internal.Types.Range.Range+  , {-|+  The uri this link points to. If missing a resolve request is sent later.+  -}+  _target :: (Maybe Data.Text.Text)+  , {-|+  The tooltip text when you hover over this link.++  If a tooltip is provided, is will be displayed in a string that includes instructions on how to+  trigger the link, such as `{0} (ctrl + click)`. The specific instructions vary depending on OS,+  user settings, and localization.++  @since 3.15.0+  -}+  _tooltip :: (Maybe Data.Text.Text)+  , {-|+  A data entry field that is preserved on a document link between a+  DocumentLinkRequest and a DocumentLinkResolveRequest.+  -}+  _data_ :: (Maybe Data.Aeson.Value)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DocumentLink where+  toJSON (DocumentLink arg0 arg1 arg2 arg3) = Aeson.object $ concat $  [["range" Aeson..= arg0]+    ,"target" Language.LSP.Protocol.Types.Common..=? arg1+    ,"tooltip" Language.LSP.Protocol.Types.Common..=? arg2+    ,"data" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON DocumentLink where+  parseJSON = Aeson.withObject "DocumentLink" $ \arg -> DocumentLink <$> arg Aeson..: "range" <*> arg Aeson..:! "target" <*> arg Aeson..:! "tooltip" <*> arg Aeson..:! "data"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentLinkClientCapabilities.hs view
@@ -0,0 +1,39 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentLinkClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+The client capabilities of a `DocumentLinkRequest`.+-}+data DocumentLinkClientCapabilities = DocumentLinkClientCapabilities +  { {-|+  Whether document link supports dynamic registration.+  -}+  _dynamicRegistration :: (Maybe Bool)+  , {-|+  Whether the client supports the `tooltip` property on `DocumentLink`.++  @since 3.15.0+  -}+  _tooltipSupport :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DocumentLinkClientCapabilities where+  toJSON (DocumentLinkClientCapabilities arg0 arg1) = Aeson.object $ concat $  ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+    ,"tooltipSupport" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON DocumentLinkClientCapabilities where+  parseJSON = Aeson.withObject "DocumentLinkClientCapabilities" $ \arg -> DocumentLinkClientCapabilities <$> arg Aeson..:! "dynamicRegistration" <*> arg Aeson..:! "tooltipSupport"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentLinkOptions.hs view
@@ -0,0 +1,37 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentLinkOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Provider options for a `DocumentLinkRequest`.+-}+data DocumentLinkOptions = DocumentLinkOptions +  { {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  , {-|+  Document links have a resolve provider as well.+  -}+  _resolveProvider :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DocumentLinkOptions where+  toJSON (DocumentLinkOptions arg0 arg1) = Aeson.object $ concat $  ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0+    ,"resolveProvider" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON DocumentLinkOptions where+  parseJSON = Aeson.withObject "DocumentLinkOptions" $ \arg -> DocumentLinkOptions <$> arg Aeson..:! "workDoneProgress" <*> arg Aeson..:! "resolveProvider"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentLinkParams.hs view
@@ -0,0 +1,45 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentLinkParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters of a `DocumentLinkRequest`.+-}+data DocumentLinkParams = DocumentLinkParams +  { {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  An optional token that a server can use to report partial results (e.g. streaming) to+  the client.+  -}+  _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  The document to provide document links for.+  -}+  _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DocumentLinkParams where+  toJSON (DocumentLinkParams arg0 arg1 arg2) = Aeson.object $ concat $  ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+    ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg1+    ,["textDocument" Aeson..= arg2]]++instance Aeson.FromJSON DocumentLinkParams where+  parseJSON = Aeson.withObject "DocumentLinkParams" $ \arg -> DocumentLinkParams <$> arg Aeson..:! "workDoneToken" <*> arg Aeson..:! "partialResultToken" <*> arg Aeson..: "textDocument"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentLinkRegistrationOptions.hs view
@@ -0,0 +1,44 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentLinkRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+Registration options for a `DocumentLinkRequest`.+-}+data DocumentLinkRegistrationOptions = DocumentLinkRegistrationOptions +  { {-|+  A document selector to identify the scope of the registration. If set to null+  the document selector provided on the client side will be used.+  -}+  _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  , {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  , {-|+  Document links have a resolve provider as well.+  -}+  _resolveProvider :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DocumentLinkRegistrationOptions where+  toJSON (DocumentLinkRegistrationOptions arg0 arg1 arg2) = Aeson.object $ concat $  [["documentSelector" Aeson..= arg0]+    ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1+    ,"resolveProvider" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON DocumentLinkRegistrationOptions where+  parseJSON = Aeson.withObject "DocumentLinkRegistrationOptions" $ \arg -> DocumentLinkRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Aeson..:! "workDoneProgress" <*> arg Aeson..:! "resolveProvider"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentOnTypeFormattingClientCapabilities.hs view
@@ -0,0 +1,32 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Client capabilities of a `DocumentOnTypeFormattingRequest`.+-}+data DocumentOnTypeFormattingClientCapabilities = DocumentOnTypeFormattingClientCapabilities +  { {-|+  Whether on type formatting supports dynamic registration.+  -}+  _dynamicRegistration :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DocumentOnTypeFormattingClientCapabilities where+  toJSON (DocumentOnTypeFormattingClientCapabilities arg0) = Aeson.object $ concat $  ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON DocumentOnTypeFormattingClientCapabilities where+  parseJSON = Aeson.withObject "DocumentOnTypeFormattingClientCapabilities" $ \arg -> DocumentOnTypeFormattingClientCapabilities <$> arg Aeson..:! "dynamicRegistration"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentOnTypeFormattingOptions.hs view
@@ -0,0 +1,38 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+Provider options for a `DocumentOnTypeFormattingRequest`.+-}+data DocumentOnTypeFormattingOptions = DocumentOnTypeFormattingOptions +  { {-|+  A character on which formatting should be triggered, like `{`.+  -}+  _firstTriggerCharacter :: Data.Text.Text+  , {-|+  More trigger characters.+  -}+  _moreTriggerCharacter :: (Maybe [Data.Text.Text])+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DocumentOnTypeFormattingOptions where+  toJSON (DocumentOnTypeFormattingOptions arg0 arg1) = Aeson.object $ concat $  [["firstTriggerCharacter" Aeson..= arg0]+    ,"moreTriggerCharacter" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON DocumentOnTypeFormattingOptions where+  parseJSON = Aeson.withObject "DocumentOnTypeFormattingOptions" $ \arg -> DocumentOnTypeFormattingOptions <$> arg Aeson..: "firstTriggerCharacter" <*> arg Aeson..:! "moreTriggerCharacter"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentOnTypeFormattingParams.hs view
@@ -0,0 +1,56 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.FormattingOptions+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters of a `DocumentOnTypeFormattingRequest`.+-}+data DocumentOnTypeFormattingParams = DocumentOnTypeFormattingParams +  { {-|+  The document to format.+  -}+  _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+  , {-|+  The position around which the on type formatting should happen.+  This is not necessarily the exact position where the character denoted+  by the property `ch` got typed.+  -}+  _position :: Language.LSP.Protocol.Internal.Types.Position.Position+  , {-|+  The character that has been typed that triggered the formatting+  on type request. That is not necessarily the last character that+  got inserted into the document since the client could auto insert+  characters as well (e.g. like automatic brace completion).+  -}+  _ch :: Data.Text.Text+  , {-|+  The formatting options.+  -}+  _options :: Language.LSP.Protocol.Internal.Types.FormattingOptions.FormattingOptions+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DocumentOnTypeFormattingParams where+  toJSON (DocumentOnTypeFormattingParams arg0 arg1 arg2 arg3) = Aeson.object $ concat $  [["textDocument" Aeson..= arg0]+    ,["position" Aeson..= arg1]+    ,["ch" Aeson..= arg2]+    ,["options" Aeson..= arg3]]++instance Aeson.FromJSON DocumentOnTypeFormattingParams where+  parseJSON = Aeson.withObject "DocumentOnTypeFormattingParams" $ \arg -> DocumentOnTypeFormattingParams <$> arg Aeson..: "textDocument" <*> arg Aeson..: "position" <*> arg Aeson..: "ch" <*> arg Aeson..: "options"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentOnTypeFormattingRegistrationOptions.hs view
@@ -0,0 +1,45 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+Registration options for a `DocumentOnTypeFormattingRequest`.+-}+data DocumentOnTypeFormattingRegistrationOptions = DocumentOnTypeFormattingRegistrationOptions +  { {-|+  A document selector to identify the scope of the registration. If set to null+  the document selector provided on the client side will be used.+  -}+  _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  , {-|+  A character on which formatting should be triggered, like `{`.+  -}+  _firstTriggerCharacter :: Data.Text.Text+  , {-|+  More trigger characters.+  -}+  _moreTriggerCharacter :: (Maybe [Data.Text.Text])+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DocumentOnTypeFormattingRegistrationOptions where+  toJSON (DocumentOnTypeFormattingRegistrationOptions arg0 arg1 arg2) = Aeson.object $ concat $  [["documentSelector" Aeson..= arg0]+    ,["firstTriggerCharacter" Aeson..= arg1]+    ,"moreTriggerCharacter" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON DocumentOnTypeFormattingRegistrationOptions where+  parseJSON = Aeson.withObject "DocumentOnTypeFormattingRegistrationOptions" $ \arg -> DocumentOnTypeFormattingRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Aeson..: "firstTriggerCharacter" <*> arg Aeson..:! "moreTriggerCharacter"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentRangeFormattingClientCapabilities.hs view
@@ -0,0 +1,32 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Client capabilities of a `DocumentRangeFormattingRequest`.+-}+data DocumentRangeFormattingClientCapabilities = DocumentRangeFormattingClientCapabilities +  { {-|+  Whether range formatting supports dynamic registration.+  -}+  _dynamicRegistration :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DocumentRangeFormattingClientCapabilities where+  toJSON (DocumentRangeFormattingClientCapabilities arg0) = Aeson.object $ concat $  ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON DocumentRangeFormattingClientCapabilities where+  parseJSON = Aeson.withObject "DocumentRangeFormattingClientCapabilities" $ \arg -> DocumentRangeFormattingClientCapabilities <$> arg Aeson..:! "dynamicRegistration"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentRangeFormattingOptions.hs view
@@ -0,0 +1,32 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Provider options for a `DocumentRangeFormattingRequest`.+-}+data DocumentRangeFormattingOptions = DocumentRangeFormattingOptions +  { {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DocumentRangeFormattingOptions where+  toJSON (DocumentRangeFormattingOptions arg0) = Aeson.object $ concat $  ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON DocumentRangeFormattingOptions where+  parseJSON = Aeson.withObject "DocumentRangeFormattingOptions" $ \arg -> DocumentRangeFormattingOptions <$> arg Aeson..:! "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentRangeFormattingParams.hs view
@@ -0,0 +1,51 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.FormattingOptions+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters of a `DocumentRangeFormattingRequest`.+-}+data DocumentRangeFormattingParams = DocumentRangeFormattingParams +  { {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  The document to format.+  -}+  _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+  , {-|+  The range to format+  -}+  _range :: Language.LSP.Protocol.Internal.Types.Range.Range+  , {-|+  The format options+  -}+  _options :: Language.LSP.Protocol.Internal.Types.FormattingOptions.FormattingOptions+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DocumentRangeFormattingParams where+  toJSON (DocumentRangeFormattingParams arg0 arg1 arg2 arg3) = Aeson.object $ concat $  ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+    ,["textDocument" Aeson..= arg1]+    ,["range" Aeson..= arg2]+    ,["options" Aeson..= arg3]]++instance Aeson.FromJSON DocumentRangeFormattingParams where+  parseJSON = Aeson.withObject "DocumentRangeFormattingParams" $ \arg -> DocumentRangeFormattingParams <$> arg Aeson..:! "workDoneToken" <*> arg Aeson..: "textDocument" <*> arg Aeson..: "range" <*> arg Aeson..: "options"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentRangeFormattingRegistrationOptions.hs view
@@ -0,0 +1,39 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+Registration options for a `DocumentRangeFormattingRequest`.+-}+data DocumentRangeFormattingRegistrationOptions = DocumentRangeFormattingRegistrationOptions +  { {-|+  A document selector to identify the scope of the registration. If set to null+  the document selector provided on the client side will be used.+  -}+  _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  , {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DocumentRangeFormattingRegistrationOptions where+  toJSON (DocumentRangeFormattingRegistrationOptions arg0 arg1) = Aeson.object $ concat $  [["documentSelector" Aeson..= arg0]+    ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON DocumentRangeFormattingRegistrationOptions where+  parseJSON = Aeson.withObject "DocumentRangeFormattingRegistrationOptions" $ \arg -> DocumentRangeFormattingRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Aeson..:! "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentSelector.hs view
@@ -0,0 +1,26 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentSelector where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.DocumentFilter++{-|+A document selector is the combination of one or many document filters.++@sample `let sel:DocumentSelector = [{ language: 'typescript' }, { language: 'json', pattern: '**∕tsconfig.json' }]`;++The use of a string as a document filter is deprecated @since 3.16.0.+-}+newtype DocumentSelector = DocumentSelector [Language.LSP.Protocol.Internal.Types.DocumentFilter.DocumentFilter]+  deriving newtype (Aeson.ToJSON, Aeson.FromJSON)+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)
+ generated/Language/LSP/Protocol/Internal/Types/DocumentSymbol.hs view
@@ -0,0 +1,83 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentSymbol where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Internal.Types.SymbolKind+import qualified Language.LSP.Protocol.Internal.Types.SymbolTag+import qualified Language.LSP.Protocol.Types.Common++{-# DEPRECATED _deprecated "Use tags instead" #-}+{-|+Represents programming constructs like variables, classes, interfaces etc.+that appear in a document. Document symbols can be hierarchical and they+have two ranges: one that encloses its definition and one that points to+its most interesting range, e.g. the range of an identifier.+-}+data DocumentSymbol = DocumentSymbol +  { {-|+  The name of this symbol. Will be displayed in the user interface and therefore must not be+  an empty string or a string only consisting of white spaces.+  -}+  _name :: Data.Text.Text+  , {-|+  More detail for this symbol, e.g the signature of a function.+  -}+  _detail :: (Maybe Data.Text.Text)+  , {-|+  The kind of this symbol.+  -}+  _kind :: Language.LSP.Protocol.Internal.Types.SymbolKind.SymbolKind+  , {-|+  Tags for this document symbol.++  @since 3.16.0+  -}+  _tags :: (Maybe [Language.LSP.Protocol.Internal.Types.SymbolTag.SymbolTag])+  , {-|+  Indicates if this symbol is deprecated.++  @deprecated Use tags instead+  -}+  _deprecated :: (Maybe Bool)+  , {-|+  The range enclosing this symbol not including leading/trailing whitespace but everything else+  like comments. This information is typically used to determine if the clients cursor is+  inside the symbol to reveal in the symbol in the UI.+  -}+  _range :: Language.LSP.Protocol.Internal.Types.Range.Range+  , {-|+  The range that should be selected and revealed when this symbol is being picked, e.g the name of a function.+  Must be contained by the `range`.+  -}+  _selectionRange :: Language.LSP.Protocol.Internal.Types.Range.Range+  , {-|+  Children of this symbol, e.g. properties of a class.+  -}+  _children :: (Maybe [Language.LSP.Protocol.Internal.Types.DocumentSymbol.DocumentSymbol])+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DocumentSymbol where+  toJSON (DocumentSymbol arg0 arg1 arg2 arg3 arg4 arg5 arg6 arg7) = Aeson.object $ concat $  [["name" Aeson..= arg0]+    ,"detail" Language.LSP.Protocol.Types.Common..=? arg1+    ,["kind" Aeson..= arg2]+    ,"tags" Language.LSP.Protocol.Types.Common..=? arg3+    ,"deprecated" Language.LSP.Protocol.Types.Common..=? arg4+    ,["range" Aeson..= arg5]+    ,["selectionRange" Aeson..= arg6]+    ,"children" Language.LSP.Protocol.Types.Common..=? arg7]++instance Aeson.FromJSON DocumentSymbol where+  parseJSON = Aeson.withObject "DocumentSymbol" $ \arg -> DocumentSymbol <$> arg Aeson..: "name" <*> arg Aeson..:! "detail" <*> arg Aeson..: "kind" <*> arg Aeson..:! "tags" <*> arg Aeson..:! "deprecated" <*> arg Aeson..: "range" <*> arg Aeson..: "selectionRange" <*> arg Aeson..:! "children"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentSymbolClientCapabilities.hs view
@@ -0,0 +1,63 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentSymbolClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row as Row+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.SymbolKind+import qualified Language.LSP.Protocol.Internal.Types.SymbolTag+import qualified Language.LSP.Protocol.Types.Common++{-|+Client Capabilities for a `DocumentSymbolRequest`.+-}+data DocumentSymbolClientCapabilities = DocumentSymbolClientCapabilities +  { {-|+  Whether document symbol supports dynamic registration.+  -}+  _dynamicRegistration :: (Maybe Bool)+  , {-|+  Specific capabilities for the `SymbolKind` in the+  `textDocument/documentSymbol` request.+  -}+  _symbolKind :: (Maybe (Row.Rec ("valueSet" Row..== (Maybe [Language.LSP.Protocol.Internal.Types.SymbolKind.SymbolKind]) Row..+ Row.Empty)))+  , {-|+  The client supports hierarchical document symbols.+  -}+  _hierarchicalDocumentSymbolSupport :: (Maybe Bool)+  , {-|+  The client supports tags on `SymbolInformation`. Tags are supported on+  `DocumentSymbol` if `hierarchicalDocumentSymbolSupport` is set to true.+  Clients supporting tags have to handle unknown tags gracefully.++  @since 3.16.0+  -}+  _tagSupport :: (Maybe (Row.Rec ("valueSet" Row..== [Language.LSP.Protocol.Internal.Types.SymbolTag.SymbolTag] Row..+ Row.Empty)))+  , {-|+  The client supports an additional label presented in the UI when+  registering a document symbol provider.++  @since 3.16.0+  -}+  _labelSupport :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DocumentSymbolClientCapabilities where+  toJSON (DocumentSymbolClientCapabilities arg0 arg1 arg2 arg3 arg4) = Aeson.object $ concat $  ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+    ,"symbolKind" Language.LSP.Protocol.Types.Common..=? arg1+    ,"hierarchicalDocumentSymbolSupport" Language.LSP.Protocol.Types.Common..=? arg2+    ,"tagSupport" Language.LSP.Protocol.Types.Common..=? arg3+    ,"labelSupport" Language.LSP.Protocol.Types.Common..=? arg4]++instance Aeson.FromJSON DocumentSymbolClientCapabilities where+  parseJSON = Aeson.withObject "DocumentSymbolClientCapabilities" $ \arg -> DocumentSymbolClientCapabilities <$> arg Aeson..:! "dynamicRegistration" <*> arg Aeson..:! "symbolKind" <*> arg Aeson..:! "hierarchicalDocumentSymbolSupport" <*> arg Aeson..:! "tagSupport" <*> arg Aeson..:! "labelSupport"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentSymbolOptions.hs view
@@ -0,0 +1,41 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentSymbolOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+Provider options for a `DocumentSymbolRequest`.+-}+data DocumentSymbolOptions = DocumentSymbolOptions +  { {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  , {-|+  A human-readable string that is shown when multiple outlines trees+  are shown for the same document.++  @since 3.16.0+  -}+  _label :: (Maybe Data.Text.Text)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DocumentSymbolOptions where+  toJSON (DocumentSymbolOptions arg0 arg1) = Aeson.object $ concat $  ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0+    ,"label" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON DocumentSymbolOptions where+  parseJSON = Aeson.withObject "DocumentSymbolOptions" $ \arg -> DocumentSymbolOptions <$> arg Aeson..:! "workDoneProgress" <*> arg Aeson..:! "label"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentSymbolParams.hs view
@@ -0,0 +1,45 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentSymbolParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+Parameters for a `DocumentSymbolRequest`.+-}+data DocumentSymbolParams = DocumentSymbolParams +  { {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  An optional token that a server can use to report partial results (e.g. streaming) to+  the client.+  -}+  _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  The text document.+  -}+  _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DocumentSymbolParams where+  toJSON (DocumentSymbolParams arg0 arg1 arg2) = Aeson.object $ concat $  ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+    ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg1+    ,["textDocument" Aeson..= arg2]]++instance Aeson.FromJSON DocumentSymbolParams where+  parseJSON = Aeson.withObject "DocumentSymbolParams" $ \arg -> DocumentSymbolParams <$> arg Aeson..:! "workDoneToken" <*> arg Aeson..:! "partialResultToken" <*> arg Aeson..: "textDocument"
+ generated/Language/LSP/Protocol/Internal/Types/DocumentSymbolRegistrationOptions.hs view
@@ -0,0 +1,48 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.DocumentSymbolRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+Registration options for a `DocumentSymbolRequest`.+-}+data DocumentSymbolRegistrationOptions = DocumentSymbolRegistrationOptions +  { {-|+  A document selector to identify the scope of the registration. If set to null+  the document selector provided on the client side will be used.+  -}+  _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  , {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  , {-|+  A human-readable string that is shown when multiple outlines trees+  are shown for the same document.++  @since 3.16.0+  -}+  _label :: (Maybe Data.Text.Text)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON DocumentSymbolRegistrationOptions where+  toJSON (DocumentSymbolRegistrationOptions arg0 arg1 arg2) = Aeson.object $ concat $  [["documentSelector" Aeson..= arg0]+    ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1+    ,"label" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON DocumentSymbolRegistrationOptions where+  parseJSON = Aeson.withObject "DocumentSymbolRegistrationOptions" $ \arg -> DocumentSymbolRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Aeson..:! "workDoneProgress" <*> arg Aeson..:! "label"
+ generated/Language/LSP/Protocol/Internal/Types/ErrorCodes.hs view
@@ -0,0 +1,86 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ErrorCodes where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+Predefined error codes.+-}+data ErrorCodes = +    {-|++  -}+  ErrorCodes_ParseError+  | {-|++  -}+  ErrorCodes_InvalidRequest+  | {-|++  -}+  ErrorCodes_MethodNotFound+  | {-|++  -}+  ErrorCodes_InvalidParams+  | {-|++  -}+  ErrorCodes_InternalError+  | {-|+  Error code indicating that a server received a notification or+  request before the server has received the `initialize` request.+  -}+  ErrorCodes_ServerNotInitialized+  | {-|++  -}+  ErrorCodes_UnknownErrorCode+  | ErrorCodes_Custom Language.LSP.Protocol.Types.Common.Int32+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)+  deriving ( Aeson.ToJSON+  , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum ErrorCodes Language.LSP.Protocol.Types.Common.Int32)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum ErrorCodes where+  knownValues = Data.Set.fromList [ErrorCodes_ParseError+    ,ErrorCodes_InvalidRequest+    ,ErrorCodes_MethodNotFound+    ,ErrorCodes_InvalidParams+    ,ErrorCodes_InternalError+    ,ErrorCodes_ServerNotInitialized+    ,ErrorCodes_UnknownErrorCode]+  type EnumBaseType ErrorCodes = Language.LSP.Protocol.Types.Common.Int32+  toEnumBaseType ErrorCodes_ParseError = -32700+  toEnumBaseType ErrorCodes_InvalidRequest = -32600+  toEnumBaseType ErrorCodes_MethodNotFound = -32601+  toEnumBaseType ErrorCodes_InvalidParams = -32602+  toEnumBaseType ErrorCodes_InternalError = -32603+  toEnumBaseType ErrorCodes_ServerNotInitialized = -32002+  toEnumBaseType ErrorCodes_UnknownErrorCode = -32001+  toEnumBaseType (ErrorCodes_Custom arg) = arg++instance Language.LSP.Protocol.Types.LspEnum.LspOpenEnum ErrorCodes where+  fromOpenEnumBaseType -32700 = ErrorCodes_ParseError+  fromOpenEnumBaseType -32600 = ErrorCodes_InvalidRequest+  fromOpenEnumBaseType -32601 = ErrorCodes_MethodNotFound+  fromOpenEnumBaseType -32602 = ErrorCodes_InvalidParams+  fromOpenEnumBaseType -32603 = ErrorCodes_InternalError+  fromOpenEnumBaseType -32002 = ErrorCodes_ServerNotInitialized+  fromOpenEnumBaseType -32001 = ErrorCodes_UnknownErrorCode+  fromOpenEnumBaseType arg = ErrorCodes_Custom arg++
+ generated/Language/LSP/Protocol/Internal/Types/ExecuteCommandClientCapabilities.hs view
@@ -0,0 +1,32 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ExecuteCommandClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+The client capabilities of a `ExecuteCommandRequest`.+-}+data ExecuteCommandClientCapabilities = ExecuteCommandClientCapabilities +  { {-|+  Execute command supports dynamic registration.+  -}+  _dynamicRegistration :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON ExecuteCommandClientCapabilities where+  toJSON (ExecuteCommandClientCapabilities arg0) = Aeson.object $ concat $  ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON ExecuteCommandClientCapabilities where+  parseJSON = Aeson.withObject "ExecuteCommandClientCapabilities" $ \arg -> ExecuteCommandClientCapabilities <$> arg Aeson..:! "dynamicRegistration"
+ generated/Language/LSP/Protocol/Internal/Types/ExecuteCommandOptions.hs view
@@ -0,0 +1,38 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ExecuteCommandOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+The server capabilities of a `ExecuteCommandRequest`.+-}+data ExecuteCommandOptions = ExecuteCommandOptions +  { {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  , {-|+  The commands to be executed on the server+  -}+  _commands :: [Data.Text.Text]+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON ExecuteCommandOptions where+  toJSON (ExecuteCommandOptions arg0 arg1) = Aeson.object $ concat $  ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0+    ,["commands" Aeson..= arg1]]++instance Aeson.FromJSON ExecuteCommandOptions where+  parseJSON = Aeson.withObject "ExecuteCommandOptions" $ \arg -> ExecuteCommandOptions <$> arg Aeson..:! "workDoneProgress" <*> arg Aeson..: "commands"
+ generated/Language/LSP/Protocol/Internal/Types/ExecuteCommandParams.hs view
@@ -0,0 +1,45 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ExecuteCommandParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters of a `ExecuteCommandRequest`.+-}+data ExecuteCommandParams = ExecuteCommandParams +  { {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  The identifier of the actual command handler.+  -}+  _command :: Data.Text.Text+  , {-|+  Arguments that the command should be invoked with.+  -}+  _arguments :: (Maybe [Data.Aeson.Value])+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON ExecuteCommandParams where+  toJSON (ExecuteCommandParams arg0 arg1 arg2) = Aeson.object $ concat $  ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+    ,["command" Aeson..= arg1]+    ,"arguments" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON ExecuteCommandParams where+  parseJSON = Aeson.withObject "ExecuteCommandParams" $ \arg -> ExecuteCommandParams <$> arg Aeson..:! "workDoneToken" <*> arg Aeson..: "command" <*> arg Aeson..:! "arguments"
+ generated/Language/LSP/Protocol/Internal/Types/ExecuteCommandRegistrationOptions.hs view
@@ -0,0 +1,38 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ExecuteCommandRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+Registration options for a `ExecuteCommandRequest`.+-}+data ExecuteCommandRegistrationOptions = ExecuteCommandRegistrationOptions +  { {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  , {-|+  The commands to be executed on the server+  -}+  _commands :: [Data.Text.Text]+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON ExecuteCommandRegistrationOptions where+  toJSON (ExecuteCommandRegistrationOptions arg0 arg1) = Aeson.object $ concat $  ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0+    ,["commands" Aeson..= arg1]]++instance Aeson.FromJSON ExecuteCommandRegistrationOptions where+  parseJSON = Aeson.withObject "ExecuteCommandRegistrationOptions" $ \arg -> ExecuteCommandRegistrationOptions <$> arg Aeson..:! "workDoneProgress" <*> arg Aeson..: "commands"
+ generated/Language/LSP/Protocol/Internal/Types/ExecutionSummary.hs view
@@ -0,0 +1,40 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ExecutionSummary where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data ExecutionSummary = ExecutionSummary +  { {-|+  A strict monotonically increasing value+  indicating the execution order of a cell+  inside a notebook.+  -}+  _executionOrder :: Language.LSP.Protocol.Types.Common.UInt+  , {-|+  Whether the execution was successful or+  not if known by the client.+  -}+  _success :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON ExecutionSummary where+  toJSON (ExecutionSummary arg0 arg1) = Aeson.object $ concat $  [["executionOrder" Aeson..= arg0]+    ,"success" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON ExecutionSummary where+  parseJSON = Aeson.withObject "ExecutionSummary" $ \arg -> ExecutionSummary <$> arg Aeson..: "executionOrder" <*> arg Aeson..:! "success"
+ generated/Language/LSP/Protocol/Internal/Types/FailureHandlingKind.hs view
@@ -0,0 +1,65 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FailureHandlingKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.LspEnum++{-|++-}+data FailureHandlingKind = +    {-|+  Applying the workspace change is simply aborted if one of the changes provided+  fails. All operations executed before the failing operation stay executed.+  -}+  FailureHandlingKind_Abort+  | {-|+  All operations are executed transactional. That means they either all+  succeed or no changes at all are applied to the workspace.+  -}+  FailureHandlingKind_Transactional+  | {-|+  If the workspace edit contains only textual file changes they are executed transactional.+  If resource changes (create, rename or delete file) are part of the change the failure+  handling strategy is abort.+  -}+  FailureHandlingKind_TextOnlyTransactional+  | {-|+  The client tries to undo the operations already executed. But there is no+  guarantee that this is succeeding.+  -}+  FailureHandlingKind_Undo+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)+  deriving ( Aeson.ToJSON+  , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum FailureHandlingKind Data.Text.Text)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum FailureHandlingKind where+  knownValues = Data.Set.fromList [FailureHandlingKind_Abort+    ,FailureHandlingKind_Transactional+    ,FailureHandlingKind_TextOnlyTransactional+    ,FailureHandlingKind_Undo]+  type EnumBaseType FailureHandlingKind = Data.Text.Text+  toEnumBaseType FailureHandlingKind_Abort = "abort"+  toEnumBaseType FailureHandlingKind_Transactional = "transactional"+  toEnumBaseType FailureHandlingKind_TextOnlyTransactional = "textOnlyTransactional"+  toEnumBaseType FailureHandlingKind_Undo = "undo"+  fromEnumBaseType "abort" = pure FailureHandlingKind_Abort+  fromEnumBaseType "transactional" = pure FailureHandlingKind_Transactional+  fromEnumBaseType "textOnlyTransactional" = pure FailureHandlingKind_TextOnlyTransactional+  fromEnumBaseType "undo" = pure FailureHandlingKind_Undo+  fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/FileChangeType.hs view
@@ -0,0 +1,53 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FileChangeType where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+The file event type+-}+data FileChangeType = +    {-|+  The file got created.+  -}+  FileChangeType_Created+  | {-|+  The file got changed.+  -}+  FileChangeType_Changed+  | {-|+  The file got deleted.+  -}+  FileChangeType_Deleted+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)+  deriving ( Aeson.ToJSON+  , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum FileChangeType Language.LSP.Protocol.Types.Common.UInt)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum FileChangeType where+  knownValues = Data.Set.fromList [FileChangeType_Created+    ,FileChangeType_Changed+    ,FileChangeType_Deleted]+  type EnumBaseType FileChangeType = Language.LSP.Protocol.Types.Common.UInt+  toEnumBaseType FileChangeType_Created = 1+  toEnumBaseType FileChangeType_Changed = 2+  toEnumBaseType FileChangeType_Deleted = 3+  fromEnumBaseType 1 = pure FileChangeType_Created+  fromEnumBaseType 2 = pure FileChangeType_Changed+  fromEnumBaseType 3 = pure FileChangeType_Deleted+  fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/FileCreate.hs view
@@ -0,0 +1,35 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FileCreate where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+Represents information on a file/folder create.++@since 3.16.0+-}+data FileCreate = FileCreate +  { {-|+  A file:// URI for the location of the file/folder being created.+  -}+  _uri :: Data.Text.Text+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON FileCreate where+  toJSON (FileCreate arg0) = Aeson.object $ concat $  [["uri" Aeson..= arg0]]++instance Aeson.FromJSON FileCreate where+  parseJSON = Aeson.withObject "FileCreate" $ \arg -> FileCreate <$> arg Aeson..: "uri"
+ generated/Language/LSP/Protocol/Internal/Types/FileDelete.hs view
@@ -0,0 +1,35 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FileDelete where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+Represents information on a file/folder delete.++@since 3.16.0+-}+data FileDelete = FileDelete +  { {-|+  A file:// URI for the location of the file/folder being deleted.+  -}+  _uri :: Data.Text.Text+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON FileDelete where+  toJSON (FileDelete arg0) = Aeson.object $ concat $  [["uri" Aeson..= arg0]]++instance Aeson.FromJSON FileDelete where+  parseJSON = Aeson.withObject "FileDelete" $ \arg -> FileDelete <$> arg Aeson..: "uri"
+ generated/Language/LSP/Protocol/Internal/Types/FileEvent.hs view
@@ -0,0 +1,39 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FileEvent where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.FileChangeType+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+An event describing a file change.+-}+data FileEvent = FileEvent +  { {-|+  The file's uri.+  -}+  _uri :: Language.LSP.Protocol.Types.Uri.Uri+  , {-|+  The change type.+  -}+  _type_ :: Language.LSP.Protocol.Internal.Types.FileChangeType.FileChangeType+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON FileEvent where+  toJSON (FileEvent arg0 arg1) = Aeson.object $ concat $  [["uri" Aeson..= arg0]+    ,["type" Aeson..= arg1]]++instance Aeson.FromJSON FileEvent where+  parseJSON = Aeson.withObject "FileEvent" $ \arg -> FileEvent <$> arg Aeson..: "uri" <*> arg Aeson..: "type"
+ generated/Language/LSP/Protocol/Internal/Types/FileOperationClientCapabilities.hs view
@@ -0,0 +1,67 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FileOperationClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Capabilities relating to events from file operations by the user in the client.++These events do not come from the file system, they come from user operations+like renaming a file in the UI.++@since 3.16.0+-}+data FileOperationClientCapabilities = FileOperationClientCapabilities +  { {-|+  Whether the client supports dynamic registration for file requests/notifications.+  -}+  _dynamicRegistration :: (Maybe Bool)+  , {-|+  The client has support for sending didCreateFiles notifications.+  -}+  _didCreate :: (Maybe Bool)+  , {-|+  The client has support for sending willCreateFiles requests.+  -}+  _willCreate :: (Maybe Bool)+  , {-|+  The client has support for sending didRenameFiles notifications.+  -}+  _didRename :: (Maybe Bool)+  , {-|+  The client has support for sending willRenameFiles requests.+  -}+  _willRename :: (Maybe Bool)+  , {-|+  The client has support for sending didDeleteFiles notifications.+  -}+  _didDelete :: (Maybe Bool)+  , {-|+  The client has support for sending willDeleteFiles requests.+  -}+  _willDelete :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON FileOperationClientCapabilities where+  toJSON (FileOperationClientCapabilities arg0 arg1 arg2 arg3 arg4 arg5 arg6) = Aeson.object $ concat $  ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+    ,"didCreate" Language.LSP.Protocol.Types.Common..=? arg1+    ,"willCreate" Language.LSP.Protocol.Types.Common..=? arg2+    ,"didRename" Language.LSP.Protocol.Types.Common..=? arg3+    ,"willRename" Language.LSP.Protocol.Types.Common..=? arg4+    ,"didDelete" Language.LSP.Protocol.Types.Common..=? arg5+    ,"willDelete" Language.LSP.Protocol.Types.Common..=? arg6]++instance Aeson.FromJSON FileOperationClientCapabilities where+  parseJSON = Aeson.withObject "FileOperationClientCapabilities" $ \arg -> FileOperationClientCapabilities <$> arg Aeson..:! "dynamicRegistration" <*> arg Aeson..:! "didCreate" <*> arg Aeson..:! "willCreate" <*> arg Aeson..:! "didRename" <*> arg Aeson..:! "willRename" <*> arg Aeson..:! "didDelete" <*> arg Aeson..:! "willDelete"
+ generated/Language/LSP/Protocol/Internal/Types/FileOperationFilter.hs view
@@ -0,0 +1,42 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FileOperationFilter where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.FileOperationPattern+import qualified Language.LSP.Protocol.Types.Common++{-|+A filter to describe in which file operation requests or notifications+the server is interested in receiving.++@since 3.16.0+-}+data FileOperationFilter = FileOperationFilter +  { {-|+  A Uri scheme like `file` or `untitled`.+  -}+  _scheme :: (Maybe Data.Text.Text)+  , {-|+  The actual file operation pattern.+  -}+  _pattern :: Language.LSP.Protocol.Internal.Types.FileOperationPattern.FileOperationPattern+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON FileOperationFilter where+  toJSON (FileOperationFilter arg0 arg1) = Aeson.object $ concat $  ["scheme" Language.LSP.Protocol.Types.Common..=? arg0+    ,["pattern" Aeson..= arg1]]++instance Aeson.FromJSON FileOperationFilter where+  parseJSON = Aeson.withObject "FileOperationFilter" $ \arg -> FileOperationFilter <$> arg Aeson..:! "scheme" <*> arg Aeson..: "pattern"
+ generated/Language/LSP/Protocol/Internal/Types/FileOperationOptions.hs view
@@ -0,0 +1,60 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FileOperationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.FileOperationRegistrationOptions+import qualified Language.LSP.Protocol.Types.Common++{-|+Options for notifications/requests for user operations on files.++@since 3.16.0+-}+data FileOperationOptions = FileOperationOptions +  { {-|+  The server is interested in receiving didCreateFiles notifications.+  -}+  _didCreate :: (Maybe Language.LSP.Protocol.Internal.Types.FileOperationRegistrationOptions.FileOperationRegistrationOptions)+  , {-|+  The server is interested in receiving willCreateFiles requests.+  -}+  _willCreate :: (Maybe Language.LSP.Protocol.Internal.Types.FileOperationRegistrationOptions.FileOperationRegistrationOptions)+  , {-|+  The server is interested in receiving didRenameFiles notifications.+  -}+  _didRename :: (Maybe Language.LSP.Protocol.Internal.Types.FileOperationRegistrationOptions.FileOperationRegistrationOptions)+  , {-|+  The server is interested in receiving willRenameFiles requests.+  -}+  _willRename :: (Maybe Language.LSP.Protocol.Internal.Types.FileOperationRegistrationOptions.FileOperationRegistrationOptions)+  , {-|+  The server is interested in receiving didDeleteFiles file notifications.+  -}+  _didDelete :: (Maybe Language.LSP.Protocol.Internal.Types.FileOperationRegistrationOptions.FileOperationRegistrationOptions)+  , {-|+  The server is interested in receiving willDeleteFiles file requests.+  -}+  _willDelete :: (Maybe Language.LSP.Protocol.Internal.Types.FileOperationRegistrationOptions.FileOperationRegistrationOptions)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON FileOperationOptions where+  toJSON (FileOperationOptions arg0 arg1 arg2 arg3 arg4 arg5) = Aeson.object $ concat $  ["didCreate" Language.LSP.Protocol.Types.Common..=? arg0+    ,"willCreate" Language.LSP.Protocol.Types.Common..=? arg1+    ,"didRename" Language.LSP.Protocol.Types.Common..=? arg2+    ,"willRename" Language.LSP.Protocol.Types.Common..=? arg3+    ,"didDelete" Language.LSP.Protocol.Types.Common..=? arg4+    ,"willDelete" Language.LSP.Protocol.Types.Common..=? arg5]++instance Aeson.FromJSON FileOperationOptions where+  parseJSON = Aeson.withObject "FileOperationOptions" $ \arg -> FileOperationOptions <$> arg Aeson..:! "didCreate" <*> arg Aeson..:! "willCreate" <*> arg Aeson..:! "didRename" <*> arg Aeson..:! "willRename" <*> arg Aeson..:! "didDelete" <*> arg Aeson..:! "willDelete"
+ generated/Language/LSP/Protocol/Internal/Types/FileOperationPattern.hs view
@@ -0,0 +1,56 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FileOperationPattern where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.FileOperationPatternKind+import qualified Language.LSP.Protocol.Internal.Types.FileOperationPatternOptions+import qualified Language.LSP.Protocol.Types.Common++{-|+A pattern to describe in which file operation requests or notifications+the server is interested in receiving.++@since 3.16.0+-}+data FileOperationPattern = FileOperationPattern +  { {-|+  The glob pattern to match. Glob patterns can have the following syntax:+  - `*` to match one or more characters in a path segment+  - `?` to match on one character in a path segment+  - `**` to match any number of path segments, including none+  - `{}` to group sub patterns into an OR expression. (e.g. `**​/*.{ts,js}` matches all TypeScript and JavaScript files)+  - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)+  - `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`)+  -}+  _glob :: Data.Text.Text+  , {-|+  Whether to match files or folders with this pattern.++  Matches both if undefined.+  -}+  _matches :: (Maybe Language.LSP.Protocol.Internal.Types.FileOperationPatternKind.FileOperationPatternKind)+  , {-|+  Additional options used during matching.+  -}+  _options :: (Maybe Language.LSP.Protocol.Internal.Types.FileOperationPatternOptions.FileOperationPatternOptions)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON FileOperationPattern where+  toJSON (FileOperationPattern arg0 arg1 arg2) = Aeson.object $ concat $  [["glob" Aeson..= arg0]+    ,"matches" Language.LSP.Protocol.Types.Common..=? arg1+    ,"options" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON FileOperationPattern where+  parseJSON = Aeson.withObject "FileOperationPattern" $ \arg -> FileOperationPattern <$> arg Aeson..: "glob" <*> arg Aeson..:! "matches" <*> arg Aeson..:! "options"
+ generated/Language/LSP/Protocol/Internal/Types/FileOperationPatternKind.hs view
@@ -0,0 +1,49 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FileOperationPatternKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+A pattern kind describing if a glob pattern matches a file a folder or+both.++@since 3.16.0+-}+data FileOperationPatternKind = +    {-|+  The pattern matches a file only.+  -}+  FileOperationPatternKind_File+  | {-|+  The pattern matches a folder only.+  -}+  FileOperationPatternKind_Folder+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)+  deriving ( Aeson.ToJSON+  , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum FileOperationPatternKind Data.Text.Text)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum FileOperationPatternKind where+  knownValues = Data.Set.fromList [FileOperationPatternKind_File+    ,FileOperationPatternKind_Folder]+  type EnumBaseType FileOperationPatternKind = Data.Text.Text+  toEnumBaseType FileOperationPatternKind_File = "file"+  toEnumBaseType FileOperationPatternKind_Folder = "folder"+  fromEnumBaseType "file" = pure FileOperationPatternKind_File+  fromEnumBaseType "folder" = pure FileOperationPatternKind_Folder+  fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/FileOperationPatternOptions.hs view
@@ -0,0 +1,34 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FileOperationPatternOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Matching options for the file operation pattern.++@since 3.16.0+-}+data FileOperationPatternOptions = FileOperationPatternOptions +  { {-|+  The pattern should be matched ignoring casing.+  -}+  _ignoreCase :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON FileOperationPatternOptions where+  toJSON (FileOperationPatternOptions arg0) = Aeson.object $ concat $  ["ignoreCase" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON FileOperationPatternOptions where+  parseJSON = Aeson.withObject "FileOperationPatternOptions" $ \arg -> FileOperationPatternOptions <$> arg Aeson..:! "ignoreCase"
+ generated/Language/LSP/Protocol/Internal/Types/FileOperationRegistrationOptions.hs view
@@ -0,0 +1,35 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FileOperationRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.FileOperationFilter+import qualified Language.LSP.Protocol.Types.Common++{-|+The options to register for file operations.++@since 3.16.0+-}+data FileOperationRegistrationOptions = FileOperationRegistrationOptions +  { {-|+  The actual filters.+  -}+  _filters :: [Language.LSP.Protocol.Internal.Types.FileOperationFilter.FileOperationFilter]+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON FileOperationRegistrationOptions where+  toJSON (FileOperationRegistrationOptions arg0) = Aeson.object $ concat $  [["filters" Aeson..= arg0]]++instance Aeson.FromJSON FileOperationRegistrationOptions where+  parseJSON = Aeson.withObject "FileOperationRegistrationOptions" $ \arg -> FileOperationRegistrationOptions <$> arg Aeson..: "filters"
+ generated/Language/LSP/Protocol/Internal/Types/FileRename.hs view
@@ -0,0 +1,40 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FileRename where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+Represents information on a file/folder rename.++@since 3.16.0+-}+data FileRename = FileRename +  { {-|+  A file:// URI for the original location of the file/folder being renamed.+  -}+  _oldUri :: Data.Text.Text+  , {-|+  A file:// URI for the new location of the file/folder being renamed.+  -}+  _newUri :: Data.Text.Text+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON FileRename where+  toJSON (FileRename arg0 arg1) = Aeson.object $ concat $  [["oldUri" Aeson..= arg0]+    ,["newUri" Aeson..= arg1]]++instance Aeson.FromJSON FileRename where+  parseJSON = Aeson.withObject "FileRename" $ \arg -> FileRename <$> arg Aeson..: "oldUri" <*> arg Aeson..: "newUri"
+ generated/Language/LSP/Protocol/Internal/Types/FileSystemWatcher.hs view
@@ -0,0 +1,43 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FileSystemWatcher where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.GlobPattern+import qualified Language.LSP.Protocol.Internal.Types.WatchKind+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data FileSystemWatcher = FileSystemWatcher +  { {-|+  The glob pattern to watch. See `GlobPattern` for more detail.++  @since 3.17.0 support for relative patterns.+  -}+  _globPattern :: Language.LSP.Protocol.Internal.Types.GlobPattern.GlobPattern+  , {-|+  The kind of events of interest. If omitted it defaults+  to WatchKind.Create | WatchKind.Change | WatchKind.Delete+  which is 7.+  -}+  _kind :: (Maybe Language.LSP.Protocol.Internal.Types.WatchKind.WatchKind)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON FileSystemWatcher where+  toJSON (FileSystemWatcher arg0 arg1) = Aeson.object $ concat $  [["globPattern" Aeson..= arg0]+    ,"kind" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON FileSystemWatcher where+  parseJSON = Aeson.withObject "FileSystemWatcher" $ \arg -> FileSystemWatcher <$> arg Aeson..: "globPattern" <*> arg Aeson..:! "kind"
+ generated/Language/LSP/Protocol/Internal/Types/FoldingRange.hs view
@@ -0,0 +1,68 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FoldingRange where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.FoldingRangeKind+import qualified Language.LSP.Protocol.Types.Common++{-|+Represents a folding range. To be valid, start and end line must be bigger than zero and smaller+than the number of lines in the document. Clients are free to ignore invalid ranges.+-}+data FoldingRange = FoldingRange +  { {-|+  The zero-based start line of the range to fold. The folded area starts after the line's last character.+  To be valid, the end must be zero or larger and smaller than the number of lines in the document.+  -}+  _startLine :: Language.LSP.Protocol.Types.Common.UInt+  , {-|+  The zero-based character offset from where the folded range starts. If not defined, defaults to the length of the start line.+  -}+  _startCharacter :: (Maybe Language.LSP.Protocol.Types.Common.UInt)+  , {-|+  The zero-based end line of the range to fold. The folded area ends with the line's last character.+  To be valid, the end must be zero or larger and smaller than the number of lines in the document.+  -}+  _endLine :: Language.LSP.Protocol.Types.Common.UInt+  , {-|+  The zero-based character offset before the folded range ends. If not defined, defaults to the length of the end line.+  -}+  _endCharacter :: (Maybe Language.LSP.Protocol.Types.Common.UInt)+  , {-|+  Describes the kind of the folding range such as `comment' or 'region'. The kind+  is used to categorize folding ranges and used by commands like 'Fold all comments'.+  See `FoldingRangeKind` for an enumeration of standardized kinds.+  -}+  _kind :: (Maybe Language.LSP.Protocol.Internal.Types.FoldingRangeKind.FoldingRangeKind)+  , {-|+  The text that the client should show when the specified range is+  collapsed. If not defined or not supported by the client, a default+  will be chosen by the client.++  @since 3.17.0+  -}+  _collapsedText :: (Maybe Data.Text.Text)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON FoldingRange where+  toJSON (FoldingRange arg0 arg1 arg2 arg3 arg4 arg5) = Aeson.object $ concat $  [["startLine" Aeson..= arg0]+    ,"startCharacter" Language.LSP.Protocol.Types.Common..=? arg1+    ,["endLine" Aeson..= arg2]+    ,"endCharacter" Language.LSP.Protocol.Types.Common..=? arg3+    ,"kind" Language.LSP.Protocol.Types.Common..=? arg4+    ,"collapsedText" Language.LSP.Protocol.Types.Common..=? arg5]++instance Aeson.FromJSON FoldingRange where+  parseJSON = Aeson.withObject "FoldingRange" $ \arg -> FoldingRange <$> arg Aeson..: "startLine" <*> arg Aeson..:! "startCharacter" <*> arg Aeson..: "endLine" <*> arg Aeson..:! "endCharacter" <*> arg Aeson..:! "kind" <*> arg Aeson..:! "collapsedText"
+ generated/Language/LSP/Protocol/Internal/Types/FoldingRangeClientCapabilities.hs view
@@ -0,0 +1,65 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FoldingRangeClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row as Row+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.FoldingRangeKind+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data FoldingRangeClientCapabilities = FoldingRangeClientCapabilities +  { {-|+  Whether implementation supports dynamic registration for folding range+  providers. If this is set to `true` the client supports the new+  `FoldingRangeRegistrationOptions` return value for the corresponding+  server capability as well.+  -}+  _dynamicRegistration :: (Maybe Bool)+  , {-|+  The maximum number of folding ranges that the client prefers to receive+  per document. The value serves as a hint, servers are free to follow the+  limit.+  -}+  _rangeLimit :: (Maybe Language.LSP.Protocol.Types.Common.UInt)+  , {-|+  If set, the client signals that it only supports folding complete lines.+  If set, client will ignore specified `startCharacter` and `endCharacter`+  properties in a FoldingRange.+  -}+  _lineFoldingOnly :: (Maybe Bool)+  , {-|+  Specific options for the folding range kind.++  @since 3.17.0+  -}+  _foldingRangeKind :: (Maybe (Row.Rec ("valueSet" Row..== (Maybe [Language.LSP.Protocol.Internal.Types.FoldingRangeKind.FoldingRangeKind]) Row..+ Row.Empty)))+  , {-|+  Specific options for the folding range.++  @since 3.17.0+  -}+  _foldingRange :: (Maybe (Row.Rec ("collapsedText" Row..== (Maybe Bool) Row..+ Row.Empty)))+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON FoldingRangeClientCapabilities where+  toJSON (FoldingRangeClientCapabilities arg0 arg1 arg2 arg3 arg4) = Aeson.object $ concat $  ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+    ,"rangeLimit" Language.LSP.Protocol.Types.Common..=? arg1+    ,"lineFoldingOnly" Language.LSP.Protocol.Types.Common..=? arg2+    ,"foldingRangeKind" Language.LSP.Protocol.Types.Common..=? arg3+    ,"foldingRange" Language.LSP.Protocol.Types.Common..=? arg4]++instance Aeson.FromJSON FoldingRangeClientCapabilities where+  parseJSON = Aeson.withObject "FoldingRangeClientCapabilities" $ \arg -> FoldingRangeClientCapabilities <$> arg Aeson..:! "dynamicRegistration" <*> arg Aeson..:! "rangeLimit" <*> arg Aeson..:! "lineFoldingOnly" <*> arg Aeson..:! "foldingRangeKind" <*> arg Aeson..:! "foldingRange"
+ generated/Language/LSP/Protocol/Internal/Types/FoldingRangeKind.hs view
@@ -0,0 +1,58 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FoldingRangeKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+A set of predefined range kinds.+-}+data FoldingRangeKind = +    {-|+  Folding range for a comment+  -}+  FoldingRangeKind_Comment+  | {-|+  Folding range for an import or include+  -}+  FoldingRangeKind_Imports+  | {-|+  Folding range for a region (e.g. `#region`)+  -}+  FoldingRangeKind_Region+  | FoldingRangeKind_Custom Data.Text.Text+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)+  deriving ( Aeson.ToJSON+  , Aeson.FromJSON+  , Data.String.IsString ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum FoldingRangeKind Data.Text.Text)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum FoldingRangeKind where+  knownValues = Data.Set.fromList [FoldingRangeKind_Comment+    ,FoldingRangeKind_Imports+    ,FoldingRangeKind_Region]+  type EnumBaseType FoldingRangeKind = Data.Text.Text+  toEnumBaseType FoldingRangeKind_Comment = "comment"+  toEnumBaseType FoldingRangeKind_Imports = "imports"+  toEnumBaseType FoldingRangeKind_Region = "region"+  toEnumBaseType (FoldingRangeKind_Custom arg) = arg++instance Language.LSP.Protocol.Types.LspEnum.LspOpenEnum FoldingRangeKind where+  fromOpenEnumBaseType "comment" = FoldingRangeKind_Comment+  fromOpenEnumBaseType "imports" = FoldingRangeKind_Imports+  fromOpenEnumBaseType "region" = FoldingRangeKind_Region+  fromOpenEnumBaseType arg = FoldingRangeKind_Custom arg++
+ generated/Language/LSP/Protocol/Internal/Types/FoldingRangeOptions.hs view
@@ -0,0 +1,32 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FoldingRangeOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data FoldingRangeOptions = FoldingRangeOptions +  { {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON FoldingRangeOptions where+  toJSON (FoldingRangeOptions arg0) = Aeson.object $ concat $  ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON FoldingRangeOptions where+  parseJSON = Aeson.withObject "FoldingRangeOptions" $ \arg -> FoldingRangeOptions <$> arg Aeson..:! "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/FoldingRangeParams.hs view
@@ -0,0 +1,45 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FoldingRangeParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+Parameters for a `FoldingRangeRequest`.+-}+data FoldingRangeParams = FoldingRangeParams +  { {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  An optional token that a server can use to report partial results (e.g. streaming) to+  the client.+  -}+  _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  The text document.+  -}+  _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON FoldingRangeParams where+  toJSON (FoldingRangeParams arg0 arg1 arg2) = Aeson.object $ concat $  ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+    ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg1+    ,["textDocument" Aeson..= arg2]]++instance Aeson.FromJSON FoldingRangeParams where+  parseJSON = Aeson.withObject "FoldingRangeParams" $ \arg -> FoldingRangeParams <$> arg Aeson..:! "workDoneToken" <*> arg Aeson..:! "partialResultToken" <*> arg Aeson..: "textDocument"
+ generated/Language/LSP/Protocol/Internal/Types/FoldingRangeRegistrationOptions.hs view
@@ -0,0 +1,46 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FoldingRangeRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data FoldingRangeRegistrationOptions = FoldingRangeRegistrationOptions +  { {-|+  A document selector to identify the scope of the registration. If set to null+  the document selector provided on the client side will be used.+  -}+  _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  , {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  , {-|+  The id used to register the request. The id can be used to deregister+  the request again. See also Registration#id.+  -}+  _id :: (Maybe Data.Text.Text)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON FoldingRangeRegistrationOptions where+  toJSON (FoldingRangeRegistrationOptions arg0 arg1 arg2) = Aeson.object $ concat $  [["documentSelector" Aeson..= arg0]+    ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1+    ,"id" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON FoldingRangeRegistrationOptions where+  parseJSON = Aeson.withObject "FoldingRangeRegistrationOptions" $ \arg -> FoldingRangeRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Aeson..:! "workDoneProgress" <*> arg Aeson..:! "id"
+ generated/Language/LSP/Protocol/Internal/Types/FormattingOptions.hs view
@@ -0,0 +1,58 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FormattingOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Value-object describing what options formatting should use.+-}+data FormattingOptions = FormattingOptions +  { {-|+  Size of a tab in spaces.+  -}+  _tabSize :: Language.LSP.Protocol.Types.Common.UInt+  , {-|+  Prefer spaces over tabs.+  -}+  _insertSpaces :: Bool+  , {-|+  Trim trailing whitespace on a line.++  @since 3.15.0+  -}+  _trimTrailingWhitespace :: (Maybe Bool)+  , {-|+  Insert a newline character at the end of the file if one does not exist.++  @since 3.15.0+  -}+  _insertFinalNewline :: (Maybe Bool)+  , {-|+  Trim all newlines after the final newline at the end of the file.++  @since 3.15.0+  -}+  _trimFinalNewlines :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON FormattingOptions where+  toJSON (FormattingOptions arg0 arg1 arg2 arg3 arg4) = Aeson.object $ concat $  [["tabSize" Aeson..= arg0]+    ,["insertSpaces" Aeson..= arg1]+    ,"trimTrailingWhitespace" Language.LSP.Protocol.Types.Common..=? arg2+    ,"insertFinalNewline" Language.LSP.Protocol.Types.Common..=? arg3+    ,"trimFinalNewlines" Language.LSP.Protocol.Types.Common..=? arg4]++instance Aeson.FromJSON FormattingOptions where+  parseJSON = Aeson.withObject "FormattingOptions" $ \arg -> FormattingOptions <$> arg Aeson..: "tabSize" <*> arg Aeson..: "insertSpaces" <*> arg Aeson..:! "trimTrailingWhitespace" <*> arg Aeson..:! "insertFinalNewline" <*> arg Aeson..:! "trimFinalNewlines"
+ generated/Language/LSP/Protocol/Internal/Types/FullDocumentDiagnosticReport.hs view
@@ -0,0 +1,49 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.FullDocumentDiagnosticReport where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Diagnostic+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Singletons++{-|+A diagnostic report with a full set of problems.++@since 3.17.0+-}+data FullDocumentDiagnosticReport = FullDocumentDiagnosticReport +  { {-|+  A full document diagnostic report.+  -}+  _kind :: (Language.LSP.Protocol.Types.Singletons.AString "full")+  , {-|+  An optional result id. If provided it will+  be sent on the next diagnostic request for the+  same document.+  -}+  _resultId :: (Maybe Data.Text.Text)+  , {-|+  The actual items.+  -}+  _items :: [Language.LSP.Protocol.Internal.Types.Diagnostic.Diagnostic]+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON FullDocumentDiagnosticReport where+  toJSON (FullDocumentDiagnosticReport arg0 arg1 arg2) = Aeson.object $ concat $  [["kind" Aeson..= arg0]+    ,"resultId" Language.LSP.Protocol.Types.Common..=? arg1+    ,["items" Aeson..= arg2]]++instance Aeson.FromJSON FullDocumentDiagnosticReport where+  parseJSON = Aeson.withObject "FullDocumentDiagnosticReport" $ \arg -> FullDocumentDiagnosticReport <$> arg Aeson..: "kind" <*> arg Aeson..:! "resultId" <*> arg Aeson..: "items"
+ generated/Language/LSP/Protocol/Internal/Types/GeneralClientCapabilities.hs view
@@ -0,0 +1,80 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.GeneralClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row as Row+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.MarkdownClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.PositionEncodingKind+import qualified Language.LSP.Protocol.Internal.Types.RegularExpressionsClientCapabilities+import qualified Language.LSP.Protocol.Types.Common++{-|+General client capabilities.++@since 3.16.0+-}+data GeneralClientCapabilities = GeneralClientCapabilities +  { {-|+  Client capability that signals how the client+  handles stale requests (e.g. a request+  for which the client will not process the response+  anymore since the information is outdated).++  @since 3.17.0+  -}+  _staleRequestSupport :: (Maybe (Row.Rec ("cancel" Row..== Bool Row..+ ("retryOnContentModified" Row..== [Data.Text.Text] Row..+ Row.Empty))))+  , {-|+  Client capabilities specific to regular expressions.++  @since 3.16.0+  -}+  _regularExpressions :: (Maybe Language.LSP.Protocol.Internal.Types.RegularExpressionsClientCapabilities.RegularExpressionsClientCapabilities)+  , {-|+  Client capabilities specific to the client's markdown parser.++  @since 3.16.0+  -}+  _markdown :: (Maybe Language.LSP.Protocol.Internal.Types.MarkdownClientCapabilities.MarkdownClientCapabilities)+  , {-|+  The position encodings supported by the client. Client and server+  have to agree on the same position encoding to ensure that offsets+  (e.g. character position in a line) are interpreted the same on both+  sides.++  To keep the protocol backwards compatible the following applies: if+  the value 'utf-16' is missing from the array of position encodings+  servers can assume that the client supports UTF-16. UTF-16 is+  therefore a mandatory encoding.++  If omitted it defaults to ['utf-16'].++  Implementation considerations: since the conversion from one encoding+  into another requires the content of the file / line the conversion+  is best done where the file is read which is usually on the server+  side.++  @since 3.17.0+  -}+  _positionEncodings :: (Maybe [Language.LSP.Protocol.Internal.Types.PositionEncodingKind.PositionEncodingKind])+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON GeneralClientCapabilities where+  toJSON (GeneralClientCapabilities arg0 arg1 arg2 arg3) = Aeson.object $ concat $  ["staleRequestSupport" Language.LSP.Protocol.Types.Common..=? arg0+    ,"regularExpressions" Language.LSP.Protocol.Types.Common..=? arg1+    ,"markdown" Language.LSP.Protocol.Types.Common..=? arg2+    ,"positionEncodings" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON GeneralClientCapabilities where+  parseJSON = Aeson.withObject "GeneralClientCapabilities" $ \arg -> GeneralClientCapabilities <$> arg Aeson..:! "staleRequestSupport" <*> arg Aeson..:! "regularExpressions" <*> arg Aeson..:! "markdown" <*> arg Aeson..:! "positionEncodings"
+ generated/Language/LSP/Protocol/Internal/Types/GlobPattern.hs view
@@ -0,0 +1,26 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.GlobPattern where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Pattern+import qualified Language.LSP.Protocol.Internal.Types.RelativePattern+import qualified Language.LSP.Protocol.Types.Common++{-|+The glob pattern. Either a string pattern or a relative pattern.++@since 3.17.0+-}+newtype GlobPattern = GlobPattern (Language.LSP.Protocol.Internal.Types.Pattern.Pattern Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.RelativePattern.RelativePattern)+  deriving newtype (Aeson.ToJSON, Aeson.FromJSON)+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)
+ generated/Language/LSP/Protocol/Internal/Types/Hover.hs view
@@ -0,0 +1,41 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.Hover where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.MarkedString+import qualified Language.LSP.Protocol.Internal.Types.MarkupContent+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|+The result of a hover request.+-}+data Hover = Hover +  { {-|+  The hover's content+  -}+  _contents :: (Language.LSP.Protocol.Internal.Types.MarkupContent.MarkupContent Language.LSP.Protocol.Types.Common.|? (Language.LSP.Protocol.Internal.Types.MarkedString.MarkedString Language.LSP.Protocol.Types.Common.|? [Language.LSP.Protocol.Internal.Types.MarkedString.MarkedString]))+  , {-|+  An optional range inside the text document that is used to+  visualize the hover, e.g. by changing the background color.+  -}+  _range :: (Maybe Language.LSP.Protocol.Internal.Types.Range.Range)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON Hover where+  toJSON (Hover arg0 arg1) = Aeson.object $ concat $  [["contents" Aeson..= arg0]+    ,"range" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON Hover where+  parseJSON = Aeson.withObject "Hover" $ \arg -> Hover <$> arg Aeson..: "contents" <*> arg Aeson..:! "range"
+ generated/Language/LSP/Protocol/Internal/Types/HoverClientCapabilities.hs view
@@ -0,0 +1,39 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.HoverClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.MarkupKind+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data HoverClientCapabilities = HoverClientCapabilities +  { {-|+  Whether hover supports dynamic registration.+  -}+  _dynamicRegistration :: (Maybe Bool)+  , {-|+  Client supports the following content formats for the content+  property. The order describes the preferred format of the client.+  -}+  _contentFormat :: (Maybe [Language.LSP.Protocol.Internal.Types.MarkupKind.MarkupKind])+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON HoverClientCapabilities where+  toJSON (HoverClientCapabilities arg0 arg1) = Aeson.object $ concat $  ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+    ,"contentFormat" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON HoverClientCapabilities where+  parseJSON = Aeson.withObject "HoverClientCapabilities" $ \arg -> HoverClientCapabilities <$> arg Aeson..:! "dynamicRegistration" <*> arg Aeson..:! "contentFormat"
+ generated/Language/LSP/Protocol/Internal/Types/HoverOptions.hs view
@@ -0,0 +1,32 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.HoverOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Hover options.+-}+data HoverOptions = HoverOptions +  { {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON HoverOptions where+  toJSON (HoverOptions arg0) = Aeson.object $ concat $  ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON HoverOptions where+  parseJSON = Aeson.withObject "HoverOptions" $ \arg -> HoverOptions <$> arg Aeson..:! "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/HoverParams.hs view
@@ -0,0 +1,45 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.HoverParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+Parameters for a `HoverRequest`.+-}+data HoverParams = HoverParams +  { {-|+  The text document.+  -}+  _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+  , {-|+  The position inside the text document.+  -}+  _position :: Language.LSP.Protocol.Internal.Types.Position.Position+  , {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON HoverParams where+  toJSON (HoverParams arg0 arg1 arg2) = Aeson.object $ concat $  [["textDocument" Aeson..= arg0]+    ,["position" Aeson..= arg1]+    ,"workDoneToken" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON HoverParams where+  parseJSON = Aeson.withObject "HoverParams" $ \arg -> HoverParams <$> arg Aeson..: "textDocument" <*> arg Aeson..: "position" <*> arg Aeson..:! "workDoneToken"
+ generated/Language/LSP/Protocol/Internal/Types/HoverRegistrationOptions.hs view
@@ -0,0 +1,39 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.HoverRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+Registration options for a `HoverRequest`.+-}+data HoverRegistrationOptions = HoverRegistrationOptions +  { {-|+  A document selector to identify the scope of the registration. If set to null+  the document selector provided on the client side will be used.+  -}+  _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  , {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON HoverRegistrationOptions where+  toJSON (HoverRegistrationOptions arg0 arg1) = Aeson.object $ concat $  [["documentSelector" Aeson..= arg0]+    ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON HoverRegistrationOptions where+  parseJSON = Aeson.withObject "HoverRegistrationOptions" $ \arg -> HoverRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Aeson..:! "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/ImplementationClientCapabilities.hs view
@@ -0,0 +1,41 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ImplementationClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.6.0+-}+data ImplementationClientCapabilities = ImplementationClientCapabilities +  { {-|+  Whether implementation supports dynamic registration. If this is set to `true`+  the client supports the new `ImplementationRegistrationOptions` return value+  for the corresponding server capability as well.+  -}+  _dynamicRegistration :: (Maybe Bool)+  , {-|+  The client supports additional metadata in the form of definition links.++  @since 3.14.0+  -}+  _linkSupport :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON ImplementationClientCapabilities where+  toJSON (ImplementationClientCapabilities arg0 arg1) = Aeson.object $ concat $  ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+    ,"linkSupport" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON ImplementationClientCapabilities where+  parseJSON = Aeson.withObject "ImplementationClientCapabilities" $ \arg -> ImplementationClientCapabilities <$> arg Aeson..:! "dynamicRegistration" <*> arg Aeson..:! "linkSupport"
+ generated/Language/LSP/Protocol/Internal/Types/ImplementationOptions.hs view
@@ -0,0 +1,32 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ImplementationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data ImplementationOptions = ImplementationOptions +  { {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON ImplementationOptions where+  toJSON (ImplementationOptions arg0) = Aeson.object $ concat $  ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON ImplementationOptions where+  parseJSON = Aeson.withObject "ImplementationOptions" $ \arg -> ImplementationOptions <$> arg Aeson..:! "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/ImplementationParams.hs view
@@ -0,0 +1,51 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ImplementationParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data ImplementationParams = ImplementationParams +  { {-|+  The text document.+  -}+  _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+  , {-|+  The position inside the text document.+  -}+  _position :: Language.LSP.Protocol.Internal.Types.Position.Position+  , {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  An optional token that a server can use to report partial results (e.g. streaming) to+  the client.+  -}+  _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON ImplementationParams where+  toJSON (ImplementationParams arg0 arg1 arg2 arg3) = Aeson.object $ concat $  [["textDocument" Aeson..= arg0]+    ,["position" Aeson..= arg1]+    ,"workDoneToken" Language.LSP.Protocol.Types.Common..=? arg2+    ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON ImplementationParams where+  parseJSON = Aeson.withObject "ImplementationParams" $ \arg -> ImplementationParams <$> arg Aeson..: "textDocument" <*> arg Aeson..: "position" <*> arg Aeson..:! "workDoneToken" <*> arg Aeson..:! "partialResultToken"
+ generated/Language/LSP/Protocol/Internal/Types/ImplementationRegistrationOptions.hs view
@@ -0,0 +1,46 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ImplementationRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data ImplementationRegistrationOptions = ImplementationRegistrationOptions +  { {-|+  A document selector to identify the scope of the registration. If set to null+  the document selector provided on the client side will be used.+  -}+  _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  , {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  , {-|+  The id used to register the request. The id can be used to deregister+  the request again. See also Registration#id.+  -}+  _id :: (Maybe Data.Text.Text)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON ImplementationRegistrationOptions where+  toJSON (ImplementationRegistrationOptions arg0 arg1 arg2) = Aeson.object $ concat $  [["documentSelector" Aeson..= arg0]+    ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1+    ,"id" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON ImplementationRegistrationOptions where+  parseJSON = Aeson.withObject "ImplementationRegistrationOptions" $ \arg -> ImplementationRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Aeson..:! "workDoneProgress" <*> arg Aeson..:! "id"
+ generated/Language/LSP/Protocol/Internal/Types/InitializeError.hs view
@@ -0,0 +1,36 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InitializeError where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+The data type of the ResponseError if the+initialize request fails.+-}+data InitializeError = InitializeError +  { {-|+  Indicates whether the client execute the following retry logic:+  (1) show the message provided by the ResponseError to the user+  (2) user selects retry or cancel+  (3) if user selected retry the initialize method is sent again.+  -}+  _retry :: Bool+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON InitializeError where+  toJSON (InitializeError arg0) = Aeson.object $ concat $  [["retry" Aeson..= arg0]]++instance Aeson.FromJSON InitializeError where+  parseJSON = Aeson.withObject "InitializeError" $ \arg -> InitializeError <$> arg Aeson..: "retry"
+ generated/Language/LSP/Protocol/Internal/Types/InitializeParams.hs view
@@ -0,0 +1,113 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InitializeParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row as Row+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.ClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TraceValues+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceFolder+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-# DEPRECATED _rootPath "in favour of rootUri." #-}+{-# DEPRECATED _rootUri "in favour of workspaceFolders." #-}+{-|++-}+data InitializeParams = InitializeParams +  { {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  The process Id of the parent process that started+  the server.++  Is `null` if the process has not been started by another process.+  If the parent process is not alive then the server should exit.+  -}+  _processId :: (Language.LSP.Protocol.Types.Common.Int32 Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  , {-|+  Information about the client++  @since 3.15.0+  -}+  _clientInfo :: (Maybe (Row.Rec ("name" Row..== Data.Text.Text Row..+ ("version" Row..== (Maybe Data.Text.Text) Row..+ Row.Empty))))+  , {-|+  The locale the client is currently showing the user interface+  in. This must not necessarily be the locale of the operating+  system.++  Uses IETF language tags as the value's syntax+  (See https://en.wikipedia.org/wiki/IETF_language_tag)++  @since 3.16.0+  -}+  _locale :: (Maybe Data.Text.Text)+  , {-|+  The rootPath of the workspace. Is null+  if no folder is open.++  @deprecated in favour of rootUri.+  -}+  _rootPath :: (Maybe (Data.Text.Text Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null))+  , {-|+  The rootUri of the workspace. Is null if no+  folder is open. If both `rootPath` and `rootUri` are set+  `rootUri` wins.++  @deprecated in favour of workspaceFolders.+  -}+  _rootUri :: (Language.LSP.Protocol.Types.Uri.Uri Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  , {-|+  The capabilities provided by the client (editor or tool)+  -}+  _capabilities :: Language.LSP.Protocol.Internal.Types.ClientCapabilities.ClientCapabilities+  , {-|+  User provided initialization options.+  -}+  _initializationOptions :: (Maybe Data.Aeson.Value)+  , {-|+  The initial trace setting. If omitted trace is disabled ('off').+  -}+  _trace :: (Maybe Language.LSP.Protocol.Internal.Types.TraceValues.TraceValues)+  , {-|+  The workspace folders configured in the client when the server starts.++  This property is only available if the client supports workspace folders.+  It can be `null` if the client supports workspace folders but none are+  configured.++  @since 3.6.0+  -}+  _workspaceFolders :: (Maybe ([Language.LSP.Protocol.Internal.Types.WorkspaceFolder.WorkspaceFolder] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null))+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON InitializeParams where+  toJSON (InitializeParams arg0 arg1 arg2 arg3 arg4 arg5 arg6 arg7 arg8 arg9) = Aeson.object $ concat $  ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+    ,["processId" Aeson..= arg1]+    ,"clientInfo" Language.LSP.Protocol.Types.Common..=? arg2+    ,"locale" Language.LSP.Protocol.Types.Common..=? arg3+    ,"rootPath" Language.LSP.Protocol.Types.Common..=? arg4+    ,["rootUri" Aeson..= arg5]+    ,["capabilities" Aeson..= arg6]+    ,"initializationOptions" Language.LSP.Protocol.Types.Common..=? arg7+    ,"trace" Language.LSP.Protocol.Types.Common..=? arg8+    ,"workspaceFolders" Language.LSP.Protocol.Types.Common..=? arg9]++instance Aeson.FromJSON InitializeParams where+  parseJSON = Aeson.withObject "InitializeParams" $ \arg -> InitializeParams <$> arg Aeson..:! "workDoneToken" <*> arg Aeson..: "processId" <*> arg Aeson..:! "clientInfo" <*> arg Aeson..:! "locale" <*> arg Aeson..:! "rootPath" <*> arg Aeson..: "rootUri" <*> arg Aeson..: "capabilities" <*> arg Aeson..:! "initializationOptions" <*> arg Aeson..:! "trace" <*> arg Aeson..:! "workspaceFolders"
+ generated/Language/LSP/Protocol/Internal/Types/InitializeResult.hs view
@@ -0,0 +1,42 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InitializeResult where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row as Row+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.ServerCapabilities+import qualified Language.LSP.Protocol.Types.Common++{-|+The result returned from an initialize request.+-}+data InitializeResult = InitializeResult +  { {-|+  The capabilities the language server provides.+  -}+  _capabilities :: Language.LSP.Protocol.Internal.Types.ServerCapabilities.ServerCapabilities+  , {-|+  Information about the server.++  @since 3.15.0+  -}+  _serverInfo :: (Maybe (Row.Rec ("name" Row..== Data.Text.Text Row..+ ("version" Row..== (Maybe Data.Text.Text) Row..+ Row.Empty))))+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON InitializeResult where+  toJSON (InitializeResult arg0 arg1) = Aeson.object $ concat $  [["capabilities" Aeson..= arg0]+    ,"serverInfo" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON InitializeResult where+  parseJSON = Aeson.withObject "InitializeResult" $ \arg -> InitializeResult <$> arg Aeson..: "capabilities" <*> arg Aeson..:! "serverInfo"
+ generated/Language/LSP/Protocol/Internal/Types/InitializedParams.hs view
@@ -0,0 +1,29 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InitializedParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data InitializedParams = InitializedParams +  { +  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON InitializedParams where+  toJSON (InitializedParams ) = Aeson.object $ concat $  []++instance Aeson.FromJSON InitializedParams where+  parseJSON = Aeson.withObject "InitializedParams" $ \arg -> pure InitializedParams
+ generated/Language/LSP/Protocol/Internal/Types/InlayHint.hs view
@@ -0,0 +1,93 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InlayHint where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.InlayHintKind+import qualified Language.LSP.Protocol.Internal.Types.InlayHintLabelPart+import qualified Language.LSP.Protocol.Internal.Types.MarkupContent+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Internal.Types.TextEdit+import qualified Language.LSP.Protocol.Types.Common++{-|+Inlay hint information.++@since 3.17.0+-}+data InlayHint = InlayHint +  { {-|+  The position of this hint.+  -}+  _position :: Language.LSP.Protocol.Internal.Types.Position.Position+  , {-|+  The label of this hint. A human readable string or an array of+  InlayHintLabelPart label parts.++  *Note* that neither the string nor the label part can be empty.+  -}+  _label :: (Data.Text.Text Language.LSP.Protocol.Types.Common.|? [Language.LSP.Protocol.Internal.Types.InlayHintLabelPart.InlayHintLabelPart])+  , {-|+  The kind of this hint. Can be omitted in which case the client+  should fall back to a reasonable default.+  -}+  _kind :: (Maybe Language.LSP.Protocol.Internal.Types.InlayHintKind.InlayHintKind)+  , {-|+  Optional text edits that are performed when accepting this inlay hint.++  *Note* that edits are expected to change the document so that the inlay+  hint (or its nearest variant) is now part of the document and the inlay+  hint itself is now obsolete.+  -}+  _textEdits :: (Maybe [Language.LSP.Protocol.Internal.Types.TextEdit.TextEdit])+  , {-|+  The tooltip text when you hover over this item.+  -}+  _tooltip :: (Maybe (Data.Text.Text Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.MarkupContent.MarkupContent))+  , {-|+  Render padding before the hint.++  Note: Padding should use the editor's background color, not the+  background color of the hint itself. That means padding can be used+  to visually align/separate an inlay hint.+  -}+  _paddingLeft :: (Maybe Bool)+  , {-|+  Render padding after the hint.++  Note: Padding should use the editor's background color, not the+  background color of the hint itself. That means padding can be used+  to visually align/separate an inlay hint.+  -}+  _paddingRight :: (Maybe Bool)+  , {-|+  A data entry field that is preserved on an inlay hint between+  a `textDocument/inlayHint` and a `inlayHint/resolve` request.+  -}+  _data_ :: (Maybe Data.Aeson.Value)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON InlayHint where+  toJSON (InlayHint arg0 arg1 arg2 arg3 arg4 arg5 arg6 arg7) = Aeson.object $ concat $  [["position" Aeson..= arg0]+    ,["label" Aeson..= arg1]+    ,"kind" Language.LSP.Protocol.Types.Common..=? arg2+    ,"textEdits" Language.LSP.Protocol.Types.Common..=? arg3+    ,"tooltip" Language.LSP.Protocol.Types.Common..=? arg4+    ,"paddingLeft" Language.LSP.Protocol.Types.Common..=? arg5+    ,"paddingRight" Language.LSP.Protocol.Types.Common..=? arg6+    ,"data" Language.LSP.Protocol.Types.Common..=? arg7]++instance Aeson.FromJSON InlayHint where+  parseJSON = Aeson.withObject "InlayHint" $ \arg -> InlayHint <$> arg Aeson..: "position" <*> arg Aeson..: "label" <*> arg Aeson..:! "kind" <*> arg Aeson..:! "textEdits" <*> arg Aeson..:! "tooltip" <*> arg Aeson..:! "paddingLeft" <*> arg Aeson..:! "paddingRight" <*> arg Aeson..:! "data"
+ generated/Language/LSP/Protocol/Internal/Types/InlayHintClientCapabilities.hs view
@@ -0,0 +1,42 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InlayHintClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row as Row+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+Inlay hint client capabilities.++@since 3.17.0+-}+data InlayHintClientCapabilities = InlayHintClientCapabilities +  { {-|+  Whether inlay hints support dynamic registration.+  -}+  _dynamicRegistration :: (Maybe Bool)+  , {-|+  Indicates which properties a client can resolve lazily on an inlay+  hint.+  -}+  _resolveSupport :: (Maybe (Row.Rec ("properties" Row..== [Data.Text.Text] Row..+ Row.Empty)))+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON InlayHintClientCapabilities where+  toJSON (InlayHintClientCapabilities arg0 arg1) = Aeson.object $ concat $  ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+    ,"resolveSupport" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON InlayHintClientCapabilities where+  parseJSON = Aeson.withObject "InlayHintClientCapabilities" $ \arg -> InlayHintClientCapabilities <$> arg Aeson..:! "dynamicRegistration" <*> arg Aeson..:! "resolveSupport"
+ generated/Language/LSP/Protocol/Internal/Types/InlayHintKind.hs view
@@ -0,0 +1,47 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InlayHintKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+Inlay hint kinds.++@since 3.17.0+-}+data InlayHintKind = +    {-|+  An inlay hint that for a type annotation.+  -}+  InlayHintKind_Type+  | {-|+  An inlay hint that is for a parameter.+  -}+  InlayHintKind_Parameter+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)+  deriving ( Aeson.ToJSON+  , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum InlayHintKind Language.LSP.Protocol.Types.Common.UInt)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum InlayHintKind where+  knownValues = Data.Set.fromList [InlayHintKind_Type,InlayHintKind_Parameter]+  type EnumBaseType InlayHintKind = Language.LSP.Protocol.Types.Common.UInt+  toEnumBaseType InlayHintKind_Type = 1+  toEnumBaseType InlayHintKind_Parameter = 2+  fromEnumBaseType 1 = pure InlayHintKind_Type+  fromEnumBaseType 2 = pure InlayHintKind_Parameter+  fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/InlayHintLabelPart.hs view
@@ -0,0 +1,69 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InlayHintLabelPart where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Command+import qualified Language.LSP.Protocol.Internal.Types.Location+import qualified Language.LSP.Protocol.Internal.Types.MarkupContent+import qualified Language.LSP.Protocol.Types.Common++{-|+An inlay hint label part allows for interactive and composite labels+of inlay hints.++@since 3.17.0+-}+data InlayHintLabelPart = InlayHintLabelPart +  { {-|+  The value of this label part.+  -}+  _value :: Data.Text.Text+  , {-|+  The tooltip text when you hover over this label part. Depending on+  the client capability `inlayHint.resolveSupport` clients might resolve+  this property late using the resolve request.+  -}+  _tooltip :: (Maybe (Data.Text.Text Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.MarkupContent.MarkupContent))+  , {-|+  An optional source code location that represents this+  label part.++  The editor will use this location for the hover and for code navigation+  features: This part will become a clickable link that resolves to the+  definition of the symbol at the given location (not necessarily the+  location itself), it shows the hover that shows at the given location,+  and it shows a context menu with further code navigation commands.++  Depending on the client capability `inlayHint.resolveSupport` clients+  might resolve this property late using the resolve request.+  -}+  _location :: (Maybe Language.LSP.Protocol.Internal.Types.Location.Location)+  , {-|+  An optional command for this label part.++  Depending on the client capability `inlayHint.resolveSupport` clients+  might resolve this property late using the resolve request.+  -}+  _command :: (Maybe Language.LSP.Protocol.Internal.Types.Command.Command)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON InlayHintLabelPart where+  toJSON (InlayHintLabelPart arg0 arg1 arg2 arg3) = Aeson.object $ concat $  [["value" Aeson..= arg0]+    ,"tooltip" Language.LSP.Protocol.Types.Common..=? arg1+    ,"location" Language.LSP.Protocol.Types.Common..=? arg2+    ,"command" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON InlayHintLabelPart where+  parseJSON = Aeson.withObject "InlayHintLabelPart" $ \arg -> InlayHintLabelPart <$> arg Aeson..: "value" <*> arg Aeson..:! "tooltip" <*> arg Aeson..:! "location" <*> arg Aeson..:! "command"
+ generated/Language/LSP/Protocol/Internal/Types/InlayHintOptions.hs view
@@ -0,0 +1,40 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InlayHintOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Inlay hint options used during static registration.++@since 3.17.0+-}+data InlayHintOptions = InlayHintOptions +  { {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  , {-|+  The server provides support to resolve additional+  information for an inlay hint item.+  -}+  _resolveProvider :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON InlayHintOptions where+  toJSON (InlayHintOptions arg0 arg1) = Aeson.object $ concat $  ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0+    ,"resolveProvider" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON InlayHintOptions where+  parseJSON = Aeson.withObject "InlayHintOptions" $ \arg -> InlayHintOptions <$> arg Aeson..:! "workDoneProgress" <*> arg Aeson..:! "resolveProvider"
+ generated/Language/LSP/Protocol/Internal/Types/InlayHintParams.hs view
@@ -0,0 +1,47 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InlayHintParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+A parameter literal used in inlay hint requests.++@since 3.17.0+-}+data InlayHintParams = InlayHintParams +  { {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  The text document.+  -}+  _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+  , {-|+  The document range for which inlay hints should be computed.+  -}+  _range :: Language.LSP.Protocol.Internal.Types.Range.Range+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON InlayHintParams where+  toJSON (InlayHintParams arg0 arg1 arg2) = Aeson.object $ concat $  ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+    ,["textDocument" Aeson..= arg1]+    ,["range" Aeson..= arg2]]++instance Aeson.FromJSON InlayHintParams where+  parseJSON = Aeson.withObject "InlayHintParams" $ \arg -> InlayHintParams <$> arg Aeson..:! "workDoneToken" <*> arg Aeson..: "textDocument" <*> arg Aeson..: "range"
+ generated/Language/LSP/Protocol/Internal/Types/InlayHintRegistrationOptions.hs view
@@ -0,0 +1,54 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InlayHintRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+Inlay hint options used during static or dynamic registration.++@since 3.17.0+-}+data InlayHintRegistrationOptions = InlayHintRegistrationOptions +  { {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  , {-|+  The server provides support to resolve additional+  information for an inlay hint item.+  -}+  _resolveProvider :: (Maybe Bool)+  , {-|+  A document selector to identify the scope of the registration. If set to null+  the document selector provided on the client side will be used.+  -}+  _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  , {-|+  The id used to register the request. The id can be used to deregister+  the request again. See also Registration#id.+  -}+  _id :: (Maybe Data.Text.Text)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON InlayHintRegistrationOptions where+  toJSON (InlayHintRegistrationOptions arg0 arg1 arg2 arg3) = Aeson.object $ concat $  ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0+    ,"resolveProvider" Language.LSP.Protocol.Types.Common..=? arg1+    ,["documentSelector" Aeson..= arg2]+    ,"id" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON InlayHintRegistrationOptions where+  parseJSON = Aeson.withObject "InlayHintRegistrationOptions" $ \arg -> InlayHintRegistrationOptions <$> arg Aeson..:! "workDoneProgress" <*> arg Aeson..:! "resolveProvider" <*> arg Aeson..: "documentSelector" <*> arg Aeson..:! "id"
+ generated/Language/LSP/Protocol/Internal/Types/InlayHintWorkspaceClientCapabilities.hs view
@@ -0,0 +1,40 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InlayHintWorkspaceClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Client workspace capabilities specific to inlay hints.++@since 3.17.0+-}+data InlayHintWorkspaceClientCapabilities = InlayHintWorkspaceClientCapabilities +  { {-|+  Whether the client implementation supports a refresh request sent from+  the server to the client.++  Note that this event is global and will force the client to refresh all+  inlay hints currently shown. It should be used with absolute care and+  is useful for situation where a server for example detects a project wide+  change that requires such a calculation.+  -}+  _refreshSupport :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON InlayHintWorkspaceClientCapabilities where+  toJSON (InlayHintWorkspaceClientCapabilities arg0) = Aeson.object $ concat $  ["refreshSupport" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON InlayHintWorkspaceClientCapabilities where+  parseJSON = Aeson.withObject "InlayHintWorkspaceClientCapabilities" $ \arg -> InlayHintWorkspaceClientCapabilities <$> arg Aeson..:! "refreshSupport"
+ generated/Language/LSP/Protocol/Internal/Types/InlineValue.hs view
@@ -0,0 +1,31 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InlineValue where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.InlineValueEvaluatableExpression+import qualified Language.LSP.Protocol.Internal.Types.InlineValueText+import qualified Language.LSP.Protocol.Internal.Types.InlineValueVariableLookup+import qualified Language.LSP.Protocol.Types.Common++{-|+Inline value information can be provided by different means:+- directly as a text value (class InlineValueText).+- as a name to use for a variable lookup (class InlineValueVariableLookup)+- as an evaluatable expression (class InlineValueEvaluatableExpression)+The InlineValue types combines all inline value types into one type.++@since 3.17.0+-}+newtype InlineValue = InlineValue (Language.LSP.Protocol.Internal.Types.InlineValueText.InlineValueText Language.LSP.Protocol.Types.Common.|? (Language.LSP.Protocol.Internal.Types.InlineValueVariableLookup.InlineValueVariableLookup Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.InlineValueEvaluatableExpression.InlineValueEvaluatableExpression))+  deriving newtype (Aeson.ToJSON, Aeson.FromJSON)+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)
+ generated/Language/LSP/Protocol/Internal/Types/InlineValueClientCapabilities.hs view
@@ -0,0 +1,34 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InlineValueClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Client capabilities specific to inline values.++@since 3.17.0+-}+data InlineValueClientCapabilities = InlineValueClientCapabilities +  { {-|+  Whether implementation supports dynamic registration for inline value providers.+  -}+  _dynamicRegistration :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON InlineValueClientCapabilities where+  toJSON (InlineValueClientCapabilities arg0) = Aeson.object $ concat $  ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON InlineValueClientCapabilities where+  parseJSON = Aeson.withObject "InlineValueClientCapabilities" $ \arg -> InlineValueClientCapabilities <$> arg Aeson..:! "dynamicRegistration"
+ generated/Language/LSP/Protocol/Internal/Types/InlineValueContext.hs view
@@ -0,0 +1,39 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InlineValueContext where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.17.0+-}+data InlineValueContext = InlineValueContext +  { {-|+  The stack frame (as a DAP Id) where the execution has stopped.+  -}+  _frameId :: Language.LSP.Protocol.Types.Common.Int32+  , {-|+  The document range where execution has stopped.+  Typically the end position of the range denotes the line where the inline values are shown.+  -}+  _stoppedLocation :: Language.LSP.Protocol.Internal.Types.Range.Range+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON InlineValueContext where+  toJSON (InlineValueContext arg0 arg1) = Aeson.object $ concat $  [["frameId" Aeson..= arg0]+    ,["stoppedLocation" Aeson..= arg1]]++instance Aeson.FromJSON InlineValueContext where+  parseJSON = Aeson.withObject "InlineValueContext" $ \arg -> InlineValueContext <$> arg Aeson..: "frameId" <*> arg Aeson..: "stoppedLocation"
+ generated/Language/LSP/Protocol/Internal/Types/InlineValueEvaluatableExpression.hs view
@@ -0,0 +1,44 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InlineValueEvaluatableExpression where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|+Provide an inline value through an expression evaluation.+If only a range is specified, the expression will be extracted from the underlying document.+An optional expression can be used to override the extracted expression.++@since 3.17.0+-}+data InlineValueEvaluatableExpression = InlineValueEvaluatableExpression +  { {-|+  The document range for which the inline value applies.+  The range is used to extract the evaluatable expression from the underlying document.+  -}+  _range :: Language.LSP.Protocol.Internal.Types.Range.Range+  , {-|+  If specified the expression overrides the extracted expression.+  -}+  _expression :: (Maybe Data.Text.Text)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON InlineValueEvaluatableExpression where+  toJSON (InlineValueEvaluatableExpression arg0 arg1) = Aeson.object $ concat $  [["range" Aeson..= arg0]+    ,"expression" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON InlineValueEvaluatableExpression where+  parseJSON = Aeson.withObject "InlineValueEvaluatableExpression" $ \arg -> InlineValueEvaluatableExpression <$> arg Aeson..: "range" <*> arg Aeson..:! "expression"
+ generated/Language/LSP/Protocol/Internal/Types/InlineValueOptions.hs view
@@ -0,0 +1,34 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InlineValueOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Inline value options used during static registration.++@since 3.17.0+-}+data InlineValueOptions = InlineValueOptions +  { {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON InlineValueOptions where+  toJSON (InlineValueOptions arg0) = Aeson.object $ concat $  ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON InlineValueOptions where+  parseJSON = Aeson.withObject "InlineValueOptions" $ \arg -> InlineValueOptions <$> arg Aeson..:! "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/InlineValueParams.hs view
@@ -0,0 +1,54 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InlineValueParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.InlineValueContext+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+A parameter literal used in inline value requests.++@since 3.17.0+-}+data InlineValueParams = InlineValueParams +  { {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  The text document.+  -}+  _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+  , {-|+  The document range for which inline values should be computed.+  -}+  _range :: Language.LSP.Protocol.Internal.Types.Range.Range+  , {-|+  Additional information about the context in which inline values were+  requested.+  -}+  _context :: Language.LSP.Protocol.Internal.Types.InlineValueContext.InlineValueContext+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON InlineValueParams where+  toJSON (InlineValueParams arg0 arg1 arg2 arg3) = Aeson.object $ concat $  ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+    ,["textDocument" Aeson..= arg1]+    ,["range" Aeson..= arg2]+    ,["context" Aeson..= arg3]]++instance Aeson.FromJSON InlineValueParams where+  parseJSON = Aeson.withObject "InlineValueParams" $ \arg -> InlineValueParams <$> arg Aeson..:! "workDoneToken" <*> arg Aeson..: "textDocument" <*> arg Aeson..: "range" <*> arg Aeson..: "context"
+ generated/Language/LSP/Protocol/Internal/Types/InlineValueRegistrationOptions.hs view
@@ -0,0 +1,48 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InlineValueRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+Inline value options used during static or dynamic registration.++@since 3.17.0+-}+data InlineValueRegistrationOptions = InlineValueRegistrationOptions +  { {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  , {-|+  A document selector to identify the scope of the registration. If set to null+  the document selector provided on the client side will be used.+  -}+  _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  , {-|+  The id used to register the request. The id can be used to deregister+  the request again. See also Registration#id.+  -}+  _id :: (Maybe Data.Text.Text)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON InlineValueRegistrationOptions where+  toJSON (InlineValueRegistrationOptions arg0 arg1 arg2) = Aeson.object $ concat $  ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0+    ,["documentSelector" Aeson..= arg1]+    ,"id" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON InlineValueRegistrationOptions where+  parseJSON = Aeson.withObject "InlineValueRegistrationOptions" $ \arg -> InlineValueRegistrationOptions <$> arg Aeson..:! "workDoneProgress" <*> arg Aeson..: "documentSelector" <*> arg Aeson..:! "id"
+ generated/Language/LSP/Protocol/Internal/Types/InlineValueText.hs view
@@ -0,0 +1,41 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InlineValueText where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|+Provide inline value as text.++@since 3.17.0+-}+data InlineValueText = InlineValueText +  { {-|+  The document range for which the inline value applies.+  -}+  _range :: Language.LSP.Protocol.Internal.Types.Range.Range+  , {-|+  The text of the inline value.+  -}+  _text :: Data.Text.Text+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON InlineValueText where+  toJSON (InlineValueText arg0 arg1) = Aeson.object $ concat $  [["range" Aeson..= arg0]+    ,["text" Aeson..= arg1]]++instance Aeson.FromJSON InlineValueText where+  parseJSON = Aeson.withObject "InlineValueText" $ \arg -> InlineValueText <$> arg Aeson..: "range" <*> arg Aeson..: "text"
+ generated/Language/LSP/Protocol/Internal/Types/InlineValueVariableLookup.hs view
@@ -0,0 +1,49 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InlineValueVariableLookup where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|+Provide inline value through a variable lookup.+If only a range is specified, the variable name will be extracted from the underlying document.+An optional variable name can be used to override the extracted name.++@since 3.17.0+-}+data InlineValueVariableLookup = InlineValueVariableLookup +  { {-|+  The document range for which the inline value applies.+  The range is used to extract the variable name from the underlying document.+  -}+  _range :: Language.LSP.Protocol.Internal.Types.Range.Range+  , {-|+  If specified the name of the variable to look up.+  -}+  _variableName :: (Maybe Data.Text.Text)+  , {-|+  How to perform the lookup.+  -}+  _caseSensitiveLookup :: Bool+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON InlineValueVariableLookup where+  toJSON (InlineValueVariableLookup arg0 arg1 arg2) = Aeson.object $ concat $  [["range" Aeson..= arg0]+    ,"variableName" Language.LSP.Protocol.Types.Common..=? arg1+    ,["caseSensitiveLookup" Aeson..= arg2]]++instance Aeson.FromJSON InlineValueVariableLookup where+  parseJSON = Aeson.withObject "InlineValueVariableLookup" $ \arg -> InlineValueVariableLookup <$> arg Aeson..: "range" <*> arg Aeson..:! "variableName" <*> arg Aeson..: "caseSensitiveLookup"
+ generated/Language/LSP/Protocol/Internal/Types/InlineValueWorkspaceClientCapabilities.hs view
@@ -0,0 +1,40 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InlineValueWorkspaceClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Client workspace capabilities specific to inline values.++@since 3.17.0+-}+data InlineValueWorkspaceClientCapabilities = InlineValueWorkspaceClientCapabilities +  { {-|+  Whether the client implementation supports a refresh request sent from the+  server to the client.++  Note that this event is global and will force the client to refresh all+  inline values currently shown. It should be used with absolute care and is+  useful for situation where a server for example detects a project wide+  change that requires such a calculation.+  -}+  _refreshSupport :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON InlineValueWorkspaceClientCapabilities where+  toJSON (InlineValueWorkspaceClientCapabilities arg0) = Aeson.object $ concat $  ["refreshSupport" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON InlineValueWorkspaceClientCapabilities where+  parseJSON = Aeson.withObject "InlineValueWorkspaceClientCapabilities" $ \arg -> InlineValueWorkspaceClientCapabilities <$> arg Aeson..:! "refreshSupport"
+ generated/Language/LSP/Protocol/Internal/Types/InsertReplaceEdit.hs view
@@ -0,0 +1,46 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InsertReplaceEdit where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|+A special text edit to provide an insert and a replace operation.++@since 3.16.0+-}+data InsertReplaceEdit = InsertReplaceEdit +  { {-|+  The string to be inserted.+  -}+  _newText :: Data.Text.Text+  , {-|+  The range if the insert is requested+  -}+  _insert :: Language.LSP.Protocol.Internal.Types.Range.Range+  , {-|+  The range if the replace is requested.+  -}+  _replace :: Language.LSP.Protocol.Internal.Types.Range.Range+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON InsertReplaceEdit where+  toJSON (InsertReplaceEdit arg0 arg1 arg2) = Aeson.object $ concat $  [["newText" Aeson..= arg0]+    ,["insert" Aeson..= arg1]+    ,["replace" Aeson..= arg2]]++instance Aeson.FromJSON InsertReplaceEdit where+  parseJSON = Aeson.withObject "InsertReplaceEdit" $ \arg -> InsertReplaceEdit <$> arg Aeson..: "newText" <*> arg Aeson..: "insert" <*> arg Aeson..: "replace"
+ generated/Language/LSP/Protocol/Internal/Types/InsertTextFormat.hs view
@@ -0,0 +1,54 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InsertTextFormat where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+Defines whether the insert text in a completion item should be interpreted as+plain text or a snippet.+-}+data InsertTextFormat = +    {-|+  The primary text to be inserted is treated as a plain string.+  -}+  InsertTextFormat_PlainText+  | {-|+  The primary text to be inserted is treated as a snippet.++  A snippet can define tab stops and placeholders with `$1`, `$2`+  and `${3:foo}`. `$0` defines the final tab stop, it defaults to+  the end of the snippet. Placeholders with equal identifiers are linked,+  that is typing in one will update others too.++  See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax+  -}+  InsertTextFormat_Snippet+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)+  deriving ( Aeson.ToJSON+  , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum InsertTextFormat Language.LSP.Protocol.Types.Common.UInt)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum InsertTextFormat where+  knownValues = Data.Set.fromList [InsertTextFormat_PlainText+    ,InsertTextFormat_Snippet]+  type EnumBaseType InsertTextFormat = Language.LSP.Protocol.Types.Common.UInt+  toEnumBaseType InsertTextFormat_PlainText = 1+  toEnumBaseType InsertTextFormat_Snippet = 2+  fromEnumBaseType 1 = pure InsertTextFormat_PlainText+  fromEnumBaseType 2 = pure InsertTextFormat_Snippet+  fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/InsertTextMode.hs view
@@ -0,0 +1,59 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.InsertTextMode where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+How whitespace and indentation is handled during completion+item insertion.++@since 3.16.0+-}+data InsertTextMode = +    {-|+  The insertion or replace strings is taken as it is. If the+  value is multi line the lines below the cursor will be+  inserted using the indentation defined in the string value.+  The client will not apply any kind of adjustments to the+  string.+  -}+  InsertTextMode_AsIs+  | {-|+  The editor adjusts leading whitespace of new lines so that+  they match the indentation up to the cursor of the line for+  which the item is accepted.++  Consider a line like this: <2tabs><cursor><3tabs>foo. Accepting a+  multi line completion item is indented using 2 tabs and all+  following lines inserted will be indented using 2 tabs as well.+  -}+  InsertTextMode_AdjustIndentation+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)+  deriving ( Aeson.ToJSON+  , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum InsertTextMode Language.LSP.Protocol.Types.Common.UInt)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum InsertTextMode where+  knownValues = Data.Set.fromList [InsertTextMode_AsIs+    ,InsertTextMode_AdjustIndentation]+  type EnumBaseType InsertTextMode = Language.LSP.Protocol.Types.Common.UInt+  toEnumBaseType InsertTextMode_AsIs = 1+  toEnumBaseType InsertTextMode_AdjustIndentation = 2+  fromEnumBaseType 1 = pure InsertTextMode_AsIs+  fromEnumBaseType 2 = pure InsertTextMode_AdjustIndentation+  fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/LSPErrorCodes.hs view
@@ -0,0 +1,81 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.LSPErrorCodes where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|++-}+data LSPErrorCodes = +    {-|+  A request failed but it was syntactically correct, e.g the+  method name was known and the parameters were valid. The error+  message should contain human readable information about why+  the request failed.++  @since 3.17.0+  -}+  LSPErrorCodes_RequestFailed+  | {-|+  The server cancelled the request. This error code should+  only be used for requests that explicitly support being+  server cancellable.++  @since 3.17.0+  -}+  LSPErrorCodes_ServerCancelled+  | {-|+  The server detected that the content of a document got+  modified outside normal conditions. A server should+  NOT send this error code if it detects a content change+  in it unprocessed messages. The result even computed+  on an older state might still be useful for the client.++  If a client decides that a result is not of any use anymore+  the client should cancel the request.+  -}+  LSPErrorCodes_ContentModified+  | {-|+  The client has canceled a request and a server as detected+  the cancel.+  -}+  LSPErrorCodes_RequestCancelled+  | LSPErrorCodes_Custom Language.LSP.Protocol.Types.Common.Int32+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)+  deriving ( Aeson.ToJSON+  , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum LSPErrorCodes Language.LSP.Protocol.Types.Common.Int32)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum LSPErrorCodes where+  knownValues = Data.Set.fromList [LSPErrorCodes_RequestFailed+    ,LSPErrorCodes_ServerCancelled+    ,LSPErrorCodes_ContentModified+    ,LSPErrorCodes_RequestCancelled]+  type EnumBaseType LSPErrorCodes = Language.LSP.Protocol.Types.Common.Int32+  toEnumBaseType LSPErrorCodes_RequestFailed = -32803+  toEnumBaseType LSPErrorCodes_ServerCancelled = -32802+  toEnumBaseType LSPErrorCodes_ContentModified = -32801+  toEnumBaseType LSPErrorCodes_RequestCancelled = -32800+  toEnumBaseType (LSPErrorCodes_Custom arg) = arg++instance Language.LSP.Protocol.Types.LspEnum.LspOpenEnum LSPErrorCodes where+  fromOpenEnumBaseType -32803 = LSPErrorCodes_RequestFailed+  fromOpenEnumBaseType -32802 = LSPErrorCodes_ServerCancelled+  fromOpenEnumBaseType -32801 = LSPErrorCodes_ContentModified+  fromOpenEnumBaseType -32800 = LSPErrorCodes_RequestCancelled+  fromOpenEnumBaseType arg = LSPErrorCodes_Custom arg++
+ generated/Language/LSP/Protocol/Internal/Types/LinkedEditingRangeClientCapabilities.hs view
@@ -0,0 +1,36 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.LinkedEditingRangeClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Client capabilities for the linked editing range request.++@since 3.16.0+-}+data LinkedEditingRangeClientCapabilities = LinkedEditingRangeClientCapabilities +  { {-|+  Whether implementation supports dynamic registration. If this is set to `true`+  the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`+  return value for the corresponding server capability as well.+  -}+  _dynamicRegistration :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON LinkedEditingRangeClientCapabilities where+  toJSON (LinkedEditingRangeClientCapabilities arg0) = Aeson.object $ concat $  ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON LinkedEditingRangeClientCapabilities where+  parseJSON = Aeson.withObject "LinkedEditingRangeClientCapabilities" $ \arg -> LinkedEditingRangeClientCapabilities <$> arg Aeson..:! "dynamicRegistration"
+ generated/Language/LSP/Protocol/Internal/Types/LinkedEditingRangeOptions.hs view
@@ -0,0 +1,32 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.LinkedEditingRangeOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data LinkedEditingRangeOptions = LinkedEditingRangeOptions +  { {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON LinkedEditingRangeOptions where+  toJSON (LinkedEditingRangeOptions arg0) = Aeson.object $ concat $  ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON LinkedEditingRangeOptions where+  parseJSON = Aeson.withObject "LinkedEditingRangeOptions" $ \arg -> LinkedEditingRangeOptions <$> arg Aeson..:! "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/LinkedEditingRangeParams.hs view
@@ -0,0 +1,45 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.LinkedEditingRangeParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data LinkedEditingRangeParams = LinkedEditingRangeParams +  { {-|+  The text document.+  -}+  _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+  , {-|+  The position inside the text document.+  -}+  _position :: Language.LSP.Protocol.Internal.Types.Position.Position+  , {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON LinkedEditingRangeParams where+  toJSON (LinkedEditingRangeParams arg0 arg1 arg2) = Aeson.object $ concat $  [["textDocument" Aeson..= arg0]+    ,["position" Aeson..= arg1]+    ,"workDoneToken" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON LinkedEditingRangeParams where+  parseJSON = Aeson.withObject "LinkedEditingRangeParams" $ \arg -> LinkedEditingRangeParams <$> arg Aeson..: "textDocument" <*> arg Aeson..: "position" <*> arg Aeson..:! "workDoneToken"
+ generated/Language/LSP/Protocol/Internal/Types/LinkedEditingRangeRegistrationOptions.hs view
@@ -0,0 +1,46 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.LinkedEditingRangeRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data LinkedEditingRangeRegistrationOptions = LinkedEditingRangeRegistrationOptions +  { {-|+  A document selector to identify the scope of the registration. If set to null+  the document selector provided on the client side will be used.+  -}+  _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  , {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  , {-|+  The id used to register the request. The id can be used to deregister+  the request again. See also Registration#id.+  -}+  _id :: (Maybe Data.Text.Text)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON LinkedEditingRangeRegistrationOptions where+  toJSON (LinkedEditingRangeRegistrationOptions arg0 arg1 arg2) = Aeson.object $ concat $  [["documentSelector" Aeson..= arg0]+    ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1+    ,"id" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON LinkedEditingRangeRegistrationOptions where+  parseJSON = Aeson.withObject "LinkedEditingRangeRegistrationOptions" $ \arg -> LinkedEditingRangeRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Aeson..:! "workDoneProgress" <*> arg Aeson..:! "id"
+ generated/Language/LSP/Protocol/Internal/Types/LinkedEditingRanges.hs view
@@ -0,0 +1,44 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.LinkedEditingRanges where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|+The result of a linked editing range request.++@since 3.16.0+-}+data LinkedEditingRanges = LinkedEditingRanges +  { {-|+  A list of ranges that can be edited together. The ranges must have+  identical length and contain identical text content. The ranges cannot overlap.+  -}+  _ranges :: [Language.LSP.Protocol.Internal.Types.Range.Range]+  , {-|+  An optional word pattern (regular expression) that describes valid contents for+  the given ranges. If no pattern is provided, the client configuration's word+  pattern will be used.+  -}+  _wordPattern :: (Maybe Data.Text.Text)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON LinkedEditingRanges where+  toJSON (LinkedEditingRanges arg0 arg1) = Aeson.object $ concat $  [["ranges" Aeson..= arg0]+    ,"wordPattern" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON LinkedEditingRanges where+  parseJSON = Aeson.withObject "LinkedEditingRanges" $ \arg -> LinkedEditingRanges <$> arg Aeson..: "ranges" <*> arg Aeson..:! "wordPattern"
+ generated/Language/LSP/Protocol/Internal/Types/Location.hs view
@@ -0,0 +1,40 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.Location where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+Represents a location inside a resource, such as a line+inside a text file.+-}+data Location = Location +  { {-|++  -}+  _uri :: Language.LSP.Protocol.Types.Uri.Uri+  , {-|++  -}+  _range :: Language.LSP.Protocol.Internal.Types.Range.Range+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON Location where+  toJSON (Location arg0 arg1) = Aeson.object $ concat $  [["uri" Aeson..= arg0]+    ,["range" Aeson..= arg1]]++instance Aeson.FromJSON Location where+  parseJSON = Aeson.withObject "Location" $ \arg -> Location <$> arg Aeson..: "uri" <*> arg Aeson..: "range"
+ generated/Language/LSP/Protocol/Internal/Types/LocationLink.hs view
@@ -0,0 +1,56 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.LocationLink where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+Represents the connection of two locations. Provides additional metadata over normal `Location`,+including an origin range.+-}+data LocationLink = LocationLink +  { {-|+  Span of the origin of this link.++  Used as the underlined span for mouse interaction. Defaults to the word range at+  the definition position.+  -}+  _originSelectionRange :: (Maybe Language.LSP.Protocol.Internal.Types.Range.Range)+  , {-|+  The target resource identifier of this link.+  -}+  _targetUri :: Language.LSP.Protocol.Types.Uri.Uri+  , {-|+  The full target range of this link. If the target for example is a symbol then target range is the+  range enclosing this symbol not including leading/trailing whitespace but everything else+  like comments. This information is typically used to highlight the range in the editor.+  -}+  _targetRange :: Language.LSP.Protocol.Internal.Types.Range.Range+  , {-|+  The range that should be selected and revealed when this link is being followed, e.g the name of a function.+  Must be contained by the `targetRange`. See also `DocumentSymbol#range`+  -}+  _targetSelectionRange :: Language.LSP.Protocol.Internal.Types.Range.Range+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON LocationLink where+  toJSON (LocationLink arg0 arg1 arg2 arg3) = Aeson.object $ concat $  ["originSelectionRange" Language.LSP.Protocol.Types.Common..=? arg0+    ,["targetUri" Aeson..= arg1]+    ,["targetRange" Aeson..= arg2]+    ,["targetSelectionRange" Aeson..= arg3]]++instance Aeson.FromJSON LocationLink where+  parseJSON = Aeson.withObject "LocationLink" $ \arg -> LocationLink <$> arg Aeson..:! "originSelectionRange" <*> arg Aeson..: "targetUri" <*> arg Aeson..: "targetRange" <*> arg Aeson..: "targetSelectionRange"
+ generated/Language/LSP/Protocol/Internal/Types/LogMessageParams.hs view
@@ -0,0 +1,39 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.LogMessageParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.MessageType+import qualified Language.LSP.Protocol.Types.Common++{-|+The log message parameters.+-}+data LogMessageParams = LogMessageParams +  { {-|+  The message type. See `MessageType`+  -}+  _type_ :: Language.LSP.Protocol.Internal.Types.MessageType.MessageType+  , {-|+  The actual message.+  -}+  _message :: Data.Text.Text+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON LogMessageParams where+  toJSON (LogMessageParams arg0 arg1) = Aeson.object $ concat $  [["type" Aeson..= arg0]+    ,["message" Aeson..= arg1]]++instance Aeson.FromJSON LogMessageParams where+  parseJSON = Aeson.withObject "LogMessageParams" $ \arg -> LogMessageParams <$> arg Aeson..: "type" <*> arg Aeson..: "message"
+ generated/Language/LSP/Protocol/Internal/Types/LogTraceParams.hs view
@@ -0,0 +1,38 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.LogTraceParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data LogTraceParams = LogTraceParams +  { {-|++  -}+  _message :: Data.Text.Text+  , {-|++  -}+  _verbose :: (Maybe Data.Text.Text)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON LogTraceParams where+  toJSON (LogTraceParams arg0 arg1) = Aeson.object $ concat $  [["message" Aeson..= arg0]+    ,"verbose" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON LogTraceParams where+  parseJSON = Aeson.withObject "LogTraceParams" $ \arg -> LogTraceParams <$> arg Aeson..: "message" <*> arg Aeson..:! "verbose"
+ generated/Language/LSP/Protocol/Internal/Types/MarkdownClientCapabilities.hs view
@@ -0,0 +1,48 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.MarkdownClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+Client capabilities specific to the used markdown parser.++@since 3.16.0+-}+data MarkdownClientCapabilities = MarkdownClientCapabilities +  { {-|+  The name of the parser.+  -}+  _parser :: Data.Text.Text+  , {-|+  The version of the parser.+  -}+  _version :: (Maybe Data.Text.Text)+  , {-|+  A list of HTML tags that the client allows / supports in+  Markdown.++  @since 3.17.0+  -}+  _allowedTags :: (Maybe [Data.Text.Text])+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON MarkdownClientCapabilities where+  toJSON (MarkdownClientCapabilities arg0 arg1 arg2) = Aeson.object $ concat $  [["parser" Aeson..= arg0]+    ,"version" Language.LSP.Protocol.Types.Common..=? arg1+    ,"allowedTags" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON MarkdownClientCapabilities where+  parseJSON = Aeson.withObject "MarkdownClientCapabilities" $ \arg -> MarkdownClientCapabilities <$> arg Aeson..: "parser" <*> arg Aeson..:! "version" <*> arg Aeson..:! "allowedTags"
+ generated/Language/LSP/Protocol/Internal/Types/MarkedString.hs view
@@ -0,0 +1,36 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.MarkedString where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row as Row+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-# DEPRECATED MarkedString "use MarkupContent instead." #-}+{-|+MarkedString can be used to render human readable text. It is either a markdown string+or a code-block that provides a language and a code snippet. The language identifier+is semantically equal to the optional language identifier in fenced code blocks in GitHub+issues. See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting++The pair of a language and a value is an equivalent to markdown:+```${language}+${value}+```++Note that markdown strings will be sanitized - that means html will be escaped.+@deprecated use MarkupContent instead.+-}+newtype MarkedString = MarkedString (Data.Text.Text Language.LSP.Protocol.Types.Common.|? (Row.Rec ("language" Row..== Data.Text.Text Row..+ ("value" Row..== Data.Text.Text Row..+ Row.Empty))))+  deriving newtype (Aeson.ToJSON, Aeson.FromJSON)+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)
+ generated/Language/LSP/Protocol/Internal/Types/MarkupContent.hs view
@@ -0,0 +1,60 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.MarkupContent where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.MarkupKind+import qualified Language.LSP.Protocol.Types.Common++{-|+A `MarkupContent` literal represents a string value which content is interpreted base on its+kind flag. Currently the protocol supports `plaintext` and `markdown` as markup kinds.++If the kind is `markdown` then the value can contain fenced code blocks like in GitHub issues.+See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting++Here is an example how such a string can be constructed using JavaScript / TypeScript:+```ts+let markdown: MarkdownContent = {+ kind: MarkupKind.Markdown,+ value: [+   '# Header',+   'Some text',+   '```typescript',+   'someCode();',+   '```'+ ].join('\n')+};+```++*Please Note* that clients might sanitize the return markdown. A client could decide to+remove HTML from the markdown to avoid script execution.+-}+data MarkupContent = MarkupContent +  { {-|+  The type of the Markup+  -}+  _kind :: Language.LSP.Protocol.Internal.Types.MarkupKind.MarkupKind+  , {-|+  The content itself+  -}+  _value :: Data.Text.Text+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON MarkupContent where+  toJSON (MarkupContent arg0 arg1) = Aeson.object $ concat $  [["kind" Aeson..= arg0]+    ,["value" Aeson..= arg1]]++instance Aeson.FromJSON MarkupContent where+  parseJSON = Aeson.withObject "MarkupContent" $ \arg -> MarkupContent <$> arg Aeson..: "kind" <*> arg Aeson..: "value"
+ generated/Language/LSP/Protocol/Internal/Types/MarkupKind.hs view
@@ -0,0 +1,49 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.MarkupKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+Describes the content type that a client supports in various+result literals like `Hover`, `ParameterInfo` or `CompletionItem`.++Please note that `MarkupKinds` must not start with a `$`. This kinds+are reserved for internal usage.+-}+data MarkupKind = +    {-|+  Plain text is supported as a content format+  -}+  MarkupKind_PlainText+  | {-|+  Markdown is supported as a content format+  -}+  MarkupKind_Markdown+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)+  deriving ( Aeson.ToJSON+  , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum MarkupKind Data.Text.Text)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum MarkupKind where+  knownValues = Data.Set.fromList [MarkupKind_PlainText,MarkupKind_Markdown]+  type EnumBaseType MarkupKind = Data.Text.Text+  toEnumBaseType MarkupKind_PlainText = "plaintext"+  toEnumBaseType MarkupKind_Markdown = "markdown"+  fromEnumBaseType "plaintext" = pure MarkupKind_PlainText+  fromEnumBaseType "markdown" = pure MarkupKind_Markdown+  fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/MessageActionItem.hs view
@@ -0,0 +1,33 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.MessageActionItem where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data MessageActionItem = MessageActionItem +  { {-|+  A short title like 'Retry', 'Open Log' etc.+  -}+  _title :: Data.Text.Text+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON MessageActionItem where+  toJSON (MessageActionItem arg0) = Aeson.object $ concat $  [["title" Aeson..= arg0]]++instance Aeson.FromJSON MessageActionItem where+  parseJSON = Aeson.withObject "MessageActionItem" $ \arg -> MessageActionItem <$> arg Aeson..: "title"
+ generated/Language/LSP/Protocol/Internal/Types/MessageType.hs view
@@ -0,0 +1,60 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.MessageType where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+The message type+-}+data MessageType = +    {-|+  An error message.+  -}+  MessageType_Error+  | {-|+  A warning message.+  -}+  MessageType_Warning+  | {-|+  An information message.+  -}+  MessageType_Info+  | {-|+  A log message.+  -}+  MessageType_Log+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)+  deriving ( Aeson.ToJSON+  , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum MessageType Language.LSP.Protocol.Types.Common.UInt)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum MessageType where+  knownValues = Data.Set.fromList [MessageType_Error+    ,MessageType_Warning+    ,MessageType_Info+    ,MessageType_Log]+  type EnumBaseType MessageType = Language.LSP.Protocol.Types.Common.UInt+  toEnumBaseType MessageType_Error = 1+  toEnumBaseType MessageType_Warning = 2+  toEnumBaseType MessageType_Info = 3+  toEnumBaseType MessageType_Log = 4+  fromEnumBaseType 1 = pure MessageType_Error+  fromEnumBaseType 2 = pure MessageType_Warning+  fromEnumBaseType 3 = pure MessageType_Info+  fromEnumBaseType 4 = pure MessageType_Log+  fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/Moniker.hs view
@@ -0,0 +1,53 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.Moniker where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.MonikerKind+import qualified Language.LSP.Protocol.Internal.Types.UniquenessLevel+import qualified Language.LSP.Protocol.Types.Common++{-|+Moniker definition to match LSIF 0.5 moniker definition.++@since 3.16.0+-}+data Moniker = Moniker +  { {-|+  The scheme of the moniker. For example tsc or .Net+  -}+  _scheme :: Data.Text.Text+  , {-|+  The identifier of the moniker. The value is opaque in LSIF however+  schema owners are allowed to define the structure if they want.+  -}+  _identifier :: Data.Text.Text+  , {-|+  The scope in which the moniker is unique+  -}+  _unique :: Language.LSP.Protocol.Internal.Types.UniquenessLevel.UniquenessLevel+  , {-|+  The moniker kind if known.+  -}+  _kind :: (Maybe Language.LSP.Protocol.Internal.Types.MonikerKind.MonikerKind)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON Moniker where+  toJSON (Moniker arg0 arg1 arg2 arg3) = Aeson.object $ concat $  [["scheme" Aeson..= arg0]+    ,["identifier" Aeson..= arg1]+    ,["unique" Aeson..= arg2]+    ,"kind" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON Moniker where+  parseJSON = Aeson.withObject "Moniker" $ \arg -> Moniker <$> arg Aeson..: "scheme" <*> arg Aeson..: "identifier" <*> arg Aeson..: "unique" <*> arg Aeson..:! "kind"
+ generated/Language/LSP/Protocol/Internal/Types/MonikerClientCapabilities.hs view
@@ -0,0 +1,36 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.MonikerClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Client capabilities specific to the moniker request.++@since 3.16.0+-}+data MonikerClientCapabilities = MonikerClientCapabilities +  { {-|+  Whether moniker supports dynamic registration. If this is set to `true`+  the client supports the new `MonikerRegistrationOptions` return value+  for the corresponding server capability as well.+  -}+  _dynamicRegistration :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON MonikerClientCapabilities where+  toJSON (MonikerClientCapabilities arg0) = Aeson.object $ concat $  ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON MonikerClientCapabilities where+  parseJSON = Aeson.withObject "MonikerClientCapabilities" $ \arg -> MonikerClientCapabilities <$> arg Aeson..:! "dynamicRegistration"
+ generated/Language/LSP/Protocol/Internal/Types/MonikerKind.hs view
@@ -0,0 +1,56 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.MonikerKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+The moniker kind.++@since 3.16.0+-}+data MonikerKind = +    {-|+  The moniker represent a symbol that is imported into a project+  -}+  MonikerKind_Import+  | {-|+  The moniker represents a symbol that is exported from a project+  -}+  MonikerKind_Export+  | {-|+  The moniker represents a symbol that is local to a project (e.g. a local+  variable of a function, a class not visible outside the project, ...)+  -}+  MonikerKind_Local+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)+  deriving ( Aeson.ToJSON+  , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum MonikerKind Data.Text.Text)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum MonikerKind where+  knownValues = Data.Set.fromList [MonikerKind_Import+    ,MonikerKind_Export+    ,MonikerKind_Local]+  type EnumBaseType MonikerKind = Data.Text.Text+  toEnumBaseType MonikerKind_Import = "import"+  toEnumBaseType MonikerKind_Export = "export"+  toEnumBaseType MonikerKind_Local = "local"+  fromEnumBaseType "import" = pure MonikerKind_Import+  fromEnumBaseType "export" = pure MonikerKind_Export+  fromEnumBaseType "local" = pure MonikerKind_Local+  fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/MonikerOptions.hs view
@@ -0,0 +1,32 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.MonikerOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data MonikerOptions = MonikerOptions +  { {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON MonikerOptions where+  toJSON (MonikerOptions arg0) = Aeson.object $ concat $  ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON MonikerOptions where+  parseJSON = Aeson.withObject "MonikerOptions" $ \arg -> MonikerOptions <$> arg Aeson..:! "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/MonikerParams.hs view
@@ -0,0 +1,51 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.MonikerParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data MonikerParams = MonikerParams +  { {-|+  The text document.+  -}+  _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+  , {-|+  The position inside the text document.+  -}+  _position :: Language.LSP.Protocol.Internal.Types.Position.Position+  , {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  An optional token that a server can use to report partial results (e.g. streaming) to+  the client.+  -}+  _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON MonikerParams where+  toJSON (MonikerParams arg0 arg1 arg2 arg3) = Aeson.object $ concat $  [["textDocument" Aeson..= arg0]+    ,["position" Aeson..= arg1]+    ,"workDoneToken" Language.LSP.Protocol.Types.Common..=? arg2+    ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON MonikerParams where+  parseJSON = Aeson.withObject "MonikerParams" $ \arg -> MonikerParams <$> arg Aeson..: "textDocument" <*> arg Aeson..: "position" <*> arg Aeson..:! "workDoneToken" <*> arg Aeson..:! "partialResultToken"
+ generated/Language/LSP/Protocol/Internal/Types/MonikerRegistrationOptions.hs view
@@ -0,0 +1,39 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.MonikerRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data MonikerRegistrationOptions = MonikerRegistrationOptions +  { {-|+  A document selector to identify the scope of the registration. If set to null+  the document selector provided on the client side will be used.+  -}+  _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  , {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON MonikerRegistrationOptions where+  toJSON (MonikerRegistrationOptions arg0 arg1) = Aeson.object $ concat $  [["documentSelector" Aeson..= arg0]+    ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON MonikerRegistrationOptions where+  parseJSON = Aeson.withObject "MonikerRegistrationOptions" $ \arg -> MonikerRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Aeson..:! "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/NotebookCell.hs view
@@ -0,0 +1,61 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.NotebookCell where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ExecutionSummary+import qualified Language.LSP.Protocol.Internal.Types.NotebookCellKind+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+A notebook cell.++A cell's document URI must be unique across ALL notebook+cells and can therefore be used to uniquely identify a+notebook cell or the cell's text document.++@since 3.17.0+-}+data NotebookCell = NotebookCell +  { {-|+  The cell's kind+  -}+  _kind :: Language.LSP.Protocol.Internal.Types.NotebookCellKind.NotebookCellKind+  , {-|+  The URI of the cell's text document+  content.+  -}+  _document :: Language.LSP.Protocol.Types.Uri.Uri+  , {-|+  Additional metadata stored with the cell.++  Note: should always be an object literal (e.g. LSPObject)+  -}+  _metadata :: (Maybe Data.Aeson.Object)+  , {-|+  Additional execution summary information+  if supported by the client.+  -}+  _executionSummary :: (Maybe Language.LSP.Protocol.Internal.Types.ExecutionSummary.ExecutionSummary)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON NotebookCell where+  toJSON (NotebookCell arg0 arg1 arg2 arg3) = Aeson.object $ concat $  [["kind" Aeson..= arg0]+    ,["document" Aeson..= arg1]+    ,"metadata" Language.LSP.Protocol.Types.Common..=? arg2+    ,"executionSummary" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON NotebookCell where+  parseJSON = Aeson.withObject "NotebookCell" $ \arg -> NotebookCell <$> arg Aeson..: "kind" <*> arg Aeson..: "document" <*> arg Aeson..:! "metadata" <*> arg Aeson..:! "executionSummary"
+ generated/Language/LSP/Protocol/Internal/Types/NotebookCellArrayChange.hs view
@@ -0,0 +1,46 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.NotebookCellArrayChange where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.NotebookCell+import qualified Language.LSP.Protocol.Types.Common++{-|+A change describing how to move a `NotebookCell`+array from state S to S'.++@since 3.17.0+-}+data NotebookCellArrayChange = NotebookCellArrayChange +  { {-|+  The start oftest of the cell that changed.+  -}+  _start :: Language.LSP.Protocol.Types.Common.UInt+  , {-|+  The deleted cells+  -}+  _deleteCount :: Language.LSP.Protocol.Types.Common.UInt+  , {-|+  The new cells, if any+  -}+  _cells :: (Maybe [Language.LSP.Protocol.Internal.Types.NotebookCell.NotebookCell])+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON NotebookCellArrayChange where+  toJSON (NotebookCellArrayChange arg0 arg1 arg2) = Aeson.object $ concat $  [["start" Aeson..= arg0]+    ,["deleteCount" Aeson..= arg1]+    ,"cells" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON NotebookCellArrayChange where+  parseJSON = Aeson.withObject "NotebookCellArrayChange" $ \arg -> NotebookCellArrayChange <$> arg Aeson..: "start" <*> arg Aeson..: "deleteCount" <*> arg Aeson..:! "cells"
+ generated/Language/LSP/Protocol/Internal/Types/NotebookCellKind.hs view
@@ -0,0 +1,48 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.NotebookCellKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+A notebook cell kind.++@since 3.17.0+-}+data NotebookCellKind = +    {-|+  A markup-cell is formatted source that is used for display.+  -}+  NotebookCellKind_Markup+  | {-|+  A code-cell is source code.+  -}+  NotebookCellKind_Code+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)+  deriving ( Aeson.ToJSON+  , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum NotebookCellKind Language.LSP.Protocol.Types.Common.UInt)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum NotebookCellKind where+  knownValues = Data.Set.fromList [NotebookCellKind_Markup+    ,NotebookCellKind_Code]+  type EnumBaseType NotebookCellKind = Language.LSP.Protocol.Types.Common.UInt+  toEnumBaseType NotebookCellKind_Markup = 1+  toEnumBaseType NotebookCellKind_Code = 2+  fromEnumBaseType 1 = pure NotebookCellKind_Markup+  fromEnumBaseType 2 = pure NotebookCellKind_Code+  fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/NotebookCellTextDocumentFilter.hs view
@@ -0,0 +1,48 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.NotebookCellTextDocumentFilter where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocumentFilter+import qualified Language.LSP.Protocol.Types.Common++{-|+A notebook cell text document filter denotes a cell text+document by different properties.++@since 3.17.0+-}+data NotebookCellTextDocumentFilter = NotebookCellTextDocumentFilter +  { {-|+  A filter that matches against the notebook+  containing the notebook cell. If a string+  value is provided it matches against the+  notebook type. '*' matches every notebook.+  -}+  _notebook :: (Data.Text.Text Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.NotebookDocumentFilter.NotebookDocumentFilter)+  , {-|+  A language id like `python`.++  Will be matched against the language id of the+  notebook cell document. '*' matches every language.+  -}+  _language :: (Maybe Data.Text.Text)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON NotebookCellTextDocumentFilter where+  toJSON (NotebookCellTextDocumentFilter arg0 arg1) = Aeson.object $ concat $  [["notebook" Aeson..= arg0]+    ,"language" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON NotebookCellTextDocumentFilter where+  parseJSON = Aeson.withObject "NotebookCellTextDocumentFilter" $ \arg -> NotebookCellTextDocumentFilter <$> arg Aeson..: "notebook" <*> arg Aeson..:! "language"
+ generated/Language/LSP/Protocol/Internal/Types/NotebookDocument.hs view
@@ -0,0 +1,62 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.NotebookDocument where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.NotebookCell+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+A notebook document.++@since 3.17.0+-}+data NotebookDocument = NotebookDocument +  { {-|+  The notebook document's uri.+  -}+  _uri :: Language.LSP.Protocol.Types.Uri.Uri+  , {-|+  The type of the notebook.+  -}+  _notebookType :: Data.Text.Text+  , {-|+  The version number of this document (it will increase after each+  change, including undo/redo).+  -}+  _version :: Language.LSP.Protocol.Types.Common.Int32+  , {-|+  Additional metadata stored with the notebook+  document.++  Note: should always be an object literal (e.g. LSPObject)+  -}+  _metadata :: (Maybe Data.Aeson.Object)+  , {-|+  The cells of a notebook.+  -}+  _cells :: [Language.LSP.Protocol.Internal.Types.NotebookCell.NotebookCell]+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON NotebookDocument where+  toJSON (NotebookDocument arg0 arg1 arg2 arg3 arg4) = Aeson.object $ concat $  [["uri" Aeson..= arg0]+    ,["notebookType" Aeson..= arg1]+    ,["version" Aeson..= arg2]+    ,"metadata" Language.LSP.Protocol.Types.Common..=? arg3+    ,["cells" Aeson..= arg4]]++instance Aeson.FromJSON NotebookDocument where+  parseJSON = Aeson.withObject "NotebookDocument" $ \arg -> NotebookDocument <$> arg Aeson..: "uri" <*> arg Aeson..: "notebookType" <*> arg Aeson..: "version" <*> arg Aeson..:! "metadata" <*> arg Aeson..: "cells"
+ generated/Language/LSP/Protocol/Internal/Types/NotebookDocumentChangeEvent.hs view
@@ -0,0 +1,49 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.NotebookDocumentChangeEvent where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row as Row+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.NotebookCell+import qualified Language.LSP.Protocol.Internal.Types.NotebookCellArrayChange+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentContentChangeEvent+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentItem+import qualified Language.LSP.Protocol.Internal.Types.VersionedTextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+A change event for a notebook document.++@since 3.17.0+-}+data NotebookDocumentChangeEvent = NotebookDocumentChangeEvent +  { {-|+  The changed meta data if any.++  Note: should always be an object literal (e.g. LSPObject)+  -}+  _metadata :: (Maybe Data.Aeson.Object)+  , {-|+  Changes to cells+  -}+  _cells :: (Maybe (Row.Rec ("structure" Row..== (Maybe (Row.Rec ("array" Row..== Language.LSP.Protocol.Internal.Types.NotebookCellArrayChange.NotebookCellArrayChange Row..+ ("didOpen" Row..== (Maybe [Language.LSP.Protocol.Internal.Types.TextDocumentItem.TextDocumentItem]) Row..+ ("didClose" Row..== (Maybe [Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier]) Row..+ Row.Empty))))) Row..+ ("data" Row..== (Maybe [Language.LSP.Protocol.Internal.Types.NotebookCell.NotebookCell]) Row..+ ("textContent" Row..== (Maybe [(Row.Rec ("document" Row..== Language.LSP.Protocol.Internal.Types.VersionedTextDocumentIdentifier.VersionedTextDocumentIdentifier Row..+ ("changes" Row..== [Language.LSP.Protocol.Internal.Types.TextDocumentContentChangeEvent.TextDocumentContentChangeEvent] Row..+ Row.Empty)))]) Row..+ Row.Empty)))))+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON NotebookDocumentChangeEvent where+  toJSON (NotebookDocumentChangeEvent arg0 arg1) = Aeson.object $ concat $  ["metadata" Language.LSP.Protocol.Types.Common..=? arg0+    ,"cells" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON NotebookDocumentChangeEvent where+  parseJSON = Aeson.withObject "NotebookDocumentChangeEvent" $ \arg -> NotebookDocumentChangeEvent <$> arg Aeson..:! "metadata" <*> arg Aeson..:! "cells"
+ generated/Language/LSP/Protocol/Internal/Types/NotebookDocumentClientCapabilities.hs view
@@ -0,0 +1,37 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.NotebookDocumentClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncClientCapabilities+import qualified Language.LSP.Protocol.Types.Common++{-|+Capabilities specific to the notebook document support.++@since 3.17.0+-}+data NotebookDocumentClientCapabilities = NotebookDocumentClientCapabilities +  { {-|+  Capabilities specific to notebook document synchronization++  @since 3.17.0+  -}+  _synchronization :: Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncClientCapabilities.NotebookDocumentSyncClientCapabilities+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON NotebookDocumentClientCapabilities where+  toJSON (NotebookDocumentClientCapabilities arg0) = Aeson.object $ concat $  [["synchronization" Aeson..= arg0]]++instance Aeson.FromJSON NotebookDocumentClientCapabilities where+  parseJSON = Aeson.withObject "NotebookDocumentClientCapabilities" $ \arg -> NotebookDocumentClientCapabilities <$> arg Aeson..: "synchronization"
+ generated/Language/LSP/Protocol/Internal/Types/NotebookDocumentFilter.hs view
@@ -0,0 +1,28 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.NotebookDocumentFilter where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row as Row+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+A notebook document filter denotes a notebook document by+different properties. The properties will be match+against the notebook's URI (same as with documents)++@since 3.17.0+-}+newtype NotebookDocumentFilter = NotebookDocumentFilter ((Row.Rec ("notebookType" Row..== Data.Text.Text Row..+ ("scheme" Row..== (Maybe Data.Text.Text) Row..+ ("pattern" Row..== (Maybe Data.Text.Text) Row..+ Row.Empty)))) Language.LSP.Protocol.Types.Common.|? ((Row.Rec ("notebookType" Row..== (Maybe Data.Text.Text) Row..+ ("scheme" Row..== Data.Text.Text Row..+ ("pattern" Row..== (Maybe Data.Text.Text) Row..+ Row.Empty)))) Language.LSP.Protocol.Types.Common.|? (Row.Rec ("notebookType" Row..== (Maybe Data.Text.Text) Row..+ ("scheme" Row..== (Maybe Data.Text.Text) Row..+ ("pattern" Row..== Data.Text.Text Row..+ Row.Empty))))))+  deriving newtype (Aeson.ToJSON, Aeson.FromJSON)+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)
+ generated/Language/LSP/Protocol/Internal/Types/NotebookDocumentIdentifier.hs view
@@ -0,0 +1,35 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.NotebookDocumentIdentifier where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+A literal to identify a notebook document in the client.++@since 3.17.0+-}+data NotebookDocumentIdentifier = NotebookDocumentIdentifier +  { {-|+  The notebook document's uri.+  -}+  _uri :: Language.LSP.Protocol.Types.Uri.Uri+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON NotebookDocumentIdentifier where+  toJSON (NotebookDocumentIdentifier arg0) = Aeson.object $ concat $  [["uri" Aeson..= arg0]]++instance Aeson.FromJSON NotebookDocumentIdentifier where+  parseJSON = Aeson.withObject "NotebookDocumentIdentifier" $ \arg -> NotebookDocumentIdentifier <$> arg Aeson..: "uri"
+ generated/Language/LSP/Protocol/Internal/Types/NotebookDocumentSyncClientCapabilities.hs view
@@ -0,0 +1,42 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Notebook specific client capabilities.++@since 3.17.0+-}+data NotebookDocumentSyncClientCapabilities = NotebookDocumentSyncClientCapabilities +  { {-|+  Whether implementation supports dynamic registration. If this is+  set to `true` the client supports the new+  `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`+  return value for the corresponding server capability as well.+  -}+  _dynamicRegistration :: (Maybe Bool)+  , {-|+  The client supports sending execution summary data per cell.+  -}+  _executionSummarySupport :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON NotebookDocumentSyncClientCapabilities where+  toJSON (NotebookDocumentSyncClientCapabilities arg0 arg1) = Aeson.object $ concat $  ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+    ,"executionSummarySupport" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON NotebookDocumentSyncClientCapabilities where+  parseJSON = Aeson.withObject "NotebookDocumentSyncClientCapabilities" $ \arg -> NotebookDocumentSyncClientCapabilities <$> arg Aeson..:! "dynamicRegistration" <*> arg Aeson..:! "executionSummarySupport"
+ generated/Language/LSP/Protocol/Internal/Types/NotebookDocumentSyncOptions.hs view
@@ -0,0 +1,53 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row as Row+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocumentFilter+import qualified Language.LSP.Protocol.Types.Common++{-|+Options specific to a notebook plus its cells+to be synced to the server.++If a selector provides a notebook document+filter but no cell selector all cells of a+matching notebook document will be synced.++If a selector provides no notebook document+filter but only a cell selector all notebook+document that contain at least one matching+cell will be synced.++@since 3.17.0+-}+data NotebookDocumentSyncOptions = NotebookDocumentSyncOptions +  { {-|+  The notebooks to be synced+  -}+  _notebookSelector :: [((Row.Rec ("notebook" Row..== (Data.Text.Text Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.NotebookDocumentFilter.NotebookDocumentFilter) Row..+ ("cells" Row..== (Maybe [(Row.Rec ("language" Row..== Data.Text.Text Row..+ Row.Empty))]) Row..+ Row.Empty))) Language.LSP.Protocol.Types.Common.|? (Row.Rec ("notebook" Row..== (Maybe (Data.Text.Text Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.NotebookDocumentFilter.NotebookDocumentFilter)) Row..+ ("cells" Row..== [(Row.Rec ("language" Row..== Data.Text.Text Row..+ Row.Empty))] Row..+ Row.Empty))))]+  , {-|+  Whether save notification should be forwarded to+  the server. Will only be honored if mode === `notebook`.+  -}+  _save :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON NotebookDocumentSyncOptions where+  toJSON (NotebookDocumentSyncOptions arg0 arg1) = Aeson.object $ concat $  [["notebookSelector" Aeson..= arg0]+    ,"save" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON NotebookDocumentSyncOptions where+  parseJSON = Aeson.withObject "NotebookDocumentSyncOptions" $ \arg -> NotebookDocumentSyncOptions <$> arg Aeson..: "notebookSelector" <*> arg Aeson..:! "save"
+ generated/Language/LSP/Protocol/Internal/Types/NotebookDocumentSyncRegistrationOptions.hs view
@@ -0,0 +1,49 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row as Row+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocumentFilter+import qualified Language.LSP.Protocol.Types.Common++{-|+Registration options specific to a notebook.++@since 3.17.0+-}+data NotebookDocumentSyncRegistrationOptions = NotebookDocumentSyncRegistrationOptions +  { {-|+  The notebooks to be synced+  -}+  _notebookSelector :: [((Row.Rec ("notebook" Row..== (Data.Text.Text Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.NotebookDocumentFilter.NotebookDocumentFilter) Row..+ ("cells" Row..== (Maybe [(Row.Rec ("language" Row..== Data.Text.Text Row..+ Row.Empty))]) Row..+ Row.Empty))) Language.LSP.Protocol.Types.Common.|? (Row.Rec ("notebook" Row..== (Maybe (Data.Text.Text Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.NotebookDocumentFilter.NotebookDocumentFilter)) Row..+ ("cells" Row..== [(Row.Rec ("language" Row..== Data.Text.Text Row..+ Row.Empty))] Row..+ Row.Empty))))]+  , {-|+  Whether save notification should be forwarded to+  the server. Will only be honored if mode === `notebook`.+  -}+  _save :: (Maybe Bool)+  , {-|+  The id used to register the request. The id can be used to deregister+  the request again. See also Registration#id.+  -}+  _id :: (Maybe Data.Text.Text)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON NotebookDocumentSyncRegistrationOptions where+  toJSON (NotebookDocumentSyncRegistrationOptions arg0 arg1 arg2) = Aeson.object $ concat $  [["notebookSelector" Aeson..= arg0]+    ,"save" Language.LSP.Protocol.Types.Common..=? arg1+    ,"id" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON NotebookDocumentSyncRegistrationOptions where+  parseJSON = Aeson.withObject "NotebookDocumentSyncRegistrationOptions" $ \arg -> NotebookDocumentSyncRegistrationOptions <$> arg Aeson..: "notebookSelector" <*> arg Aeson..:! "save" <*> arg Aeson..:! "id"
+ generated/Language/LSP/Protocol/Internal/Types/OptionalVersionedTextDocumentIdentifier.hs view
@@ -0,0 +1,42 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.OptionalVersionedTextDocumentIdentifier where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+A text document identifier to optionally denote a specific version of a text document.+-}+data OptionalVersionedTextDocumentIdentifier = OptionalVersionedTextDocumentIdentifier +  { {-|+  The text document's uri.+  -}+  _uri :: Language.LSP.Protocol.Types.Uri.Uri+  , {-|+  The version number of this document. If a versioned text document identifier+  is sent from the server to the client and the file is not open in the editor+  (the server has not received an open notification before) the server can send+  `null` to indicate that the version is unknown and the content on disk is the+  truth (as specified with document content ownership).+  -}+  _version :: (Language.LSP.Protocol.Types.Common.Int32 Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON OptionalVersionedTextDocumentIdentifier where+  toJSON (OptionalVersionedTextDocumentIdentifier arg0 arg1) = Aeson.object $ concat $  [["uri" Aeson..= arg0]+    ,["version" Aeson..= arg1]]++instance Aeson.FromJSON OptionalVersionedTextDocumentIdentifier where+  parseJSON = Aeson.withObject "OptionalVersionedTextDocumentIdentifier" $ \arg -> OptionalVersionedTextDocumentIdentifier <$> arg Aeson..: "uri" <*> arg Aeson..: "version"
+ generated/Language/LSP/Protocol/Internal/Types/ParameterInformation.hs view
@@ -0,0 +1,49 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ParameterInformation where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.MarkupContent+import qualified Language.LSP.Protocol.Types.Common++{-|+Represents a parameter of a callable-signature. A parameter can+have a label and a doc-comment.+-}+data ParameterInformation = ParameterInformation +  { {-|+  The label of this parameter information.++  Either a string or an inclusive start and exclusive end offsets within its containing+  signature label. (see SignatureInformation.label). The offsets are based on a UTF-16+  string representation as `Position` and `Range` does.++  *Note*: a label of type string should be a substring of its containing signature label.+  Its intended use case is to highlight the parameter label part in the `SignatureInformation.label`.+  -}+  _label :: (Data.Text.Text Language.LSP.Protocol.Types.Common.|? ( Language.LSP.Protocol.Types.Common.UInt+  , Language.LSP.Protocol.Types.Common.UInt ))+  , {-|+  The human-readable doc-comment of this parameter. Will be shown+  in the UI but can be omitted.+  -}+  _documentation :: (Maybe (Data.Text.Text Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.MarkupContent.MarkupContent))+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON ParameterInformation where+  toJSON (ParameterInformation arg0 arg1) = Aeson.object $ concat $  [["label" Aeson..= arg0]+    ,"documentation" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON ParameterInformation where+  parseJSON = Aeson.withObject "ParameterInformation" $ \arg -> ParameterInformation <$> arg Aeson..: "label" <*> arg Aeson..:! "documentation"
+ generated/Language/LSP/Protocol/Internal/Types/PartialResultParams.hs view
@@ -0,0 +1,34 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.PartialResultParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data PartialResultParams = PartialResultParams +  { {-|+  An optional token that a server can use to report partial results (e.g. streaming) to+  the client.+  -}+  _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON PartialResultParams where+  toJSON (PartialResultParams arg0) = Aeson.object $ concat $  ["partialResultToken" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON PartialResultParams where+  parseJSON = Aeson.withObject "PartialResultParams" $ \arg -> PartialResultParams <$> arg Aeson..:! "partialResultToken"
+ generated/Language/LSP/Protocol/Internal/Types/Pattern.hs view
@@ -0,0 +1,33 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.Pattern where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text++{-|+The glob pattern to watch relative to the base path. Glob patterns can have the following syntax:+- `*` to match one or more characters in a path segment+- `?` to match on one character in a path segment+- `**` to match any number of path segments, including none+- `{}` to group conditions (e.g. `**​/*.{ts,js}` matches all TypeScript and JavaScript files)+- `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)+- `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`)++@since 3.17.0+-}+newtype Pattern = Pattern Data.Text.Text+  deriving newtype ( Aeson.ToJSON+  , Aeson.FromJSON+  , Aeson.ToJSONKey+  , Aeson.FromJSONKey )+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)
+ generated/Language/LSP/Protocol/Internal/Types/Position.hs view
@@ -0,0 +1,72 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.Position where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Position in a text document expressed as zero-based line and character+offset. Prior to 3.17 the offsets were always based on a UTF-16 string+representation. So a string of the form `a𐐀b` the character offset of the+character `a` is 0, the character offset of `𐐀` is 1 and the character+offset of b is 3 since `𐐀` is represented using two code units in UTF-16.+Since 3.17 clients and servers can agree on a different string encoding+representation (e.g. UTF-8). The client announces it's supported encoding+via the client capability [`general.positionEncodings`](#clientCapabilities).+The value is an array of position encodings the client supports, with+decreasing preference (e.g. the encoding at index `0` is the most preferred+one). To stay backwards compatible the only mandatory encoding is UTF-16+represented via the string `utf-16`. The server can pick one of the+encodings offered by the client and signals that encoding back to the+client via the initialize result's property+[`capabilities.positionEncoding`](#serverCapabilities). If the string value+`utf-16` is missing from the client's capability `general.positionEncodings`+servers can safely assume that the client supports UTF-16. If the server+omits the position encoding in its initialize result the encoding defaults+to the string value `utf-16`. Implementation considerations: since the+conversion from one encoding into another requires the content of the+file / line the conversion is best done where the file is read which is+usually on the server side.++Positions are line end character agnostic. So you can not specify a position+that denotes `\r|\n` or `\n|` where `|` represents the character offset.++@since 3.17.0 - support for negotiated position encoding.+-}+data Position = Position +  { {-|+  Line position in a document (zero-based).++  If a line number is greater than the number of lines in a document, it defaults back to the number of lines in the document.+  If a line number is negative, it defaults to 0.+  -}+  _line :: Language.LSP.Protocol.Types.Common.UInt+  , {-|+  Character offset on a line in a document (zero-based).++  The meaning of this offset is determined by the negotiated+  `PositionEncodingKind`.++  If the character value is greater than the line length it defaults back to the+  line length.+  -}+  _character :: Language.LSP.Protocol.Types.Common.UInt+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON Position where+  toJSON (Position arg0 arg1) = Aeson.object $ concat $  [["line" Aeson..= arg0]+    ,["character" Aeson..= arg1]]++instance Aeson.FromJSON Position where+  parseJSON = Aeson.withObject "Position" $ \arg -> Position <$> arg Aeson..: "line" <*> arg Aeson..: "character"
+ generated/Language/LSP/Protocol/Internal/Types/PositionEncodingKind.hs view
@@ -0,0 +1,67 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.PositionEncodingKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+A set of predefined position encoding kinds.++@since 3.17.0+-}+data PositionEncodingKind = +    {-|+  Character offsets count UTF-8 code units.+  -}+  PositionEncodingKind_UTF8+  | {-|+  Character offsets count UTF-16 code units.++  This is the default and must always be supported+  by servers+  -}+  PositionEncodingKind_UTF16+  | {-|+  Character offsets count UTF-32 code units.++  Implementation note: these are the same as Unicode code points,+  so this `PositionEncodingKind` may also be used for an+  encoding-agnostic representation of character offsets.+  -}+  PositionEncodingKind_UTF32+  | PositionEncodingKind_Custom Data.Text.Text+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)+  deriving ( Aeson.ToJSON+  , Aeson.FromJSON+  , Data.String.IsString ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum PositionEncodingKind Data.Text.Text)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum PositionEncodingKind where+  knownValues = Data.Set.fromList [PositionEncodingKind_UTF8+    ,PositionEncodingKind_UTF16+    ,PositionEncodingKind_UTF32]+  type EnumBaseType PositionEncodingKind = Data.Text.Text+  toEnumBaseType PositionEncodingKind_UTF8 = "utf-8"+  toEnumBaseType PositionEncodingKind_UTF16 = "utf-16"+  toEnumBaseType PositionEncodingKind_UTF32 = "utf-32"+  toEnumBaseType (PositionEncodingKind_Custom arg) = arg++instance Language.LSP.Protocol.Types.LspEnum.LspOpenEnum PositionEncodingKind where+  fromOpenEnumBaseType "utf-8" = PositionEncodingKind_UTF8+  fromOpenEnumBaseType "utf-16" = PositionEncodingKind_UTF16+  fromOpenEnumBaseType "utf-32" = PositionEncodingKind_UTF32+  fromOpenEnumBaseType arg = PositionEncodingKind_Custom arg++
+ generated/Language/LSP/Protocol/Internal/Types/PrepareRenameParams.hs view
@@ -0,0 +1,45 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.PrepareRenameParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data PrepareRenameParams = PrepareRenameParams +  { {-|+  The text document.+  -}+  _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+  , {-|+  The position inside the text document.+  -}+  _position :: Language.LSP.Protocol.Internal.Types.Position.Position+  , {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON PrepareRenameParams where+  toJSON (PrepareRenameParams arg0 arg1 arg2) = Aeson.object $ concat $  [["textDocument" Aeson..= arg0]+    ,["position" Aeson..= arg1]+    ,"workDoneToken" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON PrepareRenameParams where+  parseJSON = Aeson.withObject "PrepareRenameParams" $ \arg -> PrepareRenameParams <$> arg Aeson..: "textDocument" <*> arg Aeson..: "position" <*> arg Aeson..:! "workDoneToken"
+ generated/Language/LSP/Protocol/Internal/Types/PrepareRenameResult.hs view
@@ -0,0 +1,25 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.PrepareRenameResult where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row as Row+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+newtype PrepareRenameResult = PrepareRenameResult (Language.LSP.Protocol.Internal.Types.Range.Range Language.LSP.Protocol.Types.Common.|? ((Row.Rec ("range" Row..== Language.LSP.Protocol.Internal.Types.Range.Range Row..+ ("placeholder" Row..== Data.Text.Text Row..+ Row.Empty))) Language.LSP.Protocol.Types.Common.|? (Row.Rec ("defaultBehavior" Row..== Bool Row..+ Row.Empty))))+  deriving newtype (Aeson.ToJSON, Aeson.FromJSON)+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)
+ generated/Language/LSP/Protocol/Internal/Types/PrepareSupportDefaultBehavior.hs view
@@ -0,0 +1,40 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.PrepareSupportDefaultBehavior where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|++-}+data PrepareSupportDefaultBehavior = +    {-|+  The client's default behavior is to select the identifier+  according the to language's syntax rule.+  -}+  PrepareSupportDefaultBehavior_Identifier+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)+  deriving ( Aeson.ToJSON+  , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum PrepareSupportDefaultBehavior Language.LSP.Protocol.Types.Common.UInt)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum PrepareSupportDefaultBehavior where+  knownValues = Data.Set.fromList [PrepareSupportDefaultBehavior_Identifier]+  type EnumBaseType PrepareSupportDefaultBehavior = Language.LSP.Protocol.Types.Common.UInt+  toEnumBaseType PrepareSupportDefaultBehavior_Identifier = 1+  fromEnumBaseType 1 = pure PrepareSupportDefaultBehavior_Identifier+  fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/PreviousResultId.hs view
@@ -0,0 +1,42 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.PreviousResultId where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+A previous result id in a workspace pull request.++@since 3.17.0+-}+data PreviousResultId = PreviousResultId +  { {-|+  The URI for which the client knowns a+  result id.+  -}+  _uri :: Language.LSP.Protocol.Types.Uri.Uri+  , {-|+  The value of the previous result id.+  -}+  _value :: Data.Text.Text+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON PreviousResultId where+  toJSON (PreviousResultId arg0 arg1) = Aeson.object $ concat $  [["uri" Aeson..= arg0]+    ,["value" Aeson..= arg1]]++instance Aeson.FromJSON PreviousResultId where+  parseJSON = Aeson.withObject "PreviousResultId" $ \arg -> PreviousResultId <$> arg Aeson..: "uri" <*> arg Aeson..: "value"
+ generated/Language/LSP/Protocol/Internal/Types/ProgressParams.hs view
@@ -0,0 +1,39 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ProgressParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data ProgressParams = ProgressParams +  { {-|+  The progress token provided by the client or server.+  -}+  _token :: Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken+  , {-|+  The progress data.+  -}+  _value :: Data.Aeson.Value+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON ProgressParams where+  toJSON (ProgressParams arg0 arg1) = Aeson.object $ concat $  [["token" Aeson..= arg0]+    ,["value" Aeson..= arg1]]++instance Aeson.FromJSON ProgressParams where+  parseJSON = Aeson.withObject "ProgressParams" $ \arg -> ProgressParams <$> arg Aeson..: "token" <*> arg Aeson..: "value"
+ generated/Language/LSP/Protocol/Internal/Types/ProgressToken.hs view
@@ -0,0 +1,23 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ProgressToken where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+newtype ProgressToken = ProgressToken (Language.LSP.Protocol.Types.Common.Int32 Language.LSP.Protocol.Types.Common.|? Data.Text.Text)+  deriving newtype (Aeson.ToJSON, Aeson.FromJSON)+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)
+ generated/Language/LSP/Protocol/Internal/Types/PublishDiagnosticsClientCapabilities.hs view
@@ -0,0 +1,66 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.PublishDiagnosticsClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row as Row+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.DiagnosticTag+import qualified Language.LSP.Protocol.Types.Common++{-|+The publish diagnostic client capabilities.+-}+data PublishDiagnosticsClientCapabilities = PublishDiagnosticsClientCapabilities +  { {-|+  Whether the clients accepts diagnostics with related information.+  -}+  _relatedInformation :: (Maybe Bool)+  , {-|+  Client supports the tag property to provide meta data about a diagnostic.+  Clients supporting tags have to handle unknown tags gracefully.++  @since 3.15.0+  -}+  _tagSupport :: (Maybe (Row.Rec ("valueSet" Row..== [Language.LSP.Protocol.Internal.Types.DiagnosticTag.DiagnosticTag] Row..+ Row.Empty)))+  , {-|+  Whether the client interprets the version property of the+  `textDocument/publishDiagnostics` notification's parameter.++  @since 3.15.0+  -}+  _versionSupport :: (Maybe Bool)+  , {-|+  Client supports a codeDescription property++  @since 3.16.0+  -}+  _codeDescriptionSupport :: (Maybe Bool)+  , {-|+  Whether code action supports the `data` property which is+  preserved between a `textDocument/publishDiagnostics` and+  `textDocument/codeAction` request.++  @since 3.16.0+  -}+  _dataSupport :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON PublishDiagnosticsClientCapabilities where+  toJSON (PublishDiagnosticsClientCapabilities arg0 arg1 arg2 arg3 arg4) = Aeson.object $ concat $  ["relatedInformation" Language.LSP.Protocol.Types.Common..=? arg0+    ,"tagSupport" Language.LSP.Protocol.Types.Common..=? arg1+    ,"versionSupport" Language.LSP.Protocol.Types.Common..=? arg2+    ,"codeDescriptionSupport" Language.LSP.Protocol.Types.Common..=? arg3+    ,"dataSupport" Language.LSP.Protocol.Types.Common..=? arg4]++instance Aeson.FromJSON PublishDiagnosticsClientCapabilities where+  parseJSON = Aeson.withObject "PublishDiagnosticsClientCapabilities" $ \arg -> PublishDiagnosticsClientCapabilities <$> arg Aeson..:! "relatedInformation" <*> arg Aeson..:! "tagSupport" <*> arg Aeson..:! "versionSupport" <*> arg Aeson..:! "codeDescriptionSupport" <*> arg Aeson..:! "dataSupport"
+ generated/Language/LSP/Protocol/Internal/Types/PublishDiagnosticsParams.hs view
@@ -0,0 +1,46 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.PublishDiagnosticsParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Diagnostic+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+The publish diagnostic notification's parameters.+-}+data PublishDiagnosticsParams = PublishDiagnosticsParams +  { {-|+  The URI for which diagnostic information is reported.+  -}+  _uri :: Language.LSP.Protocol.Types.Uri.Uri+  , {-|+  Optional the version number of the document the diagnostics are published for.++  @since 3.15.0+  -}+  _version :: (Maybe Language.LSP.Protocol.Types.Common.Int32)+  , {-|+  An array of diagnostic information items.+  -}+  _diagnostics :: [Language.LSP.Protocol.Internal.Types.Diagnostic.Diagnostic]+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON PublishDiagnosticsParams where+  toJSON (PublishDiagnosticsParams arg0 arg1 arg2) = Aeson.object $ concat $  [["uri" Aeson..= arg0]+    ,"version" Language.LSP.Protocol.Types.Common..=? arg1+    ,["diagnostics" Aeson..= arg2]]++instance Aeson.FromJSON PublishDiagnosticsParams where+  parseJSON = Aeson.withObject "PublishDiagnosticsParams" $ \arg -> PublishDiagnosticsParams <$> arg Aeson..: "uri" <*> arg Aeson..:! "version" <*> arg Aeson..: "diagnostics"
+ generated/Language/LSP/Protocol/Internal/Types/Range.hs view
@@ -0,0 +1,48 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.Range where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Types.Common++{-|+A range in a text document expressed as (zero-based) start and end positions.++If you want to specify a range that contains a line including the line ending+character(s) then use an end position denoting the start of the next line.+For example:+```ts+{+    start: { line: 5, character: 23 }+    end : { line 6, character : 0 }+}+```+-}+data Range = Range +  { {-|+  The range's start position.+  -}+  _start :: Language.LSP.Protocol.Internal.Types.Position.Position+  , {-|+  The range's end position.+  -}+  _end :: Language.LSP.Protocol.Internal.Types.Position.Position+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON Range where+  toJSON (Range arg0 arg1) = Aeson.object $ concat $  [["start" Aeson..= arg0]+    ,["end" Aeson..= arg1]]++instance Aeson.FromJSON Range where+  parseJSON = Aeson.withObject "Range" $ \arg -> Range <$> arg Aeson..: "start" <*> arg Aeson..: "end"
+ generated/Language/LSP/Protocol/Internal/Types/ReferenceClientCapabilities.hs view
@@ -0,0 +1,32 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ReferenceClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Client Capabilities for a `ReferencesRequest`.+-}+data ReferenceClientCapabilities = ReferenceClientCapabilities +  { {-|+  Whether references supports dynamic registration.+  -}+  _dynamicRegistration :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON ReferenceClientCapabilities where+  toJSON (ReferenceClientCapabilities arg0) = Aeson.object $ concat $  ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON ReferenceClientCapabilities where+  parseJSON = Aeson.withObject "ReferenceClientCapabilities" $ \arg -> ReferenceClientCapabilities <$> arg Aeson..:! "dynamicRegistration"
+ generated/Language/LSP/Protocol/Internal/Types/ReferenceContext.hs view
@@ -0,0 +1,33 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ReferenceContext where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Value-object that contains additional information when+requesting references.+-}+data ReferenceContext = ReferenceContext +  { {-|+  Include the declaration of the current symbol.+  -}+  _includeDeclaration :: Bool+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON ReferenceContext where+  toJSON (ReferenceContext arg0) = Aeson.object $ concat $  [["includeDeclaration" Aeson..= arg0]]++instance Aeson.FromJSON ReferenceContext where+  parseJSON = Aeson.withObject "ReferenceContext" $ \arg -> ReferenceContext <$> arg Aeson..: "includeDeclaration"
+ generated/Language/LSP/Protocol/Internal/Types/ReferenceOptions.hs view
@@ -0,0 +1,32 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ReferenceOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Reference options.+-}+data ReferenceOptions = ReferenceOptions +  { {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON ReferenceOptions where+  toJSON (ReferenceOptions arg0) = Aeson.object $ concat $  ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON ReferenceOptions where+  parseJSON = Aeson.withObject "ReferenceOptions" $ \arg -> ReferenceOptions <$> arg Aeson..:! "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/ReferenceParams.hs view
@@ -0,0 +1,57 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ReferenceParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.ReferenceContext+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+Parameters for a `ReferencesRequest`.+-}+data ReferenceParams = ReferenceParams +  { {-|+  The text document.+  -}+  _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+  , {-|+  The position inside the text document.+  -}+  _position :: Language.LSP.Protocol.Internal.Types.Position.Position+  , {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  An optional token that a server can use to report partial results (e.g. streaming) to+  the client.+  -}+  _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|++  -}+  _context :: Language.LSP.Protocol.Internal.Types.ReferenceContext.ReferenceContext+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON ReferenceParams where+  toJSON (ReferenceParams arg0 arg1 arg2 arg3 arg4) = Aeson.object $ concat $  [["textDocument" Aeson..= arg0]+    ,["position" Aeson..= arg1]+    ,"workDoneToken" Language.LSP.Protocol.Types.Common..=? arg2+    ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg3+    ,["context" Aeson..= arg4]]++instance Aeson.FromJSON ReferenceParams where+  parseJSON = Aeson.withObject "ReferenceParams" $ \arg -> ReferenceParams <$> arg Aeson..: "textDocument" <*> arg Aeson..: "position" <*> arg Aeson..:! "workDoneToken" <*> arg Aeson..:! "partialResultToken" <*> arg Aeson..: "context"
+ generated/Language/LSP/Protocol/Internal/Types/ReferenceRegistrationOptions.hs view
@@ -0,0 +1,39 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ReferenceRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+Registration options for a `ReferencesRequest`.+-}+data ReferenceRegistrationOptions = ReferenceRegistrationOptions +  { {-|+  A document selector to identify the scope of the registration. If set to null+  the document selector provided on the client side will be used.+  -}+  _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  , {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON ReferenceRegistrationOptions where+  toJSON (ReferenceRegistrationOptions arg0 arg1) = Aeson.object $ concat $  [["documentSelector" Aeson..= arg0]+    ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON ReferenceRegistrationOptions where+  parseJSON = Aeson.withObject "ReferenceRegistrationOptions" $ \arg -> ReferenceRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Aeson..:! "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/Registration.hs view
@@ -0,0 +1,45 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.Registration where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+General parameters to to register for an notification or to register a provider.+-}+data Registration = Registration +  { {-|+  The id used to register the request. The id can be used to deregister+  the request again.+  -}+  _id :: Data.Text.Text+  , {-|+  The method / capability to register for.+  -}+  _method :: Data.Text.Text+  , {-|+  Options necessary for the registration.+  -}+  _registerOptions :: (Maybe Data.Aeson.Value)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON Registration where+  toJSON (Registration arg0 arg1 arg2) = Aeson.object $ concat $  [["id" Aeson..= arg0]+    ,["method" Aeson..= arg1]+    ,"registerOptions" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON Registration where+  parseJSON = Aeson.withObject "Registration" $ \arg -> Registration <$> arg Aeson..: "id" <*> arg Aeson..: "method" <*> arg Aeson..:! "registerOptions"
+ generated/Language/LSP/Protocol/Internal/Types/RegistrationParams.hs view
@@ -0,0 +1,33 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.RegistrationParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Registration+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data RegistrationParams = RegistrationParams +  { {-|++  -}+  _registrations :: [Language.LSP.Protocol.Internal.Types.Registration.Registration]+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON RegistrationParams where+  toJSON (RegistrationParams arg0) = Aeson.object $ concat $  [["registrations" Aeson..= arg0]]++instance Aeson.FromJSON RegistrationParams where+  parseJSON = Aeson.withObject "RegistrationParams" $ \arg -> RegistrationParams <$> arg Aeson..: "registrations"
+ generated/Language/LSP/Protocol/Internal/Types/RegularExpressionsClientCapabilities.hs view
@@ -0,0 +1,40 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.RegularExpressionsClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+Client capabilities specific to regular expressions.++@since 3.16.0+-}+data RegularExpressionsClientCapabilities = RegularExpressionsClientCapabilities +  { {-|+  The engine's name.+  -}+  _engine :: Data.Text.Text+  , {-|+  The engine's version.+  -}+  _version :: (Maybe Data.Text.Text)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON RegularExpressionsClientCapabilities where+  toJSON (RegularExpressionsClientCapabilities arg0 arg1) = Aeson.object $ concat $  [["engine" Aeson..= arg0]+    ,"version" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON RegularExpressionsClientCapabilities where+  parseJSON = Aeson.withObject "RegularExpressionsClientCapabilities" $ \arg -> RegularExpressionsClientCapabilities <$> arg Aeson..: "engine" <*> arg Aeson..:! "version"
+ generated/Language/LSP/Protocol/Internal/Types/RelatedFullDocumentDiagnosticReport.hs view
@@ -0,0 +1,64 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.RelatedFullDocumentDiagnosticReport where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Map+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Diagnostic+import qualified Language.LSP.Protocol.Internal.Types.FullDocumentDiagnosticReport+import qualified Language.LSP.Protocol.Internal.Types.UnchangedDocumentDiagnosticReport+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Singletons+import qualified Language.LSP.Protocol.Types.Uri++{-|+A full diagnostic report with a set of related documents.++@since 3.17.0+-}+data RelatedFullDocumentDiagnosticReport = RelatedFullDocumentDiagnosticReport +  { {-|+  A full document diagnostic report.+  -}+  _kind :: (Language.LSP.Protocol.Types.Singletons.AString "full")+  , {-|+  An optional result id. If provided it will+  be sent on the next diagnostic request for the+  same document.+  -}+  _resultId :: (Maybe Data.Text.Text)+  , {-|+  The actual items.+  -}+  _items :: [Language.LSP.Protocol.Internal.Types.Diagnostic.Diagnostic]+  , {-|+  Diagnostics of related documents. This information is useful+  in programming languages where code in a file A can generate+  diagnostics in a file B which A depends on. An example of+  such a language is C/C++ where marco definitions in a file+  a.cpp and result in errors in a header file b.hpp.++  @since 3.17.0+  -}+  _relatedDocuments :: (Maybe (Data.Map.Map Language.LSP.Protocol.Types.Uri.Uri (Language.LSP.Protocol.Internal.Types.FullDocumentDiagnosticReport.FullDocumentDiagnosticReport Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.UnchangedDocumentDiagnosticReport.UnchangedDocumentDiagnosticReport)))+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON RelatedFullDocumentDiagnosticReport where+  toJSON (RelatedFullDocumentDiagnosticReport arg0 arg1 arg2 arg3) = Aeson.object $ concat $  [["kind" Aeson..= arg0]+    ,"resultId" Language.LSP.Protocol.Types.Common..=? arg1+    ,["items" Aeson..= arg2]+    ,"relatedDocuments" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON RelatedFullDocumentDiagnosticReport where+  parseJSON = Aeson.withObject "RelatedFullDocumentDiagnosticReport" $ \arg -> RelatedFullDocumentDiagnosticReport <$> arg Aeson..: "kind" <*> arg Aeson..:! "resultId" <*> arg Aeson..: "items" <*> arg Aeson..:! "relatedDocuments"
+ generated/Language/LSP/Protocol/Internal/Types/RelatedUnchangedDocumentDiagnosticReport.hs view
@@ -0,0 +1,60 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.RelatedUnchangedDocumentDiagnosticReport where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Map+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.FullDocumentDiagnosticReport+import qualified Language.LSP.Protocol.Internal.Types.UnchangedDocumentDiagnosticReport+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Singletons+import qualified Language.LSP.Protocol.Types.Uri++{-|+An unchanged diagnostic report with a set of related documents.++@since 3.17.0+-}+data RelatedUnchangedDocumentDiagnosticReport = RelatedUnchangedDocumentDiagnosticReport +  { {-|+  A document diagnostic report indicating+  no changes to the last result. A server can+  only return `unchanged` if result ids are+  provided.+  -}+  _kind :: (Language.LSP.Protocol.Types.Singletons.AString "unchanged")+  , {-|+  A result id which will be sent on the next+  diagnostic request for the same document.+  -}+  _resultId :: Data.Text.Text+  , {-|+  Diagnostics of related documents. This information is useful+  in programming languages where code in a file A can generate+  diagnostics in a file B which A depends on. An example of+  such a language is C/C++ where marco definitions in a file+  a.cpp and result in errors in a header file b.hpp.++  @since 3.17.0+  -}+  _relatedDocuments :: (Maybe (Data.Map.Map Language.LSP.Protocol.Types.Uri.Uri (Language.LSP.Protocol.Internal.Types.FullDocumentDiagnosticReport.FullDocumentDiagnosticReport Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.UnchangedDocumentDiagnosticReport.UnchangedDocumentDiagnosticReport)))+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON RelatedUnchangedDocumentDiagnosticReport where+  toJSON (RelatedUnchangedDocumentDiagnosticReport arg0 arg1 arg2) = Aeson.object $ concat $  [["kind" Aeson..= arg0]+    ,["resultId" Aeson..= arg1]+    ,"relatedDocuments" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON RelatedUnchangedDocumentDiagnosticReport where+  parseJSON = Aeson.withObject "RelatedUnchangedDocumentDiagnosticReport" $ \arg -> RelatedUnchangedDocumentDiagnosticReport <$> arg Aeson..: "kind" <*> arg Aeson..: "resultId" <*> arg Aeson..:! "relatedDocuments"
+ generated/Language/LSP/Protocol/Internal/Types/RelativePattern.hs view
@@ -0,0 +1,45 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.RelativePattern where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Pattern+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceFolder+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+A relative pattern is a helper to construct glob patterns that are matched+relatively to a base URI. The common value for a `baseUri` is a workspace+folder root, but it can be another absolute URI as well.++@since 3.17.0+-}+data RelativePattern = RelativePattern +  { {-|+  A workspace folder or a base URI to which this pattern will be matched+  against relatively.+  -}+  _baseUri :: (Language.LSP.Protocol.Internal.Types.WorkspaceFolder.WorkspaceFolder Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Uri.Uri)+  , {-|+  The actual glob pattern;+  -}+  _pattern :: Language.LSP.Protocol.Internal.Types.Pattern.Pattern+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON RelativePattern where+  toJSON (RelativePattern arg0 arg1) = Aeson.object $ concat $  [["baseUri" Aeson..= arg0]+    ,["pattern" Aeson..= arg1]]++instance Aeson.FromJSON RelativePattern where+  parseJSON = Aeson.withObject "RelativePattern" $ \arg -> RelativePattern <$> arg Aeson..: "baseUri" <*> arg Aeson..: "pattern"
+ generated/Language/LSP/Protocol/Internal/Types/RenameClientCapabilities.hs view
@@ -0,0 +1,62 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.RenameClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.PrepareSupportDefaultBehavior+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data RenameClientCapabilities = RenameClientCapabilities +  { {-|+  Whether rename supports dynamic registration.+  -}+  _dynamicRegistration :: (Maybe Bool)+  , {-|+  Client supports testing for validity of rename operations+  before execution.++  @since 3.12.0+  -}+  _prepareSupport :: (Maybe Bool)+  , {-|+  Client supports the default behavior result.++  The value indicates the default behavior used by the+  client.++  @since 3.16.0+  -}+  _prepareSupportDefaultBehavior :: (Maybe Language.LSP.Protocol.Internal.Types.PrepareSupportDefaultBehavior.PrepareSupportDefaultBehavior)+  , {-|+  Whether the client honors the change annotations in+  text edits and resource operations returned via the+  rename request's workspace edit by for example presenting+  the workspace edit in the user interface and asking+  for confirmation.++  @since 3.16.0+  -}+  _honorsChangeAnnotations :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON RenameClientCapabilities where+  toJSON (RenameClientCapabilities arg0 arg1 arg2 arg3) = Aeson.object $ concat $  ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+    ,"prepareSupport" Language.LSP.Protocol.Types.Common..=? arg1+    ,"prepareSupportDefaultBehavior" Language.LSP.Protocol.Types.Common..=? arg2+    ,"honorsChangeAnnotations" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON RenameClientCapabilities where+  parseJSON = Aeson.withObject "RenameClientCapabilities" $ \arg -> RenameClientCapabilities <$> arg Aeson..:! "dynamicRegistration" <*> arg Aeson..:! "prepareSupport" <*> arg Aeson..:! "prepareSupportDefaultBehavior" <*> arg Aeson..:! "honorsChangeAnnotations"
+ generated/Language/LSP/Protocol/Internal/Types/RenameFile.hs view
@@ -0,0 +1,58 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.RenameFile where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ChangeAnnotationIdentifier+import qualified Language.LSP.Protocol.Internal.Types.RenameFileOptions+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Singletons+import qualified Language.LSP.Protocol.Types.Uri++{-|+Rename file operation+-}+data RenameFile = RenameFile +  { {-|+  An optional annotation identifier describing the operation.++  @since 3.16.0+  -}+  _annotationId :: (Maybe Language.LSP.Protocol.Internal.Types.ChangeAnnotationIdentifier.ChangeAnnotationIdentifier)+  , {-|+  A rename+  -}+  _kind :: (Language.LSP.Protocol.Types.Singletons.AString "rename")+  , {-|+  The old (existing) location.+  -}+  _oldUri :: Language.LSP.Protocol.Types.Uri.Uri+  , {-|+  The new location.+  -}+  _newUri :: Language.LSP.Protocol.Types.Uri.Uri+  , {-|+  Rename options.+  -}+  _options :: (Maybe Language.LSP.Protocol.Internal.Types.RenameFileOptions.RenameFileOptions)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON RenameFile where+  toJSON (RenameFile arg0 arg1 arg2 arg3 arg4) = Aeson.object $ concat $  ["annotationId" Language.LSP.Protocol.Types.Common..=? arg0+    ,["kind" Aeson..= arg1]+    ,["oldUri" Aeson..= arg2]+    ,["newUri" Aeson..= arg3]+    ,"options" Language.LSP.Protocol.Types.Common..=? arg4]++instance Aeson.FromJSON RenameFile where+  parseJSON = Aeson.withObject "RenameFile" $ \arg -> RenameFile <$> arg Aeson..:! "annotationId" <*> arg Aeson..: "kind" <*> arg Aeson..: "oldUri" <*> arg Aeson..: "newUri" <*> arg Aeson..:! "options"
+ generated/Language/LSP/Protocol/Internal/Types/RenameFileOptions.hs view
@@ -0,0 +1,37 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.RenameFileOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Rename file options+-}+data RenameFileOptions = RenameFileOptions +  { {-|+  Overwrite target if existing. Overwrite wins over `ignoreIfExists`+  -}+  _overwrite :: (Maybe Bool)+  , {-|+  Ignores if target exists.+  -}+  _ignoreIfExists :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON RenameFileOptions where+  toJSON (RenameFileOptions arg0 arg1) = Aeson.object $ concat $  ["overwrite" Language.LSP.Protocol.Types.Common..=? arg0+    ,"ignoreIfExists" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON RenameFileOptions where+  parseJSON = Aeson.withObject "RenameFileOptions" $ \arg -> RenameFileOptions <$> arg Aeson..:! "overwrite" <*> arg Aeson..:! "ignoreIfExists"
+ generated/Language/LSP/Protocol/Internal/Types/RenameFilesParams.hs view
@@ -0,0 +1,37 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.RenameFilesParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.FileRename+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters sent in notifications/requests for user-initiated renames of+files.++@since 3.16.0+-}+data RenameFilesParams = RenameFilesParams +  { {-|+  An array of all files/folders renamed in this operation. When a folder is renamed, only+  the folder will be included, and not its children.+  -}+  _files :: [Language.LSP.Protocol.Internal.Types.FileRename.FileRename]+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON RenameFilesParams where+  toJSON (RenameFilesParams arg0) = Aeson.object $ concat $  [["files" Aeson..= arg0]]++instance Aeson.FromJSON RenameFilesParams where+  parseJSON = Aeson.withObject "RenameFilesParams" $ \arg -> RenameFilesParams <$> arg Aeson..: "files"
+ generated/Language/LSP/Protocol/Internal/Types/RenameOptions.hs view
@@ -0,0 +1,39 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.RenameOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Provider options for a `RenameRequest`.+-}+data RenameOptions = RenameOptions +  { {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  , {-|+  Renames should be checked and tested before being executed.++  @since version 3.12.0+  -}+  _prepareProvider :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON RenameOptions where+  toJSON (RenameOptions arg0 arg1) = Aeson.object $ concat $  ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0+    ,"prepareProvider" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON RenameOptions where+  parseJSON = Aeson.withObject "RenameOptions" $ \arg -> RenameOptions <$> arg Aeson..:! "workDoneProgress" <*> arg Aeson..:! "prepareProvider"
+ generated/Language/LSP/Protocol/Internal/Types/RenameParams.hs view
@@ -0,0 +1,53 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.RenameParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters of a `RenameRequest`.+-}+data RenameParams = RenameParams +  { {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  The document to rename.+  -}+  _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+  , {-|+  The position at which this request was sent.+  -}+  _position :: Language.LSP.Protocol.Internal.Types.Position.Position+  , {-|+  The new name of the symbol. If the given name is not valid the+  request must return a `ResponseError` with an+  appropriate message set.+  -}+  _newName :: Data.Text.Text+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON RenameParams where+  toJSON (RenameParams arg0 arg1 arg2 arg3) = Aeson.object $ concat $  ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+    ,["textDocument" Aeson..= arg1]+    ,["position" Aeson..= arg2]+    ,["newName" Aeson..= arg3]]++instance Aeson.FromJSON RenameParams where+  parseJSON = Aeson.withObject "RenameParams" $ \arg -> RenameParams <$> arg Aeson..:! "workDoneToken" <*> arg Aeson..: "textDocument" <*> arg Aeson..: "position" <*> arg Aeson..: "newName"
+ generated/Language/LSP/Protocol/Internal/Types/RenameRegistrationOptions.hs view
@@ -0,0 +1,46 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.RenameRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+Registration options for a `RenameRequest`.+-}+data RenameRegistrationOptions = RenameRegistrationOptions +  { {-|+  A document selector to identify the scope of the registration. If set to null+  the document selector provided on the client side will be used.+  -}+  _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  , {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  , {-|+  Renames should be checked and tested before being executed.++  @since version 3.12.0+  -}+  _prepareProvider :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON RenameRegistrationOptions where+  toJSON (RenameRegistrationOptions arg0 arg1 arg2) = Aeson.object $ concat $  [["documentSelector" Aeson..= arg0]+    ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1+    ,"prepareProvider" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON RenameRegistrationOptions where+  parseJSON = Aeson.withObject "RenameRegistrationOptions" $ \arg -> RenameRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Aeson..:! "workDoneProgress" <*> arg Aeson..:! "prepareProvider"
+ generated/Language/LSP/Protocol/Internal/Types/ResourceOperation.hs view
@@ -0,0 +1,41 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ResourceOperation where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.ChangeAnnotationIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+A generic resource operation.+-}+data ResourceOperation = ResourceOperation +  { {-|+  The resource operation kind.+  -}+  _kind :: Data.Text.Text+  , {-|+  An optional annotation identifier describing the operation.++  @since 3.16.0+  -}+  _annotationId :: (Maybe Language.LSP.Protocol.Internal.Types.ChangeAnnotationIdentifier.ChangeAnnotationIdentifier)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON ResourceOperation where+  toJSON (ResourceOperation arg0 arg1) = Aeson.object $ concat $  [["kind" Aeson..= arg0]+    ,"annotationId" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON ResourceOperation where+  parseJSON = Aeson.withObject "ResourceOperation" $ \arg -> ResourceOperation <$> arg Aeson..: "kind" <*> arg Aeson..:! "annotationId"
+ generated/Language/LSP/Protocol/Internal/Types/ResourceOperationKind.hs view
@@ -0,0 +1,53 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ResourceOperationKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.LspEnum++{-|++-}+data ResourceOperationKind = +    {-|+  Supports creating new files and folders.+  -}+  ResourceOperationKind_Create+  | {-|+  Supports renaming existing files and folders.+  -}+  ResourceOperationKind_Rename+  | {-|+  Supports deleting existing files and folders.+  -}+  ResourceOperationKind_Delete+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)+  deriving ( Aeson.ToJSON+  , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum ResourceOperationKind Data.Text.Text)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum ResourceOperationKind where+  knownValues = Data.Set.fromList [ResourceOperationKind_Create+    ,ResourceOperationKind_Rename+    ,ResourceOperationKind_Delete]+  type EnumBaseType ResourceOperationKind = Data.Text.Text+  toEnumBaseType ResourceOperationKind_Create = "create"+  toEnumBaseType ResourceOperationKind_Rename = "rename"+  toEnumBaseType ResourceOperationKind_Delete = "delete"+  fromEnumBaseType "create" = pure ResourceOperationKind_Create+  fromEnumBaseType "rename" = pure ResourceOperationKind_Rename+  fromEnumBaseType "delete" = pure ResourceOperationKind_Delete+  fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/SaveOptions.hs view
@@ -0,0 +1,32 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SaveOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Save options.+-}+data SaveOptions = SaveOptions +  { {-|+  The client is supposed to include the content on save.+  -}+  _includeText :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON SaveOptions where+  toJSON (SaveOptions arg0) = Aeson.object $ concat $  ["includeText" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON SaveOptions where+  parseJSON = Aeson.withObject "SaveOptions" $ \arg -> SaveOptions <$> arg Aeson..:! "includeText"
+ generated/Language/LSP/Protocol/Internal/Types/SelectionRange.hs view
@@ -0,0 +1,39 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SelectionRange where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|+A selection range represents a part of a selection hierarchy. A selection range+may have a parent selection range that contains it.+-}+data SelectionRange = SelectionRange +  { {-|+  The `Range` of this selection range.+  -}+  _range :: Language.LSP.Protocol.Internal.Types.Range.Range+  , {-|+  The parent selection range containing this range. Therefore `parent.range` must contain `this.range`.+  -}+  _parent :: (Maybe Language.LSP.Protocol.Internal.Types.SelectionRange.SelectionRange)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON SelectionRange where+  toJSON (SelectionRange arg0 arg1) = Aeson.object $ concat $  [["range" Aeson..= arg0]+    ,"parent" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON SelectionRange where+  parseJSON = Aeson.withObject "SelectionRange" $ \arg -> SelectionRange <$> arg Aeson..: "range" <*> arg Aeson..:! "parent"
+ generated/Language/LSP/Protocol/Internal/Types/SelectionRangeClientCapabilities.hs view
@@ -0,0 +1,34 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SelectionRangeClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data SelectionRangeClientCapabilities = SelectionRangeClientCapabilities +  { {-|+  Whether implementation supports dynamic registration for selection range providers. If this is set to `true`+  the client supports the new `SelectionRangeRegistrationOptions` return value for the corresponding server+  capability as well.+  -}+  _dynamicRegistration :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON SelectionRangeClientCapabilities where+  toJSON (SelectionRangeClientCapabilities arg0) = Aeson.object $ concat $  ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON SelectionRangeClientCapabilities where+  parseJSON = Aeson.withObject "SelectionRangeClientCapabilities" $ \arg -> SelectionRangeClientCapabilities <$> arg Aeson..:! "dynamicRegistration"
+ generated/Language/LSP/Protocol/Internal/Types/SelectionRangeOptions.hs view
@@ -0,0 +1,32 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SelectionRangeOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data SelectionRangeOptions = SelectionRangeOptions +  { {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON SelectionRangeOptions where+  toJSON (SelectionRangeOptions arg0) = Aeson.object $ concat $  ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON SelectionRangeOptions where+  parseJSON = Aeson.withObject "SelectionRangeOptions" $ \arg -> SelectionRangeOptions <$> arg Aeson..:! "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/SelectionRangeParams.hs view
@@ -0,0 +1,51 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SelectionRangeParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+A parameter literal used in selection range requests.+-}+data SelectionRangeParams = SelectionRangeParams +  { {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  An optional token that a server can use to report partial results (e.g. streaming) to+  the client.+  -}+  _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  The text document.+  -}+  _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+  , {-|+  The positions inside the text document.+  -}+  _positions :: [Language.LSP.Protocol.Internal.Types.Position.Position]+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON SelectionRangeParams where+  toJSON (SelectionRangeParams arg0 arg1 arg2 arg3) = Aeson.object $ concat $  ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+    ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg1+    ,["textDocument" Aeson..= arg2]+    ,["positions" Aeson..= arg3]]++instance Aeson.FromJSON SelectionRangeParams where+  parseJSON = Aeson.withObject "SelectionRangeParams" $ \arg -> SelectionRangeParams <$> arg Aeson..:! "workDoneToken" <*> arg Aeson..:! "partialResultToken" <*> arg Aeson..: "textDocument" <*> arg Aeson..: "positions"
+ generated/Language/LSP/Protocol/Internal/Types/SelectionRangeRegistrationOptions.hs view
@@ -0,0 +1,46 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SelectionRangeRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data SelectionRangeRegistrationOptions = SelectionRangeRegistrationOptions +  { {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  , {-|+  A document selector to identify the scope of the registration. If set to null+  the document selector provided on the client side will be used.+  -}+  _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  , {-|+  The id used to register the request. The id can be used to deregister+  the request again. See also Registration#id.+  -}+  _id :: (Maybe Data.Text.Text)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON SelectionRangeRegistrationOptions where+  toJSON (SelectionRangeRegistrationOptions arg0 arg1 arg2) = Aeson.object $ concat $  ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0+    ,["documentSelector" Aeson..= arg1]+    ,"id" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON SelectionRangeRegistrationOptions where+  parseJSON = Aeson.withObject "SelectionRangeRegistrationOptions" $ \arg -> SelectionRangeRegistrationOptions <$> arg Aeson..:! "workDoneProgress" <*> arg Aeson..: "documentSelector" <*> arg Aeson..:! "id"
+ generated/Language/LSP/Protocol/Internal/Types/SemanticTokenModifiers.hs view
@@ -0,0 +1,111 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SemanticTokenModifiers where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+A set of predefined token modifiers. This set is not fixed+an clients can specify additional token types via the+corresponding client capabilities.++@since 3.16.0+-}+data SemanticTokenModifiers = +    {-|++  -}+  SemanticTokenModifiers_Declaration+  | {-|++  -}+  SemanticTokenModifiers_Definition+  | {-|++  -}+  SemanticTokenModifiers_Readonly+  | {-|++  -}+  SemanticTokenModifiers_Static+  | {-|++  -}+  SemanticTokenModifiers_Deprecated+  | {-|++  -}+  SemanticTokenModifiers_Abstract+  | {-|++  -}+  SemanticTokenModifiers_Async+  | {-|++  -}+  SemanticTokenModifiers_Modification+  | {-|++  -}+  SemanticTokenModifiers_Documentation+  | {-|++  -}+  SemanticTokenModifiers_DefaultLibrary+  | SemanticTokenModifiers_Custom Data.Text.Text+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)+  deriving ( Aeson.ToJSON+  , Aeson.FromJSON+  , Data.String.IsString ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum SemanticTokenModifiers Data.Text.Text)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum SemanticTokenModifiers where+  knownValues = Data.Set.fromList [SemanticTokenModifiers_Declaration+    ,SemanticTokenModifiers_Definition+    ,SemanticTokenModifiers_Readonly+    ,SemanticTokenModifiers_Static+    ,SemanticTokenModifiers_Deprecated+    ,SemanticTokenModifiers_Abstract+    ,SemanticTokenModifiers_Async+    ,SemanticTokenModifiers_Modification+    ,SemanticTokenModifiers_Documentation+    ,SemanticTokenModifiers_DefaultLibrary]+  type EnumBaseType SemanticTokenModifiers = Data.Text.Text+  toEnumBaseType SemanticTokenModifiers_Declaration = "declaration"+  toEnumBaseType SemanticTokenModifiers_Definition = "definition"+  toEnumBaseType SemanticTokenModifiers_Readonly = "readonly"+  toEnumBaseType SemanticTokenModifiers_Static = "static"+  toEnumBaseType SemanticTokenModifiers_Deprecated = "deprecated"+  toEnumBaseType SemanticTokenModifiers_Abstract = "abstract"+  toEnumBaseType SemanticTokenModifiers_Async = "async"+  toEnumBaseType SemanticTokenModifiers_Modification = "modification"+  toEnumBaseType SemanticTokenModifiers_Documentation = "documentation"+  toEnumBaseType SemanticTokenModifiers_DefaultLibrary = "defaultLibrary"+  toEnumBaseType (SemanticTokenModifiers_Custom arg) = arg++instance Language.LSP.Protocol.Types.LspEnum.LspOpenEnum SemanticTokenModifiers where+  fromOpenEnumBaseType "declaration" = SemanticTokenModifiers_Declaration+  fromOpenEnumBaseType "definition" = SemanticTokenModifiers_Definition+  fromOpenEnumBaseType "readonly" = SemanticTokenModifiers_Readonly+  fromOpenEnumBaseType "static" = SemanticTokenModifiers_Static+  fromOpenEnumBaseType "deprecated" = SemanticTokenModifiers_Deprecated+  fromOpenEnumBaseType "abstract" = SemanticTokenModifiers_Abstract+  fromOpenEnumBaseType "async" = SemanticTokenModifiers_Async+  fromOpenEnumBaseType "modification" = SemanticTokenModifiers_Modification+  fromOpenEnumBaseType "documentation" = SemanticTokenModifiers_Documentation+  fromOpenEnumBaseType "defaultLibrary" = SemanticTokenModifiers_DefaultLibrary+  fromOpenEnumBaseType arg = SemanticTokenModifiers_Custom arg++
+ generated/Language/LSP/Protocol/Internal/Types/SemanticTokenTypes.hs view
@@ -0,0 +1,203 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SemanticTokenTypes where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+A set of predefined token types. This set is not fixed+an clients can specify additional token types via the+corresponding client capabilities.++@since 3.16.0+-}+data SemanticTokenTypes = +    {-|++  -}+  SemanticTokenTypes_Namespace+  | {-|+  Represents a generic type. Acts as a fallback for types which can't be mapped to+  a specific type like class or enum.+  -}+  SemanticTokenTypes_Type+  | {-|++  -}+  SemanticTokenTypes_Class+  | {-|++  -}+  SemanticTokenTypes_Enum+  | {-|++  -}+  SemanticTokenTypes_Interface+  | {-|++  -}+  SemanticTokenTypes_Struct+  | {-|++  -}+  SemanticTokenTypes_TypeParameter+  | {-|++  -}+  SemanticTokenTypes_Parameter+  | {-|++  -}+  SemanticTokenTypes_Variable+  | {-|++  -}+  SemanticTokenTypes_Property+  | {-|++  -}+  SemanticTokenTypes_EnumMember+  | {-|++  -}+  SemanticTokenTypes_Event+  | {-|++  -}+  SemanticTokenTypes_Function+  | {-|++  -}+  SemanticTokenTypes_Method+  | {-|++  -}+  SemanticTokenTypes_Macro+  | {-|++  -}+  SemanticTokenTypes_Keyword+  | {-|++  -}+  SemanticTokenTypes_Modifier+  | {-|++  -}+  SemanticTokenTypes_Comment+  | {-|++  -}+  SemanticTokenTypes_String+  | {-|++  -}+  SemanticTokenTypes_Number+  | {-|++  -}+  SemanticTokenTypes_Regexp+  | {-|++  -}+  SemanticTokenTypes_Operator+  | {-|+  @since 3.17.0+  -}+  SemanticTokenTypes_Decorator+  | SemanticTokenTypes_Custom Data.Text.Text+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)+  deriving ( Aeson.ToJSON+  , Aeson.FromJSON+  , Data.String.IsString ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum SemanticTokenTypes Data.Text.Text)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum SemanticTokenTypes where+  knownValues = Data.Set.fromList [SemanticTokenTypes_Namespace+    ,SemanticTokenTypes_Type+    ,SemanticTokenTypes_Class+    ,SemanticTokenTypes_Enum+    ,SemanticTokenTypes_Interface+    ,SemanticTokenTypes_Struct+    ,SemanticTokenTypes_TypeParameter+    ,SemanticTokenTypes_Parameter+    ,SemanticTokenTypes_Variable+    ,SemanticTokenTypes_Property+    ,SemanticTokenTypes_EnumMember+    ,SemanticTokenTypes_Event+    ,SemanticTokenTypes_Function+    ,SemanticTokenTypes_Method+    ,SemanticTokenTypes_Macro+    ,SemanticTokenTypes_Keyword+    ,SemanticTokenTypes_Modifier+    ,SemanticTokenTypes_Comment+    ,SemanticTokenTypes_String+    ,SemanticTokenTypes_Number+    ,SemanticTokenTypes_Regexp+    ,SemanticTokenTypes_Operator+    ,SemanticTokenTypes_Decorator]+  type EnumBaseType SemanticTokenTypes = Data.Text.Text+  toEnumBaseType SemanticTokenTypes_Namespace = "namespace"+  toEnumBaseType SemanticTokenTypes_Type = "type"+  toEnumBaseType SemanticTokenTypes_Class = "class"+  toEnumBaseType SemanticTokenTypes_Enum = "enum"+  toEnumBaseType SemanticTokenTypes_Interface = "interface"+  toEnumBaseType SemanticTokenTypes_Struct = "struct"+  toEnumBaseType SemanticTokenTypes_TypeParameter = "typeParameter"+  toEnumBaseType SemanticTokenTypes_Parameter = "parameter"+  toEnumBaseType SemanticTokenTypes_Variable = "variable"+  toEnumBaseType SemanticTokenTypes_Property = "property"+  toEnumBaseType SemanticTokenTypes_EnumMember = "enumMember"+  toEnumBaseType SemanticTokenTypes_Event = "event"+  toEnumBaseType SemanticTokenTypes_Function = "function"+  toEnumBaseType SemanticTokenTypes_Method = "method"+  toEnumBaseType SemanticTokenTypes_Macro = "macro"+  toEnumBaseType SemanticTokenTypes_Keyword = "keyword"+  toEnumBaseType SemanticTokenTypes_Modifier = "modifier"+  toEnumBaseType SemanticTokenTypes_Comment = "comment"+  toEnumBaseType SemanticTokenTypes_String = "string"+  toEnumBaseType SemanticTokenTypes_Number = "number"+  toEnumBaseType SemanticTokenTypes_Regexp = "regexp"+  toEnumBaseType SemanticTokenTypes_Operator = "operator"+  toEnumBaseType SemanticTokenTypes_Decorator = "decorator"+  toEnumBaseType (SemanticTokenTypes_Custom arg) = arg++instance Language.LSP.Protocol.Types.LspEnum.LspOpenEnum SemanticTokenTypes where+  fromOpenEnumBaseType "namespace" = SemanticTokenTypes_Namespace+  fromOpenEnumBaseType "type" = SemanticTokenTypes_Type+  fromOpenEnumBaseType "class" = SemanticTokenTypes_Class+  fromOpenEnumBaseType "enum" = SemanticTokenTypes_Enum+  fromOpenEnumBaseType "interface" = SemanticTokenTypes_Interface+  fromOpenEnumBaseType "struct" = SemanticTokenTypes_Struct+  fromOpenEnumBaseType "typeParameter" = SemanticTokenTypes_TypeParameter+  fromOpenEnumBaseType "parameter" = SemanticTokenTypes_Parameter+  fromOpenEnumBaseType "variable" = SemanticTokenTypes_Variable+  fromOpenEnumBaseType "property" = SemanticTokenTypes_Property+  fromOpenEnumBaseType "enumMember" = SemanticTokenTypes_EnumMember+  fromOpenEnumBaseType "event" = SemanticTokenTypes_Event+  fromOpenEnumBaseType "function" = SemanticTokenTypes_Function+  fromOpenEnumBaseType "method" = SemanticTokenTypes_Method+  fromOpenEnumBaseType "macro" = SemanticTokenTypes_Macro+  fromOpenEnumBaseType "keyword" = SemanticTokenTypes_Keyword+  fromOpenEnumBaseType "modifier" = SemanticTokenTypes_Modifier+  fromOpenEnumBaseType "comment" = SemanticTokenTypes_Comment+  fromOpenEnumBaseType "string" = SemanticTokenTypes_String+  fromOpenEnumBaseType "number" = SemanticTokenTypes_Number+  fromOpenEnumBaseType "regexp" = SemanticTokenTypes_Regexp+  fromOpenEnumBaseType "operator" = SemanticTokenTypes_Operator+  fromOpenEnumBaseType "decorator" = SemanticTokenTypes_Decorator+  fromOpenEnumBaseType arg = SemanticTokenTypes_Custom arg++
+ generated/Language/LSP/Protocol/Internal/Types/SemanticTokens.hs view
@@ -0,0 +1,41 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SemanticTokens where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.16.0+-}+data SemanticTokens = SemanticTokens +  { {-|+  An optional result id. If provided and clients support delta updating+  the client will include the result id in the next semantic token request.+  A server can then instead of computing all semantic tokens again simply+  send a delta.+  -}+  _resultId :: (Maybe Data.Text.Text)+  , {-|+  The actual tokens.+  -}+  _data_ :: [Language.LSP.Protocol.Types.Common.UInt]+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON SemanticTokens where+  toJSON (SemanticTokens arg0 arg1) = Aeson.object $ concat $  ["resultId" Language.LSP.Protocol.Types.Common..=? arg0+    ,["data" Aeson..= arg1]]++instance Aeson.FromJSON SemanticTokens where+  parseJSON = Aeson.withObject "SemanticTokens" $ \arg -> SemanticTokens <$> arg Aeson..:! "resultId" <*> arg Aeson..: "data"
+ generated/Language/LSP/Protocol/Internal/Types/SemanticTokensClientCapabilities.hs view
@@ -0,0 +1,98 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SemanticTokensClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row as Row+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.TokenFormat+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.16.0+-}+data SemanticTokensClientCapabilities = SemanticTokensClientCapabilities +  { {-|+  Whether implementation supports dynamic registration. If this is set to `true`+  the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`+  return value for the corresponding server capability as well.+  -}+  _dynamicRegistration :: (Maybe Bool)+  , {-|+  Which requests the client supports and might send to the server+  depending on the server's capability. Please note that clients might not+  show semantic tokens or degrade some of the user experience if a range+  or full request is advertised by the client but not provided by the+  server. If for example the client capability `requests.full` and+  `request.range` are both set to true but the server only provides a+  range provider the client might not render a minimap correctly or might+  even decide to not show any semantic tokens at all.+  -}+  _requests :: (Row.Rec ("range" Row..== (Maybe (Bool Language.LSP.Protocol.Types.Common.|? (Row.Rec Row.Empty))) Row..+ ("full" Row..== (Maybe (Bool Language.LSP.Protocol.Types.Common.|? (Row.Rec ("delta" Row..== (Maybe Bool) Row..+ Row.Empty)))) Row..+ Row.Empty)))+  , {-|+  The token types that the client supports.+  -}+  _tokenTypes :: [Data.Text.Text]+  , {-|+  The token modifiers that the client supports.+  -}+  _tokenModifiers :: [Data.Text.Text]+  , {-|+  The token formats the clients supports.+  -}+  _formats :: [Language.LSP.Protocol.Internal.Types.TokenFormat.TokenFormat]+  , {-|+  Whether the client supports tokens that can overlap each other.+  -}+  _overlappingTokenSupport :: (Maybe Bool)+  , {-|+  Whether the client supports tokens that can span multiple lines.+  -}+  _multilineTokenSupport :: (Maybe Bool)+  , {-|+  Whether the client allows the server to actively cancel a+  semantic token request, e.g. supports returning+  LSPErrorCodes.ServerCancelled. If a server does the client+  needs to retrigger the request.++  @since 3.17.0+  -}+  _serverCancelSupport :: (Maybe Bool)+  , {-|+  Whether the client uses semantic tokens to augment existing+  syntax tokens. If set to `true` client side created syntax+  tokens and semantic tokens are both used for colorization. If+  set to `false` the client only uses the returned semantic tokens+  for colorization.++  If the value is `undefined` then the client behavior is not+  specified.++  @since 3.17.0+  -}+  _augmentsSyntaxTokens :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON SemanticTokensClientCapabilities where+  toJSON (SemanticTokensClientCapabilities arg0 arg1 arg2 arg3 arg4 arg5 arg6 arg7 arg8) = Aeson.object $ concat $  ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+    ,["requests" Aeson..= arg1]+    ,["tokenTypes" Aeson..= arg2]+    ,["tokenModifiers" Aeson..= arg3]+    ,["formats" Aeson..= arg4]+    ,"overlappingTokenSupport" Language.LSP.Protocol.Types.Common..=? arg5+    ,"multilineTokenSupport" Language.LSP.Protocol.Types.Common..=? arg6+    ,"serverCancelSupport" Language.LSP.Protocol.Types.Common..=? arg7+    ,"augmentsSyntaxTokens" Language.LSP.Protocol.Types.Common..=? arg8]++instance Aeson.FromJSON SemanticTokensClientCapabilities where+  parseJSON = Aeson.withObject "SemanticTokensClientCapabilities" $ \arg -> SemanticTokensClientCapabilities <$> arg Aeson..:! "dynamicRegistration" <*> arg Aeson..: "requests" <*> arg Aeson..: "tokenTypes" <*> arg Aeson..: "tokenModifiers" <*> arg Aeson..: "formats" <*> arg Aeson..:! "overlappingTokenSupport" <*> arg Aeson..:! "multilineTokenSupport" <*> arg Aeson..:! "serverCancelSupport" <*> arg Aeson..:! "augmentsSyntaxTokens"
+ generated/Language/LSP/Protocol/Internal/Types/SemanticTokensDelta.hs view
@@ -0,0 +1,39 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SemanticTokensDelta where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensEdit+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.16.0+-}+data SemanticTokensDelta = SemanticTokensDelta +  { {-|++  -}+  _resultId :: (Maybe Data.Text.Text)+  , {-|+  The semantic token edits to transform a previous result into a new result.+  -}+  _edits :: [Language.LSP.Protocol.Internal.Types.SemanticTokensEdit.SemanticTokensEdit]+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON SemanticTokensDelta where+  toJSON (SemanticTokensDelta arg0 arg1) = Aeson.object $ concat $  ["resultId" Language.LSP.Protocol.Types.Common..=? arg0+    ,["edits" Aeson..= arg1]]++instance Aeson.FromJSON SemanticTokensDelta where+  parseJSON = Aeson.withObject "SemanticTokensDelta" $ \arg -> SemanticTokensDelta <$> arg Aeson..:! "resultId" <*> arg Aeson..: "edits"
+ generated/Language/LSP/Protocol/Internal/Types/SemanticTokensDeltaParams.hs view
@@ -0,0 +1,52 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SemanticTokensDeltaParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.16.0+-}+data SemanticTokensDeltaParams = SemanticTokensDeltaParams +  { {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  An optional token that a server can use to report partial results (e.g. streaming) to+  the client.+  -}+  _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  The text document.+  -}+  _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+  , {-|+  The result id of a previous response. The result Id can either point to a full response+  or a delta response depending on what was received last.+  -}+  _previousResultId :: Data.Text.Text+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON SemanticTokensDeltaParams where+  toJSON (SemanticTokensDeltaParams arg0 arg1 arg2 arg3) = Aeson.object $ concat $  ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+    ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg1+    ,["textDocument" Aeson..= arg2]+    ,["previousResultId" Aeson..= arg3]]++instance Aeson.FromJSON SemanticTokensDeltaParams where+  parseJSON = Aeson.withObject "SemanticTokensDeltaParams" $ \arg -> SemanticTokensDeltaParams <$> arg Aeson..:! "workDoneToken" <*> arg Aeson..:! "partialResultToken" <*> arg Aeson..: "textDocument" <*> arg Aeson..: "previousResultId"
+ generated/Language/LSP/Protocol/Internal/Types/SemanticTokensDeltaPartialResult.hs view
@@ -0,0 +1,33 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SemanticTokensDeltaPartialResult where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensEdit+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.16.0+-}+data SemanticTokensDeltaPartialResult = SemanticTokensDeltaPartialResult +  { {-|++  -}+  _edits :: [Language.LSP.Protocol.Internal.Types.SemanticTokensEdit.SemanticTokensEdit]+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON SemanticTokensDeltaPartialResult where+  toJSON (SemanticTokensDeltaPartialResult arg0) = Aeson.object $ concat $  [["edits" Aeson..= arg0]]++instance Aeson.FromJSON SemanticTokensDeltaPartialResult where+  parseJSON = Aeson.withObject "SemanticTokensDeltaPartialResult" $ \arg -> SemanticTokensDeltaPartialResult <$> arg Aeson..: "edits"
+ generated/Language/LSP/Protocol/Internal/Types/SemanticTokensEdit.hs view
@@ -0,0 +1,42 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SemanticTokensEdit where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.16.0+-}+data SemanticTokensEdit = SemanticTokensEdit +  { {-|+  The start offset of the edit.+  -}+  _start :: Language.LSP.Protocol.Types.Common.UInt+  , {-|+  The count of elements to remove.+  -}+  _deleteCount :: Language.LSP.Protocol.Types.Common.UInt+  , {-|+  The elements to insert.+  -}+  _data_ :: (Maybe [Language.LSP.Protocol.Types.Common.UInt])+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON SemanticTokensEdit where+  toJSON (SemanticTokensEdit arg0 arg1 arg2) = Aeson.object $ concat $  [["start" Aeson..= arg0]+    ,["deleteCount" Aeson..= arg1]+    ,"data" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON SemanticTokensEdit where+  parseJSON = Aeson.withObject "SemanticTokensEdit" $ \arg -> SemanticTokensEdit <$> arg Aeson..: "start" <*> arg Aeson..: "deleteCount" <*> arg Aeson..:! "data"
+ generated/Language/LSP/Protocol/Internal/Types/SemanticTokensLegend.hs view
@@ -0,0 +1,38 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SemanticTokensLegend where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.16.0+-}+data SemanticTokensLegend = SemanticTokensLegend +  { {-|+  The token types a server uses.+  -}+  _tokenTypes :: [Data.Text.Text]+  , {-|+  The token modifiers a server uses.+  -}+  _tokenModifiers :: [Data.Text.Text]+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON SemanticTokensLegend where+  toJSON (SemanticTokensLegend arg0 arg1) = Aeson.object $ concat $  [["tokenTypes" Aeson..= arg0]+    ,["tokenModifiers" Aeson..= arg1]]++instance Aeson.FromJSON SemanticTokensLegend where+  parseJSON = Aeson.withObject "SemanticTokensLegend" $ \arg -> SemanticTokensLegend <$> arg Aeson..: "tokenTypes" <*> arg Aeson..: "tokenModifiers"
+ generated/Language/LSP/Protocol/Internal/Types/SemanticTokensOptions.hs view
@@ -0,0 +1,50 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SemanticTokensOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row as Row+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensLegend+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.16.0+-}+data SemanticTokensOptions = SemanticTokensOptions +  { {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  , {-|+  The legend used by the server+  -}+  _legend :: Language.LSP.Protocol.Internal.Types.SemanticTokensLegend.SemanticTokensLegend+  , {-|+  Server supports providing semantic tokens for a specific range+  of a document.+  -}+  _range :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? (Row.Rec Row.Empty)))+  , {-|+  Server supports providing semantic tokens for a full document.+  -}+  _full :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? (Row.Rec ("delta" Row..== (Maybe Bool) Row..+ Row.Empty))))+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON SemanticTokensOptions where+  toJSON (SemanticTokensOptions arg0 arg1 arg2 arg3) = Aeson.object $ concat $  ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0+    ,["legend" Aeson..= arg1]+    ,"range" Language.LSP.Protocol.Types.Common..=? arg2+    ,"full" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON SemanticTokensOptions where+  parseJSON = Aeson.withObject "SemanticTokensOptions" $ \arg -> SemanticTokensOptions <$> arg Aeson..:! "workDoneProgress" <*> arg Aeson..: "legend" <*> arg Aeson..:! "range" <*> arg Aeson..:! "full"
+ generated/Language/LSP/Protocol/Internal/Types/SemanticTokensParams.hs view
@@ -0,0 +1,45 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SemanticTokensParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.16.0+-}+data SemanticTokensParams = SemanticTokensParams +  { {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  An optional token that a server can use to report partial results (e.g. streaming) to+  the client.+  -}+  _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  The text document.+  -}+  _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON SemanticTokensParams where+  toJSON (SemanticTokensParams arg0 arg1 arg2) = Aeson.object $ concat $  ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+    ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg1+    ,["textDocument" Aeson..= arg2]]++instance Aeson.FromJSON SemanticTokensParams where+  parseJSON = Aeson.withObject "SemanticTokensParams" $ \arg -> SemanticTokensParams <$> arg Aeson..:! "workDoneToken" <*> arg Aeson..:! "partialResultToken" <*> arg Aeson..: "textDocument"
+ generated/Language/LSP/Protocol/Internal/Types/SemanticTokensPartialResult.hs view
@@ -0,0 +1,32 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SemanticTokensPartialResult where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.16.0+-}+data SemanticTokensPartialResult = SemanticTokensPartialResult +  { {-|++  -}+  _data_ :: [Language.LSP.Protocol.Types.Common.UInt]+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON SemanticTokensPartialResult where+  toJSON (SemanticTokensPartialResult arg0) = Aeson.object $ concat $  [["data" Aeson..= arg0]]++instance Aeson.FromJSON SemanticTokensPartialResult where+  parseJSON = Aeson.withObject "SemanticTokensPartialResult" $ \arg -> SemanticTokensPartialResult <$> arg Aeson..: "data"
+ generated/Language/LSP/Protocol/Internal/Types/SemanticTokensRangeParams.hs view
@@ -0,0 +1,51 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SemanticTokensRangeParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.16.0+-}+data SemanticTokensRangeParams = SemanticTokensRangeParams +  { {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  An optional token that a server can use to report partial results (e.g. streaming) to+  the client.+  -}+  _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  The text document.+  -}+  _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+  , {-|+  The range the semantic tokens are requested for.+  -}+  _range :: Language.LSP.Protocol.Internal.Types.Range.Range+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON SemanticTokensRangeParams where+  toJSON (SemanticTokensRangeParams arg0 arg1 arg2 arg3) = Aeson.object $ concat $  ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+    ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg1+    ,["textDocument" Aeson..= arg2]+    ,["range" Aeson..= arg3]]++instance Aeson.FromJSON SemanticTokensRangeParams where+  parseJSON = Aeson.withObject "SemanticTokensRangeParams" $ \arg -> SemanticTokensRangeParams <$> arg Aeson..:! "workDoneToken" <*> arg Aeson..:! "partialResultToken" <*> arg Aeson..: "textDocument" <*> arg Aeson..: "range"
+ generated/Language/LSP/Protocol/Internal/Types/SemanticTokensRegistrationOptions.hs view
@@ -0,0 +1,64 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SemanticTokensRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row as Row+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensLegend+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.16.0+-}+data SemanticTokensRegistrationOptions = SemanticTokensRegistrationOptions +  { {-|+  A document selector to identify the scope of the registration. If set to null+  the document selector provided on the client side will be used.+  -}+  _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  , {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  , {-|+  The legend used by the server+  -}+  _legend :: Language.LSP.Protocol.Internal.Types.SemanticTokensLegend.SemanticTokensLegend+  , {-|+  Server supports providing semantic tokens for a specific range+  of a document.+  -}+  _range :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? (Row.Rec Row.Empty)))+  , {-|+  Server supports providing semantic tokens for a full document.+  -}+  _full :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? (Row.Rec ("delta" Row..== (Maybe Bool) Row..+ Row.Empty))))+  , {-|+  The id used to register the request. The id can be used to deregister+  the request again. See also Registration#id.+  -}+  _id :: (Maybe Data.Text.Text)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON SemanticTokensRegistrationOptions where+  toJSON (SemanticTokensRegistrationOptions arg0 arg1 arg2 arg3 arg4 arg5) = Aeson.object $ concat $  [["documentSelector" Aeson..= arg0]+    ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1+    ,["legend" Aeson..= arg2]+    ,"range" Language.LSP.Protocol.Types.Common..=? arg3+    ,"full" Language.LSP.Protocol.Types.Common..=? arg4+    ,"id" Language.LSP.Protocol.Types.Common..=? arg5]++instance Aeson.FromJSON SemanticTokensRegistrationOptions where+  parseJSON = Aeson.withObject "SemanticTokensRegistrationOptions" $ \arg -> SemanticTokensRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Aeson..:! "workDoneProgress" <*> arg Aeson..: "legend" <*> arg Aeson..:! "range" <*> arg Aeson..:! "full" <*> arg Aeson..:! "id"
+ generated/Language/LSP/Protocol/Internal/Types/SemanticTokensWorkspaceClientCapabilities.hs view
@@ -0,0 +1,38 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SemanticTokensWorkspaceClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.16.0+-}+data SemanticTokensWorkspaceClientCapabilities = SemanticTokensWorkspaceClientCapabilities +  { {-|+  Whether the client implementation supports a refresh request sent from+  the server to the client.++  Note that this event is global and will force the client to refresh all+  semantic tokens currently shown. It should be used with absolute care+  and is useful for situation where a server for example detects a project+  wide change that requires such a calculation.+  -}+  _refreshSupport :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON SemanticTokensWorkspaceClientCapabilities where+  toJSON (SemanticTokensWorkspaceClientCapabilities arg0) = Aeson.object $ concat $  ["refreshSupport" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON SemanticTokensWorkspaceClientCapabilities where+  parseJSON = Aeson.withObject "SemanticTokensWorkspaceClientCapabilities" $ \arg -> SemanticTokensWorkspaceClientCapabilities <$> arg Aeson..:! "refreshSupport"
+ generated/Language/LSP/Protocol/Internal/Types/ServerCapabilities.hs view
@@ -0,0 +1,288 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ServerCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row as Row+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.CallHierarchyOptions+import qualified Language.LSP.Protocol.Internal.Types.CallHierarchyRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.CodeActionOptions+import qualified Language.LSP.Protocol.Internal.Types.CodeLensOptions+import qualified Language.LSP.Protocol.Internal.Types.CompletionOptions+import qualified Language.LSP.Protocol.Internal.Types.DeclarationOptions+import qualified Language.LSP.Protocol.Internal.Types.DeclarationRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.DefinitionOptions+import qualified Language.LSP.Protocol.Internal.Types.DiagnosticOptions+import qualified Language.LSP.Protocol.Internal.Types.DiagnosticRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentColorOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentColorRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentFormattingOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentHighlightOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentLinkOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingOptions+import qualified Language.LSP.Protocol.Internal.Types.DocumentSymbolOptions+import qualified Language.LSP.Protocol.Internal.Types.ExecuteCommandOptions+import qualified Language.LSP.Protocol.Internal.Types.FileOperationOptions+import qualified Language.LSP.Protocol.Internal.Types.FoldingRangeOptions+import qualified Language.LSP.Protocol.Internal.Types.FoldingRangeRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.HoverOptions+import qualified Language.LSP.Protocol.Internal.Types.ImplementationOptions+import qualified Language.LSP.Protocol.Internal.Types.ImplementationRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.InlayHintOptions+import qualified Language.LSP.Protocol.Internal.Types.InlayHintRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.InlineValueOptions+import qualified Language.LSP.Protocol.Internal.Types.InlineValueRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.LinkedEditingRangeOptions+import qualified Language.LSP.Protocol.Internal.Types.LinkedEditingRangeRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.MonikerOptions+import qualified Language.LSP.Protocol.Internal.Types.MonikerRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncOptions+import qualified Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.PositionEncodingKind+import qualified Language.LSP.Protocol.Internal.Types.ReferenceOptions+import qualified Language.LSP.Protocol.Internal.Types.RenameOptions+import qualified Language.LSP.Protocol.Internal.Types.SelectionRangeOptions+import qualified Language.LSP.Protocol.Internal.Types.SelectionRangeRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensOptions+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.SignatureHelpOptions+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentSyncKind+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentSyncOptions+import qualified Language.LSP.Protocol.Internal.Types.TypeDefinitionOptions+import qualified Language.LSP.Protocol.Internal.Types.TypeDefinitionRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.TypeHierarchyOptions+import qualified Language.LSP.Protocol.Internal.Types.TypeHierarchyRegistrationOptions+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceFoldersServerCapabilities+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceSymbolOptions+import qualified Language.LSP.Protocol.Types.Common++{-|+Defines the capabilities provided by a language+server.+-}+data ServerCapabilities = ServerCapabilities +  { {-|+  The position encoding the server picked from the encodings offered+  by the client via the client capability `general.positionEncodings`.++  If the client didn't provide any position encodings the only valid+  value that a server can return is 'utf-16'.++  If omitted it defaults to 'utf-16'.++  @since 3.17.0+  -}+  _positionEncoding :: (Maybe Language.LSP.Protocol.Internal.Types.PositionEncodingKind.PositionEncodingKind)+  , {-|+  Defines how text documents are synced. Is either a detailed structure+  defining each notification or for backwards compatibility the+  TextDocumentSyncKind number.+  -}+  _textDocumentSync :: (Maybe (Language.LSP.Protocol.Internal.Types.TextDocumentSyncOptions.TextDocumentSyncOptions Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.TextDocumentSyncKind.TextDocumentSyncKind))+  , {-|+  Defines how notebook documents are synced.++  @since 3.17.0+  -}+  _notebookDocumentSync :: (Maybe (Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncOptions.NotebookDocumentSyncOptions Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncRegistrationOptions.NotebookDocumentSyncRegistrationOptions))+  , {-|+  The server provides completion support.+  -}+  _completionProvider :: (Maybe Language.LSP.Protocol.Internal.Types.CompletionOptions.CompletionOptions)+  , {-|+  The server provides hover support.+  -}+  _hoverProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.HoverOptions.HoverOptions))+  , {-|+  The server provides signature help support.+  -}+  _signatureHelpProvider :: (Maybe Language.LSP.Protocol.Internal.Types.SignatureHelpOptions.SignatureHelpOptions)+  , {-|+  The server provides Goto Declaration support.+  -}+  _declarationProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? (Language.LSP.Protocol.Internal.Types.DeclarationOptions.DeclarationOptions Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.DeclarationRegistrationOptions.DeclarationRegistrationOptions)))+  , {-|+  The server provides goto definition support.+  -}+  _definitionProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.DefinitionOptions.DefinitionOptions))+  , {-|+  The server provides Goto Type Definition support.+  -}+  _typeDefinitionProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? (Language.LSP.Protocol.Internal.Types.TypeDefinitionOptions.TypeDefinitionOptions Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.TypeDefinitionRegistrationOptions.TypeDefinitionRegistrationOptions)))+  , {-|+  The server provides Goto Implementation support.+  -}+  _implementationProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? (Language.LSP.Protocol.Internal.Types.ImplementationOptions.ImplementationOptions Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.ImplementationRegistrationOptions.ImplementationRegistrationOptions)))+  , {-|+  The server provides find references support.+  -}+  _referencesProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.ReferenceOptions.ReferenceOptions))+  , {-|+  The server provides document highlight support.+  -}+  _documentHighlightProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.DocumentHighlightOptions.DocumentHighlightOptions))+  , {-|+  The server provides document symbol support.+  -}+  _documentSymbolProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.DocumentSymbolOptions.DocumentSymbolOptions))+  , {-|+  The server provides code actions. CodeActionOptions may only be+  specified if the client states that it supports+  `codeActionLiteralSupport` in its initial `initialize` request.+  -}+  _codeActionProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.CodeActionOptions.CodeActionOptions))+  , {-|+  The server provides code lens.+  -}+  _codeLensProvider :: (Maybe Language.LSP.Protocol.Internal.Types.CodeLensOptions.CodeLensOptions)+  , {-|+  The server provides document link support.+  -}+  _documentLinkProvider :: (Maybe Language.LSP.Protocol.Internal.Types.DocumentLinkOptions.DocumentLinkOptions)+  , {-|+  The server provides color provider support.+  -}+  _colorProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? (Language.LSP.Protocol.Internal.Types.DocumentColorOptions.DocumentColorOptions Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.DocumentColorRegistrationOptions.DocumentColorRegistrationOptions)))+  , {-|+  The server provides workspace symbol support.+  -}+  _workspaceSymbolProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.WorkspaceSymbolOptions.WorkspaceSymbolOptions))+  , {-|+  The server provides document formatting.+  -}+  _documentFormattingProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.DocumentFormattingOptions.DocumentFormattingOptions))+  , {-|+  The server provides document range formatting.+  -}+  _documentRangeFormattingProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingOptions.DocumentRangeFormattingOptions))+  , {-|+  The server provides document formatting on typing.+  -}+  _documentOnTypeFormattingProvider :: (Maybe Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingOptions.DocumentOnTypeFormattingOptions)+  , {-|+  The server provides rename support. RenameOptions may only be+  specified if the client states that it supports+  `prepareSupport` in its initial `initialize` request.+  -}+  _renameProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.RenameOptions.RenameOptions))+  , {-|+  The server provides folding provider support.+  -}+  _foldingRangeProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? (Language.LSP.Protocol.Internal.Types.FoldingRangeOptions.FoldingRangeOptions Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.FoldingRangeRegistrationOptions.FoldingRangeRegistrationOptions)))+  , {-|+  The server provides selection range support.+  -}+  _selectionRangeProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? (Language.LSP.Protocol.Internal.Types.SelectionRangeOptions.SelectionRangeOptions Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.SelectionRangeRegistrationOptions.SelectionRangeRegistrationOptions)))+  , {-|+  The server provides execute command support.+  -}+  _executeCommandProvider :: (Maybe Language.LSP.Protocol.Internal.Types.ExecuteCommandOptions.ExecuteCommandOptions)+  , {-|+  The server provides call hierarchy support.++  @since 3.16.0+  -}+  _callHierarchyProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? (Language.LSP.Protocol.Internal.Types.CallHierarchyOptions.CallHierarchyOptions Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.CallHierarchyRegistrationOptions.CallHierarchyRegistrationOptions)))+  , {-|+  The server provides linked editing range support.++  @since 3.16.0+  -}+  _linkedEditingRangeProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? (Language.LSP.Protocol.Internal.Types.LinkedEditingRangeOptions.LinkedEditingRangeOptions Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.LinkedEditingRangeRegistrationOptions.LinkedEditingRangeRegistrationOptions)))+  , {-|+  The server provides semantic tokens support.++  @since 3.16.0+  -}+  _semanticTokensProvider :: (Maybe (Language.LSP.Protocol.Internal.Types.SemanticTokensOptions.SemanticTokensOptions Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.SemanticTokensRegistrationOptions.SemanticTokensRegistrationOptions))+  , {-|+  The server provides moniker support.++  @since 3.16.0+  -}+  _monikerProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? (Language.LSP.Protocol.Internal.Types.MonikerOptions.MonikerOptions Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.MonikerRegistrationOptions.MonikerRegistrationOptions)))+  , {-|+  The server provides type hierarchy support.++  @since 3.17.0+  -}+  _typeHierarchyProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? (Language.LSP.Protocol.Internal.Types.TypeHierarchyOptions.TypeHierarchyOptions Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.TypeHierarchyRegistrationOptions.TypeHierarchyRegistrationOptions)))+  , {-|+  The server provides inline values.++  @since 3.17.0+  -}+  _inlineValueProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? (Language.LSP.Protocol.Internal.Types.InlineValueOptions.InlineValueOptions Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.InlineValueRegistrationOptions.InlineValueRegistrationOptions)))+  , {-|+  The server provides inlay hints.++  @since 3.17.0+  -}+  _inlayHintProvider :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? (Language.LSP.Protocol.Internal.Types.InlayHintOptions.InlayHintOptions Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.InlayHintRegistrationOptions.InlayHintRegistrationOptions)))+  , {-|+  The server has support for pull model diagnostics.++  @since 3.17.0+  -}+  _diagnosticProvider :: (Maybe (Language.LSP.Protocol.Internal.Types.DiagnosticOptions.DiagnosticOptions Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.DiagnosticRegistrationOptions.DiagnosticRegistrationOptions))+  , {-|+  Workspace specific server capabilities.+  -}+  _workspace :: (Maybe (Row.Rec ("workspaceFolders" Row..== (Maybe Language.LSP.Protocol.Internal.Types.WorkspaceFoldersServerCapabilities.WorkspaceFoldersServerCapabilities) Row..+ ("fileOperations" Row..== (Maybe Language.LSP.Protocol.Internal.Types.FileOperationOptions.FileOperationOptions) Row..+ Row.Empty))))+  , {-|+  Experimental server capabilities.+  -}+  _experimental :: (Maybe Data.Aeson.Value)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON ServerCapabilities where+  toJSON (ServerCapabilities arg0 arg1 arg2 arg3 arg4 arg5 arg6 arg7 arg8 arg9 arg10 arg11 arg12 arg13 arg14 arg15 arg16 arg17 arg18 arg19 arg20 arg21 arg22 arg23 arg24 arg25 arg26 arg27 arg28 arg29 arg30 arg31 arg32 arg33 arg34) = Aeson.object $ concat $  ["positionEncoding" Language.LSP.Protocol.Types.Common..=? arg0+    ,"textDocumentSync" Language.LSP.Protocol.Types.Common..=? arg1+    ,"notebookDocumentSync" Language.LSP.Protocol.Types.Common..=? arg2+    ,"completionProvider" Language.LSP.Protocol.Types.Common..=? arg3+    ,"hoverProvider" Language.LSP.Protocol.Types.Common..=? arg4+    ,"signatureHelpProvider" Language.LSP.Protocol.Types.Common..=? arg5+    ,"declarationProvider" Language.LSP.Protocol.Types.Common..=? arg6+    ,"definitionProvider" Language.LSP.Protocol.Types.Common..=? arg7+    ,"typeDefinitionProvider" Language.LSP.Protocol.Types.Common..=? arg8+    ,"implementationProvider" Language.LSP.Protocol.Types.Common..=? arg9+    ,"referencesProvider" Language.LSP.Protocol.Types.Common..=? arg10+    ,"documentHighlightProvider" Language.LSP.Protocol.Types.Common..=? arg11+    ,"documentSymbolProvider" Language.LSP.Protocol.Types.Common..=? arg12+    ,"codeActionProvider" Language.LSP.Protocol.Types.Common..=? arg13+    ,"codeLensProvider" Language.LSP.Protocol.Types.Common..=? arg14+    ,"documentLinkProvider" Language.LSP.Protocol.Types.Common..=? arg15+    ,"colorProvider" Language.LSP.Protocol.Types.Common..=? arg16+    ,"workspaceSymbolProvider" Language.LSP.Protocol.Types.Common..=? arg17+    ,"documentFormattingProvider" Language.LSP.Protocol.Types.Common..=? arg18+    ,"documentRangeFormattingProvider" Language.LSP.Protocol.Types.Common..=? arg19+    ,"documentOnTypeFormattingProvider" Language.LSP.Protocol.Types.Common..=? arg20+    ,"renameProvider" Language.LSP.Protocol.Types.Common..=? arg21+    ,"foldingRangeProvider" Language.LSP.Protocol.Types.Common..=? arg22+    ,"selectionRangeProvider" Language.LSP.Protocol.Types.Common..=? arg23+    ,"executeCommandProvider" Language.LSP.Protocol.Types.Common..=? arg24+    ,"callHierarchyProvider" Language.LSP.Protocol.Types.Common..=? arg25+    ,"linkedEditingRangeProvider" Language.LSP.Protocol.Types.Common..=? arg26+    ,"semanticTokensProvider" Language.LSP.Protocol.Types.Common..=? arg27+    ,"monikerProvider" Language.LSP.Protocol.Types.Common..=? arg28+    ,"typeHierarchyProvider" Language.LSP.Protocol.Types.Common..=? arg29+    ,"inlineValueProvider" Language.LSP.Protocol.Types.Common..=? arg30+    ,"inlayHintProvider" Language.LSP.Protocol.Types.Common..=? arg31+    ,"diagnosticProvider" Language.LSP.Protocol.Types.Common..=? arg32+    ,"workspace" Language.LSP.Protocol.Types.Common..=? arg33+    ,"experimental" Language.LSP.Protocol.Types.Common..=? arg34]++instance Aeson.FromJSON ServerCapabilities where+  parseJSON = Aeson.withObject "ServerCapabilities" $ \arg -> ServerCapabilities <$> arg Aeson..:! "positionEncoding" <*> arg Aeson..:! "textDocumentSync" <*> arg Aeson..:! "notebookDocumentSync" <*> arg Aeson..:! "completionProvider" <*> arg Aeson..:! "hoverProvider" <*> arg Aeson..:! "signatureHelpProvider" <*> arg Aeson..:! "declarationProvider" <*> arg Aeson..:! "definitionProvider" <*> arg Aeson..:! "typeDefinitionProvider" <*> arg Aeson..:! "implementationProvider" <*> arg Aeson..:! "referencesProvider" <*> arg Aeson..:! "documentHighlightProvider" <*> arg Aeson..:! "documentSymbolProvider" <*> arg Aeson..:! "codeActionProvider" <*> arg Aeson..:! "codeLensProvider" <*> arg Aeson..:! "documentLinkProvider" <*> arg Aeson..:! "colorProvider" <*> arg Aeson..:! "workspaceSymbolProvider" <*> arg Aeson..:! "documentFormattingProvider" <*> arg Aeson..:! "documentRangeFormattingProvider" <*> arg Aeson..:! "documentOnTypeFormattingProvider" <*> arg Aeson..:! "renameProvider" <*> arg Aeson..:! "foldingRangeProvider" <*> arg Aeson..:! "selectionRangeProvider" <*> arg Aeson..:! "executeCommandProvider" <*> arg Aeson..:! "callHierarchyProvider" <*> arg Aeson..:! "linkedEditingRangeProvider" <*> arg Aeson..:! "semanticTokensProvider" <*> arg Aeson..:! "monikerProvider" <*> arg Aeson..:! "typeHierarchyProvider" <*> arg Aeson..:! "inlineValueProvider" <*> arg Aeson..:! "inlayHintProvider" <*> arg Aeson..:! "diagnosticProvider" <*> arg Aeson..:! "workspace" <*> arg Aeson..:! "experimental"
+ generated/Language/LSP/Protocol/Internal/Types/SetTraceParams.hs view
@@ -0,0 +1,33 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SetTraceParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.TraceValues+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data SetTraceParams = SetTraceParams +  { {-|++  -}+  _value :: Language.LSP.Protocol.Internal.Types.TraceValues.TraceValues+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON SetTraceParams where+  toJSON (SetTraceParams arg0) = Aeson.object $ concat $  [["value" Aeson..= arg0]]++instance Aeson.FromJSON SetTraceParams where+  parseJSON = Aeson.withObject "SetTraceParams" $ \arg -> SetTraceParams <$> arg Aeson..: "value"
+ generated/Language/LSP/Protocol/Internal/Types/ShowDocumentClientCapabilities.hs view
@@ -0,0 +1,35 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ShowDocumentClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Client capabilities for the showDocument request.++@since 3.16.0+-}+data ShowDocumentClientCapabilities = ShowDocumentClientCapabilities +  { {-|+  The client has support for the showDocument+  request.+  -}+  _support :: Bool+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON ShowDocumentClientCapabilities where+  toJSON (ShowDocumentClientCapabilities arg0) = Aeson.object $ concat $  [["support" Aeson..= arg0]]++instance Aeson.FromJSON ShowDocumentClientCapabilities where+  parseJSON = Aeson.withObject "ShowDocumentClientCapabilities" $ \arg -> ShowDocumentClientCapabilities <$> arg Aeson..: "support"
+ generated/Language/LSP/Protocol/Internal/Types/ShowDocumentParams.hs view
@@ -0,0 +1,59 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ShowDocumentParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+Params to show a document.++@since 3.16.0+-}+data ShowDocumentParams = ShowDocumentParams +  { {-|+  The document uri to show.+  -}+  _uri :: Language.LSP.Protocol.Types.Uri.Uri+  , {-|+  Indicates to show the resource in an external program.+  To show for example `https://code.visualstudio.com/`+  in the default WEB browser set `external` to `true`.+  -}+  _external :: (Maybe Bool)+  , {-|+  An optional property to indicate whether the editor+  showing the document should take focus or not.+  Clients might ignore this property if an external+  program is started.+  -}+  _takeFocus :: (Maybe Bool)+  , {-|+  An optional selection range if the document is a text+  document. Clients might ignore the property if an+  external program is started or the file is not a text+  file.+  -}+  _selection :: (Maybe Language.LSP.Protocol.Internal.Types.Range.Range)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON ShowDocumentParams where+  toJSON (ShowDocumentParams arg0 arg1 arg2 arg3) = Aeson.object $ concat $  [["uri" Aeson..= arg0]+    ,"external" Language.LSP.Protocol.Types.Common..=? arg1+    ,"takeFocus" Language.LSP.Protocol.Types.Common..=? arg2+    ,"selection" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON ShowDocumentParams where+  parseJSON = Aeson.withObject "ShowDocumentParams" $ \arg -> ShowDocumentParams <$> arg Aeson..: "uri" <*> arg Aeson..:! "external" <*> arg Aeson..:! "takeFocus" <*> arg Aeson..:! "selection"
+ generated/Language/LSP/Protocol/Internal/Types/ShowDocumentResult.hs view
@@ -0,0 +1,34 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ShowDocumentResult where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+The result of a showDocument request.++@since 3.16.0+-}+data ShowDocumentResult = ShowDocumentResult +  { {-|+  A boolean indicating if the show was successful.+  -}+  _success :: Bool+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON ShowDocumentResult where+  toJSON (ShowDocumentResult arg0) = Aeson.object $ concat $  [["success" Aeson..= arg0]]++instance Aeson.FromJSON ShowDocumentResult where+  parseJSON = Aeson.withObject "ShowDocumentResult" $ \arg -> ShowDocumentResult <$> arg Aeson..: "success"
+ generated/Language/LSP/Protocol/Internal/Types/ShowMessageParams.hs view
@@ -0,0 +1,39 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ShowMessageParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.MessageType+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters of a notification message.+-}+data ShowMessageParams = ShowMessageParams +  { {-|+  The message type. See `MessageType`+  -}+  _type_ :: Language.LSP.Protocol.Internal.Types.MessageType.MessageType+  , {-|+  The actual message.+  -}+  _message :: Data.Text.Text+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON ShowMessageParams where+  toJSON (ShowMessageParams arg0 arg1) = Aeson.object $ concat $  [["type" Aeson..= arg0]+    ,["message" Aeson..= arg1]]++instance Aeson.FromJSON ShowMessageParams where+  parseJSON = Aeson.withObject "ShowMessageParams" $ \arg -> ShowMessageParams <$> arg Aeson..: "type" <*> arg Aeson..: "message"
+ generated/Language/LSP/Protocol/Internal/Types/ShowMessageRequestClientCapabilities.hs view
@@ -0,0 +1,33 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ShowMessageRequestClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row as Row+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Show message request client capabilities+-}+data ShowMessageRequestClientCapabilities = ShowMessageRequestClientCapabilities +  { {-|+  Capabilities specific to the `MessageActionItem` type.+  -}+  _messageActionItem :: (Maybe (Row.Rec ("additionalPropertiesSupport" Row..== (Maybe Bool) Row..+ Row.Empty)))+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON ShowMessageRequestClientCapabilities where+  toJSON (ShowMessageRequestClientCapabilities arg0) = Aeson.object $ concat $  ["messageActionItem" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON ShowMessageRequestClientCapabilities where+  parseJSON = Aeson.withObject "ShowMessageRequestClientCapabilities" $ \arg -> ShowMessageRequestClientCapabilities <$> arg Aeson..:! "messageActionItem"
+ generated/Language/LSP/Protocol/Internal/Types/ShowMessageRequestParams.hs view
@@ -0,0 +1,45 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.ShowMessageRequestParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.MessageActionItem+import qualified Language.LSP.Protocol.Internal.Types.MessageType+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data ShowMessageRequestParams = ShowMessageRequestParams +  { {-|+  The message type. See `MessageType`+  -}+  _type_ :: Language.LSP.Protocol.Internal.Types.MessageType.MessageType+  , {-|+  The actual message.+  -}+  _message :: Data.Text.Text+  , {-|+  The message action items to present.+  -}+  _actions :: (Maybe [Language.LSP.Protocol.Internal.Types.MessageActionItem.MessageActionItem])+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON ShowMessageRequestParams where+  toJSON (ShowMessageRequestParams arg0 arg1 arg2) = Aeson.object $ concat $  [["type" Aeson..= arg0]+    ,["message" Aeson..= arg1]+    ,"actions" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON ShowMessageRequestParams where+  parseJSON = Aeson.withObject "ShowMessageRequestParams" $ \arg -> ShowMessageRequestParams <$> arg Aeson..: "type" <*> arg Aeson..: "message" <*> arg Aeson..:! "actions"
+ generated/Language/LSP/Protocol/Internal/Types/SignatureHelp.hs view
@@ -0,0 +1,59 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SignatureHelp where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.SignatureInformation+import qualified Language.LSP.Protocol.Types.Common++{-|+Signature help represents the signature of something+callable. There can be multiple signature but only one+active and only one active parameter.+-}+data SignatureHelp = SignatureHelp +  { {-|+  One or more signatures.+  -}+  _signatures :: [Language.LSP.Protocol.Internal.Types.SignatureInformation.SignatureInformation]+  , {-|+  The active signature. If omitted or the value lies outside the+  range of `signatures` the value defaults to zero or is ignored if+  the `SignatureHelp` has no signatures.++  Whenever possible implementors should make an active decision about+  the active signature and shouldn't rely on a default value.++  In future version of the protocol this property might become+  mandatory to better express this.+  -}+  _activeSignature :: (Maybe Language.LSP.Protocol.Types.Common.UInt)+  , {-|+  The active parameter of the active signature. If omitted or the value+  lies outside the range of `signatures[activeSignature].parameters`+  defaults to 0 if the active signature has parameters. If+  the active signature has no parameters it is ignored.+  In future version of the protocol this property might become+  mandatory to better express the active parameter if the+  active signature does have any.+  -}+  _activeParameter :: (Maybe Language.LSP.Protocol.Types.Common.UInt)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON SignatureHelp where+  toJSON (SignatureHelp arg0 arg1 arg2) = Aeson.object $ concat $  [["signatures" Aeson..= arg0]+    ,"activeSignature" Language.LSP.Protocol.Types.Common..=? arg1+    ,"activeParameter" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON SignatureHelp where+  parseJSON = Aeson.withObject "SignatureHelp" $ \arg -> SignatureHelp <$> arg Aeson..: "signatures" <*> arg Aeson..:! "activeSignature" <*> arg Aeson..:! "activeParameter"
+ generated/Language/LSP/Protocol/Internal/Types/SignatureHelpClientCapabilities.hs view
@@ -0,0 +1,50 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SignatureHelpClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row as Row+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.MarkupKind+import qualified Language.LSP.Protocol.Types.Common++{-|+Client Capabilities for a `SignatureHelpRequest`.+-}+data SignatureHelpClientCapabilities = SignatureHelpClientCapabilities +  { {-|+  Whether signature help supports dynamic registration.+  -}+  _dynamicRegistration :: (Maybe Bool)+  , {-|+  The client supports the following `SignatureInformation`+  specific properties.+  -}+  _signatureInformation :: (Maybe (Row.Rec ("documentationFormat" Row..== (Maybe [Language.LSP.Protocol.Internal.Types.MarkupKind.MarkupKind]) Row..+ ("parameterInformation" Row..== (Maybe (Row.Rec ("labelOffsetSupport" Row..== (Maybe Bool) Row..+ Row.Empty))) Row..+ ("activeParameterSupport" Row..== (Maybe Bool) Row..+ Row.Empty)))))+  , {-|+  The client supports to send additional context information for a+  `textDocument/signatureHelp` request. A client that opts into+  contextSupport will also support the `retriggerCharacters` on+  `SignatureHelpOptions`.++  @since 3.15.0+  -}+  _contextSupport :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON SignatureHelpClientCapabilities where+  toJSON (SignatureHelpClientCapabilities arg0 arg1 arg2) = Aeson.object $ concat $  ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+    ,"signatureInformation" Language.LSP.Protocol.Types.Common..=? arg1+    ,"contextSupport" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON SignatureHelpClientCapabilities where+  parseJSON = Aeson.withObject "SignatureHelpClientCapabilities" $ \arg -> SignatureHelpClientCapabilities <$> arg Aeson..:! "dynamicRegistration" <*> arg Aeson..:! "signatureInformation" <*> arg Aeson..:! "contextSupport"
+ generated/Language/LSP/Protocol/Internal/Types/SignatureHelpContext.hs view
@@ -0,0 +1,60 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SignatureHelpContext where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.SignatureHelp+import qualified Language.LSP.Protocol.Internal.Types.SignatureHelpTriggerKind+import qualified Language.LSP.Protocol.Types.Common++{-|+Additional information about the context in which a signature help request was triggered.++@since 3.15.0+-}+data SignatureHelpContext = SignatureHelpContext +  { {-|+  Action that caused signature help to be triggered.+  -}+  _triggerKind :: Language.LSP.Protocol.Internal.Types.SignatureHelpTriggerKind.SignatureHelpTriggerKind+  , {-|+  Character that caused signature help to be triggered.++  This is undefined when `triggerKind !== SignatureHelpTriggerKind.TriggerCharacter`+  -}+  _triggerCharacter :: (Maybe Data.Text.Text)+  , {-|+  `true` if signature help was already showing when it was triggered.++  Retriggers occurs when the signature help is already active and can be caused by actions such as+  typing a trigger character, a cursor move, or document content changes.+  -}+  _isRetrigger :: Bool+  , {-|+  The currently active `SignatureHelp`.++  The `activeSignatureHelp` has its `SignatureHelp.activeSignature` field updated based on+  the user navigating through available signatures.+  -}+  _activeSignatureHelp :: (Maybe Language.LSP.Protocol.Internal.Types.SignatureHelp.SignatureHelp)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON SignatureHelpContext where+  toJSON (SignatureHelpContext arg0 arg1 arg2 arg3) = Aeson.object $ concat $  [["triggerKind" Aeson..= arg0]+    ,"triggerCharacter" Language.LSP.Protocol.Types.Common..=? arg1+    ,["isRetrigger" Aeson..= arg2]+    ,"activeSignatureHelp" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON SignatureHelpContext where+  parseJSON = Aeson.withObject "SignatureHelpContext" $ \arg -> SignatureHelpContext <$> arg Aeson..: "triggerKind" <*> arg Aeson..:! "triggerCharacter" <*> arg Aeson..: "isRetrigger" <*> arg Aeson..:! "activeSignatureHelp"
+ generated/Language/LSP/Protocol/Internal/Types/SignatureHelpOptions.hs view
@@ -0,0 +1,48 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SignatureHelpOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+Server Capabilities for a `SignatureHelpRequest`.+-}+data SignatureHelpOptions = SignatureHelpOptions +  { {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  , {-|+  List of characters that trigger signature help automatically.+  -}+  _triggerCharacters :: (Maybe [Data.Text.Text])+  , {-|+  List of characters that re-trigger signature help.++  These trigger characters are only active when signature help is already showing. All trigger characters+  are also counted as re-trigger characters.++  @since 3.15.0+  -}+  _retriggerCharacters :: (Maybe [Data.Text.Text])+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON SignatureHelpOptions where+  toJSON (SignatureHelpOptions arg0 arg1 arg2) = Aeson.object $ concat $  ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0+    ,"triggerCharacters" Language.LSP.Protocol.Types.Common..=? arg1+    ,"retriggerCharacters" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON SignatureHelpOptions where+  parseJSON = Aeson.withObject "SignatureHelpOptions" $ \arg -> SignatureHelpOptions <$> arg Aeson..:! "workDoneProgress" <*> arg Aeson..:! "triggerCharacters" <*> arg Aeson..:! "retriggerCharacters"
+ generated/Language/LSP/Protocol/Internal/Types/SignatureHelpParams.hs view
@@ -0,0 +1,54 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SignatureHelpParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.SignatureHelpContext+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+Parameters for a `SignatureHelpRequest`.+-}+data SignatureHelpParams = SignatureHelpParams +  { {-|+  The text document.+  -}+  _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+  , {-|+  The position inside the text document.+  -}+  _position :: Language.LSP.Protocol.Internal.Types.Position.Position+  , {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  The signature help context. This is only available if the client specifies+  to send this using the client capability `textDocument.signatureHelp.contextSupport === true`++  @since 3.15.0+  -}+  _context :: (Maybe Language.LSP.Protocol.Internal.Types.SignatureHelpContext.SignatureHelpContext)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON SignatureHelpParams where+  toJSON (SignatureHelpParams arg0 arg1 arg2 arg3) = Aeson.object $ concat $  [["textDocument" Aeson..= arg0]+    ,["position" Aeson..= arg1]+    ,"workDoneToken" Language.LSP.Protocol.Types.Common..=? arg2+    ,"context" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON SignatureHelpParams where+  parseJSON = Aeson.withObject "SignatureHelpParams" $ \arg -> SignatureHelpParams <$> arg Aeson..: "textDocument" <*> arg Aeson..: "position" <*> arg Aeson..:! "workDoneToken" <*> arg Aeson..:! "context"
+ generated/Language/LSP/Protocol/Internal/Types/SignatureHelpRegistrationOptions.hs view
@@ -0,0 +1,55 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SignatureHelpRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+Registration options for a `SignatureHelpRequest`.+-}+data SignatureHelpRegistrationOptions = SignatureHelpRegistrationOptions +  { {-|+  A document selector to identify the scope of the registration. If set to null+  the document selector provided on the client side will be used.+  -}+  _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  , {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  , {-|+  List of characters that trigger signature help automatically.+  -}+  _triggerCharacters :: (Maybe [Data.Text.Text])+  , {-|+  List of characters that re-trigger signature help.++  These trigger characters are only active when signature help is already showing. All trigger characters+  are also counted as re-trigger characters.++  @since 3.15.0+  -}+  _retriggerCharacters :: (Maybe [Data.Text.Text])+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON SignatureHelpRegistrationOptions where+  toJSON (SignatureHelpRegistrationOptions arg0 arg1 arg2 arg3) = Aeson.object $ concat $  [["documentSelector" Aeson..= arg0]+    ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1+    ,"triggerCharacters" Language.LSP.Protocol.Types.Common..=? arg2+    ,"retriggerCharacters" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON SignatureHelpRegistrationOptions where+  parseJSON = Aeson.withObject "SignatureHelpRegistrationOptions" $ \arg -> SignatureHelpRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Aeson..:! "workDoneProgress" <*> arg Aeson..:! "triggerCharacters" <*> arg Aeson..:! "retriggerCharacters"
+ generated/Language/LSP/Protocol/Internal/Types/SignatureHelpTriggerKind.hs view
@@ -0,0 +1,55 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SignatureHelpTriggerKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+How a signature help was triggered.++@since 3.15.0+-}+data SignatureHelpTriggerKind = +    {-|+  Signature help was invoked manually by the user or by a command.+  -}+  SignatureHelpTriggerKind_Invoked+  | {-|+  Signature help was triggered by a trigger character.+  -}+  SignatureHelpTriggerKind_TriggerCharacter+  | {-|+  Signature help was triggered by the cursor moving or by the document content changing.+  -}+  SignatureHelpTriggerKind_ContentChange+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)+  deriving ( Aeson.ToJSON+  , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum SignatureHelpTriggerKind Language.LSP.Protocol.Types.Common.UInt)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum SignatureHelpTriggerKind where+  knownValues = Data.Set.fromList [SignatureHelpTriggerKind_Invoked+    ,SignatureHelpTriggerKind_TriggerCharacter+    ,SignatureHelpTriggerKind_ContentChange]+  type EnumBaseType SignatureHelpTriggerKind = Language.LSP.Protocol.Types.Common.UInt+  toEnumBaseType SignatureHelpTriggerKind_Invoked = 1+  toEnumBaseType SignatureHelpTriggerKind_TriggerCharacter = 2+  toEnumBaseType SignatureHelpTriggerKind_ContentChange = 3+  fromEnumBaseType 1 = pure SignatureHelpTriggerKind_Invoked+  fromEnumBaseType 2 = pure SignatureHelpTriggerKind_TriggerCharacter+  fromEnumBaseType 3 = pure SignatureHelpTriggerKind_ContentChange+  fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/SignatureInformation.hs view
@@ -0,0 +1,58 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SignatureInformation where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.MarkupContent+import qualified Language.LSP.Protocol.Internal.Types.ParameterInformation+import qualified Language.LSP.Protocol.Types.Common++{-|+Represents the signature of something callable. A signature+can have a label, like a function-name, a doc-comment, and+a set of parameters.+-}+data SignatureInformation = SignatureInformation +  { {-|+  The label of this signature. Will be shown in+  the UI.+  -}+  _label :: Data.Text.Text+  , {-|+  The human-readable doc-comment of this signature. Will be shown+  in the UI but can be omitted.+  -}+  _documentation :: (Maybe (Data.Text.Text Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.MarkupContent.MarkupContent))+  , {-|+  The parameters of this signature.+  -}+  _parameters :: (Maybe [Language.LSP.Protocol.Internal.Types.ParameterInformation.ParameterInformation])+  , {-|+  The index of the active parameter.++  If provided, this is used in place of `SignatureHelp.activeParameter`.++  @since 3.16.0+  -}+  _activeParameter :: (Maybe Language.LSP.Protocol.Types.Common.UInt)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON SignatureInformation where+  toJSON (SignatureInformation arg0 arg1 arg2 arg3) = Aeson.object $ concat $  [["label" Aeson..= arg0]+    ,"documentation" Language.LSP.Protocol.Types.Common..=? arg1+    ,"parameters" Language.LSP.Protocol.Types.Common..=? arg2+    ,"activeParameter" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON SignatureInformation where+  parseJSON = Aeson.withObject "SignatureInformation" $ \arg -> SignatureInformation <$> arg Aeson..: "label" <*> arg Aeson..:! "documentation" <*> arg Aeson..:! "parameters" <*> arg Aeson..:! "activeParameter"
+ generated/Language/LSP/Protocol/Internal/Types/StaticRegistrationOptions.hs view
@@ -0,0 +1,35 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.StaticRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+Static registration options to be returned in the initialize+request.+-}+data StaticRegistrationOptions = StaticRegistrationOptions +  { {-|+  The id used to register the request. The id can be used to deregister+  the request again. See also Registration#id.+  -}+  _id :: (Maybe Data.Text.Text)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON StaticRegistrationOptions where+  toJSON (StaticRegistrationOptions arg0) = Aeson.object $ concat $  ["id" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON StaticRegistrationOptions where+  parseJSON = Aeson.withObject "StaticRegistrationOptions" $ \arg -> StaticRegistrationOptions <$> arg Aeson..:! "id"
+ generated/Language/LSP/Protocol/Internal/Types/SymbolInformation.hs view
@@ -0,0 +1,78 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SymbolInformation where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Location+import qualified Language.LSP.Protocol.Internal.Types.SymbolKind+import qualified Language.LSP.Protocol.Internal.Types.SymbolTag+import qualified Language.LSP.Protocol.Types.Common++{-# DEPRECATED _deprecated "Use tags instead" #-}+{-|+Represents information about programming constructs like variables, classes,+interfaces etc.+-}+data SymbolInformation = SymbolInformation +  { {-|+  The name of this symbol.+  -}+  _name :: Data.Text.Text+  , {-|+  The kind of this symbol.+  -}+  _kind :: Language.LSP.Protocol.Internal.Types.SymbolKind.SymbolKind+  , {-|+  Tags for this symbol.++  @since 3.16.0+  -}+  _tags :: (Maybe [Language.LSP.Protocol.Internal.Types.SymbolTag.SymbolTag])+  , {-|+  The name of the symbol containing this symbol. This information is for+  user interface purposes (e.g. to render a qualifier in the user interface+  if necessary). It can't be used to re-infer a hierarchy for the document+  symbols.+  -}+  _containerName :: (Maybe Data.Text.Text)+  , {-|+  Indicates if this symbol is deprecated.++  @deprecated Use tags instead+  -}+  _deprecated :: (Maybe Bool)+  , {-|+  The location of this symbol. The location's range is used by a tool+  to reveal the location in the editor. If the symbol is selected in the+  tool the range's start information is used to position the cursor. So+  the range usually spans more than the actual symbol's name and does+  normally include things like visibility modifiers.++  The range doesn't have to denote a node range in the sense of an abstract+  syntax tree. It can therefore not be used to re-construct a hierarchy of+  the symbols.+  -}+  _location :: Language.LSP.Protocol.Internal.Types.Location.Location+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON SymbolInformation where+  toJSON (SymbolInformation arg0 arg1 arg2 arg3 arg4 arg5) = Aeson.object $ concat $  [["name" Aeson..= arg0]+    ,["kind" Aeson..= arg1]+    ,"tags" Language.LSP.Protocol.Types.Common..=? arg2+    ,"containerName" Language.LSP.Protocol.Types.Common..=? arg3+    ,"deprecated" Language.LSP.Protocol.Types.Common..=? arg4+    ,["location" Aeson..= arg5]]++instance Aeson.FromJSON SymbolInformation where+  parseJSON = Aeson.withObject "SymbolInformation" $ \arg -> SymbolInformation <$> arg Aeson..: "name" <*> arg Aeson..: "kind" <*> arg Aeson..:! "tags" <*> arg Aeson..:! "containerName" <*> arg Aeson..:! "deprecated" <*> arg Aeson..: "location"
+ generated/Language/LSP/Protocol/Internal/Types/SymbolKind.hs view
@@ -0,0 +1,214 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SymbolKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+A symbol kind.+-}+data SymbolKind = +    {-|++  -}+  SymbolKind_File+  | {-|++  -}+  SymbolKind_Module+  | {-|++  -}+  SymbolKind_Namespace+  | {-|++  -}+  SymbolKind_Package+  | {-|++  -}+  SymbolKind_Class+  | {-|++  -}+  SymbolKind_Method+  | {-|++  -}+  SymbolKind_Property+  | {-|++  -}+  SymbolKind_Field+  | {-|++  -}+  SymbolKind_Constructor+  | {-|++  -}+  SymbolKind_Enum+  | {-|++  -}+  SymbolKind_Interface+  | {-|++  -}+  SymbolKind_Function+  | {-|++  -}+  SymbolKind_Variable+  | {-|++  -}+  SymbolKind_Constant+  | {-|++  -}+  SymbolKind_String+  | {-|++  -}+  SymbolKind_Number+  | {-|++  -}+  SymbolKind_Boolean+  | {-|++  -}+  SymbolKind_Array+  | {-|++  -}+  SymbolKind_Object+  | {-|++  -}+  SymbolKind_Key+  | {-|++  -}+  SymbolKind_Null+  | {-|++  -}+  SymbolKind_EnumMember+  | {-|++  -}+  SymbolKind_Struct+  | {-|++  -}+  SymbolKind_Event+  | {-|++  -}+  SymbolKind_Operator+  | {-|++  -}+  SymbolKind_TypeParameter+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)+  deriving ( Aeson.ToJSON+  , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum SymbolKind Language.LSP.Protocol.Types.Common.UInt)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum SymbolKind where+  knownValues = Data.Set.fromList [SymbolKind_File+    ,SymbolKind_Module+    ,SymbolKind_Namespace+    ,SymbolKind_Package+    ,SymbolKind_Class+    ,SymbolKind_Method+    ,SymbolKind_Property+    ,SymbolKind_Field+    ,SymbolKind_Constructor+    ,SymbolKind_Enum+    ,SymbolKind_Interface+    ,SymbolKind_Function+    ,SymbolKind_Variable+    ,SymbolKind_Constant+    ,SymbolKind_String+    ,SymbolKind_Number+    ,SymbolKind_Boolean+    ,SymbolKind_Array+    ,SymbolKind_Object+    ,SymbolKind_Key+    ,SymbolKind_Null+    ,SymbolKind_EnumMember+    ,SymbolKind_Struct+    ,SymbolKind_Event+    ,SymbolKind_Operator+    ,SymbolKind_TypeParameter]+  type EnumBaseType SymbolKind = Language.LSP.Protocol.Types.Common.UInt+  toEnumBaseType SymbolKind_File = 1+  toEnumBaseType SymbolKind_Module = 2+  toEnumBaseType SymbolKind_Namespace = 3+  toEnumBaseType SymbolKind_Package = 4+  toEnumBaseType SymbolKind_Class = 5+  toEnumBaseType SymbolKind_Method = 6+  toEnumBaseType SymbolKind_Property = 7+  toEnumBaseType SymbolKind_Field = 8+  toEnumBaseType SymbolKind_Constructor = 9+  toEnumBaseType SymbolKind_Enum = 10+  toEnumBaseType SymbolKind_Interface = 11+  toEnumBaseType SymbolKind_Function = 12+  toEnumBaseType SymbolKind_Variable = 13+  toEnumBaseType SymbolKind_Constant = 14+  toEnumBaseType SymbolKind_String = 15+  toEnumBaseType SymbolKind_Number = 16+  toEnumBaseType SymbolKind_Boolean = 17+  toEnumBaseType SymbolKind_Array = 18+  toEnumBaseType SymbolKind_Object = 19+  toEnumBaseType SymbolKind_Key = 20+  toEnumBaseType SymbolKind_Null = 21+  toEnumBaseType SymbolKind_EnumMember = 22+  toEnumBaseType SymbolKind_Struct = 23+  toEnumBaseType SymbolKind_Event = 24+  toEnumBaseType SymbolKind_Operator = 25+  toEnumBaseType SymbolKind_TypeParameter = 26+  fromEnumBaseType 1 = pure SymbolKind_File+  fromEnumBaseType 2 = pure SymbolKind_Module+  fromEnumBaseType 3 = pure SymbolKind_Namespace+  fromEnumBaseType 4 = pure SymbolKind_Package+  fromEnumBaseType 5 = pure SymbolKind_Class+  fromEnumBaseType 6 = pure SymbolKind_Method+  fromEnumBaseType 7 = pure SymbolKind_Property+  fromEnumBaseType 8 = pure SymbolKind_Field+  fromEnumBaseType 9 = pure SymbolKind_Constructor+  fromEnumBaseType 10 = pure SymbolKind_Enum+  fromEnumBaseType 11 = pure SymbolKind_Interface+  fromEnumBaseType 12 = pure SymbolKind_Function+  fromEnumBaseType 13 = pure SymbolKind_Variable+  fromEnumBaseType 14 = pure SymbolKind_Constant+  fromEnumBaseType 15 = pure SymbolKind_String+  fromEnumBaseType 16 = pure SymbolKind_Number+  fromEnumBaseType 17 = pure SymbolKind_Boolean+  fromEnumBaseType 18 = pure SymbolKind_Array+  fromEnumBaseType 19 = pure SymbolKind_Object+  fromEnumBaseType 20 = pure SymbolKind_Key+  fromEnumBaseType 21 = pure SymbolKind_Null+  fromEnumBaseType 22 = pure SymbolKind_EnumMember+  fromEnumBaseType 23 = pure SymbolKind_Struct+  fromEnumBaseType 24 = pure SymbolKind_Event+  fromEnumBaseType 25 = pure SymbolKind_Operator+  fromEnumBaseType 26 = pure SymbolKind_TypeParameter+  fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/SymbolTag.hs view
@@ -0,0 +1,41 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.SymbolTag where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+Symbol tags are extra annotations that tweak the rendering of a symbol.++@since 3.16+-}+data SymbolTag = +    {-|+  Render a symbol as obsolete, usually using a strike-out.+  -}+  SymbolTag_Deprecated+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)+  deriving ( Aeson.ToJSON+  , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum SymbolTag Language.LSP.Protocol.Types.Common.UInt)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum SymbolTag where+  knownValues = Data.Set.fromList [SymbolTag_Deprecated]+  type EnumBaseType SymbolTag = Language.LSP.Protocol.Types.Common.UInt+  toEnumBaseType SymbolTag_Deprecated = 1+  fromEnumBaseType 1 = pure SymbolTag_Deprecated+  fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/TextDocumentChangeRegistrationOptions.hs view
@@ -0,0 +1,40 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TextDocumentChangeRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentSyncKind+import qualified Language.LSP.Protocol.Types.Common++{-|+Describe options to be used when registered for text document change events.+-}+data TextDocumentChangeRegistrationOptions = TextDocumentChangeRegistrationOptions +  { {-|+  A document selector to identify the scope of the registration. If set to null+  the document selector provided on the client side will be used.+  -}+  _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  , {-|+  How documents are synced to the server.+  -}+  _syncKind :: Language.LSP.Protocol.Internal.Types.TextDocumentSyncKind.TextDocumentSyncKind+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON TextDocumentChangeRegistrationOptions where+  toJSON (TextDocumentChangeRegistrationOptions arg0 arg1) = Aeson.object $ concat $  [["documentSelector" Aeson..= arg0]+    ,["syncKind" Aeson..= arg1]]++instance Aeson.FromJSON TextDocumentChangeRegistrationOptions where+  parseJSON = Aeson.withObject "TextDocumentChangeRegistrationOptions" $ \arg -> TextDocumentChangeRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Aeson..: "syncKind"
+ generated/Language/LSP/Protocol/Internal/Types/TextDocumentClientCapabilities.hs view
@@ -0,0 +1,236 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TextDocumentClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.CallHierarchyClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.CodeActionClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.CodeLensClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.CompletionClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.DeclarationClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.DefinitionClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.DiagnosticClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.DocumentColorClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.DocumentFormattingClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.DocumentHighlightClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.DocumentLinkClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.DocumentSymbolClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.FoldingRangeClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.HoverClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.ImplementationClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.InlayHintClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.InlineValueClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.LinkedEditingRangeClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.MonikerClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.PublishDiagnosticsClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.ReferenceClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.RenameClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.SelectionRangeClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.SignatureHelpClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentSyncClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.TypeDefinitionClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.TypeHierarchyClientCapabilities+import qualified Language.LSP.Protocol.Types.Common++{-|+Text document specific client capabilities.+-}+data TextDocumentClientCapabilities = TextDocumentClientCapabilities +  { {-|+  Defines which synchronization capabilities the client supports.+  -}+  _synchronization :: (Maybe Language.LSP.Protocol.Internal.Types.TextDocumentSyncClientCapabilities.TextDocumentSyncClientCapabilities)+  , {-|+  Capabilities specific to the `textDocument/completion` request.+  -}+  _completion :: (Maybe Language.LSP.Protocol.Internal.Types.CompletionClientCapabilities.CompletionClientCapabilities)+  , {-|+  Capabilities specific to the `textDocument/hover` request.+  -}+  _hover :: (Maybe Language.LSP.Protocol.Internal.Types.HoverClientCapabilities.HoverClientCapabilities)+  , {-|+  Capabilities specific to the `textDocument/signatureHelp` request.+  -}+  _signatureHelp :: (Maybe Language.LSP.Protocol.Internal.Types.SignatureHelpClientCapabilities.SignatureHelpClientCapabilities)+  , {-|+  Capabilities specific to the `textDocument/declaration` request.++  @since 3.14.0+  -}+  _declaration :: (Maybe Language.LSP.Protocol.Internal.Types.DeclarationClientCapabilities.DeclarationClientCapabilities)+  , {-|+  Capabilities specific to the `textDocument/definition` request.+  -}+  _definition :: (Maybe Language.LSP.Protocol.Internal.Types.DefinitionClientCapabilities.DefinitionClientCapabilities)+  , {-|+  Capabilities specific to the `textDocument/typeDefinition` request.++  @since 3.6.0+  -}+  _typeDefinition :: (Maybe Language.LSP.Protocol.Internal.Types.TypeDefinitionClientCapabilities.TypeDefinitionClientCapabilities)+  , {-|+  Capabilities specific to the `textDocument/implementation` request.++  @since 3.6.0+  -}+  _implementation :: (Maybe Language.LSP.Protocol.Internal.Types.ImplementationClientCapabilities.ImplementationClientCapabilities)+  , {-|+  Capabilities specific to the `textDocument/references` request.+  -}+  _references :: (Maybe Language.LSP.Protocol.Internal.Types.ReferenceClientCapabilities.ReferenceClientCapabilities)+  , {-|+  Capabilities specific to the `textDocument/documentHighlight` request.+  -}+  _documentHighlight :: (Maybe Language.LSP.Protocol.Internal.Types.DocumentHighlightClientCapabilities.DocumentHighlightClientCapabilities)+  , {-|+  Capabilities specific to the `textDocument/documentSymbol` request.+  -}+  _documentSymbol :: (Maybe Language.LSP.Protocol.Internal.Types.DocumentSymbolClientCapabilities.DocumentSymbolClientCapabilities)+  , {-|+  Capabilities specific to the `textDocument/codeAction` request.+  -}+  _codeAction :: (Maybe Language.LSP.Protocol.Internal.Types.CodeActionClientCapabilities.CodeActionClientCapabilities)+  , {-|+  Capabilities specific to the `textDocument/codeLens` request.+  -}+  _codeLens :: (Maybe Language.LSP.Protocol.Internal.Types.CodeLensClientCapabilities.CodeLensClientCapabilities)+  , {-|+  Capabilities specific to the `textDocument/documentLink` request.+  -}+  _documentLink :: (Maybe Language.LSP.Protocol.Internal.Types.DocumentLinkClientCapabilities.DocumentLinkClientCapabilities)+  , {-|+  Capabilities specific to the `textDocument/documentColor` and the+  `textDocument/colorPresentation` request.++  @since 3.6.0+  -}+  _colorProvider :: (Maybe Language.LSP.Protocol.Internal.Types.DocumentColorClientCapabilities.DocumentColorClientCapabilities)+  , {-|+  Capabilities specific to the `textDocument/formatting` request.+  -}+  _formatting :: (Maybe Language.LSP.Protocol.Internal.Types.DocumentFormattingClientCapabilities.DocumentFormattingClientCapabilities)+  , {-|+  Capabilities specific to the `textDocument/rangeFormatting` request.+  -}+  _rangeFormatting :: (Maybe Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingClientCapabilities.DocumentRangeFormattingClientCapabilities)+  , {-|+  Capabilities specific to the `textDocument/onTypeFormatting` request.+  -}+  _onTypeFormatting :: (Maybe Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingClientCapabilities.DocumentOnTypeFormattingClientCapabilities)+  , {-|+  Capabilities specific to the `textDocument/rename` request.+  -}+  _rename :: (Maybe Language.LSP.Protocol.Internal.Types.RenameClientCapabilities.RenameClientCapabilities)+  , {-|+  Capabilities specific to the `textDocument/foldingRange` request.++  @since 3.10.0+  -}+  _foldingRange :: (Maybe Language.LSP.Protocol.Internal.Types.FoldingRangeClientCapabilities.FoldingRangeClientCapabilities)+  , {-|+  Capabilities specific to the `textDocument/selectionRange` request.++  @since 3.15.0+  -}+  _selectionRange :: (Maybe Language.LSP.Protocol.Internal.Types.SelectionRangeClientCapabilities.SelectionRangeClientCapabilities)+  , {-|+  Capabilities specific to the `textDocument/publishDiagnostics` notification.+  -}+  _publishDiagnostics :: (Maybe Language.LSP.Protocol.Internal.Types.PublishDiagnosticsClientCapabilities.PublishDiagnosticsClientCapabilities)+  , {-|+  Capabilities specific to the various call hierarchy requests.++  @since 3.16.0+  -}+  _callHierarchy :: (Maybe Language.LSP.Protocol.Internal.Types.CallHierarchyClientCapabilities.CallHierarchyClientCapabilities)+  , {-|+  Capabilities specific to the various semantic token request.++  @since 3.16.0+  -}+  _semanticTokens :: (Maybe Language.LSP.Protocol.Internal.Types.SemanticTokensClientCapabilities.SemanticTokensClientCapabilities)+  , {-|+  Capabilities specific to the `textDocument/linkedEditingRange` request.++  @since 3.16.0+  -}+  _linkedEditingRange :: (Maybe Language.LSP.Protocol.Internal.Types.LinkedEditingRangeClientCapabilities.LinkedEditingRangeClientCapabilities)+  , {-|+  Client capabilities specific to the `textDocument/moniker` request.++  @since 3.16.0+  -}+  _moniker :: (Maybe Language.LSP.Protocol.Internal.Types.MonikerClientCapabilities.MonikerClientCapabilities)+  , {-|+  Capabilities specific to the various type hierarchy requests.++  @since 3.17.0+  -}+  _typeHierarchy :: (Maybe Language.LSP.Protocol.Internal.Types.TypeHierarchyClientCapabilities.TypeHierarchyClientCapabilities)+  , {-|+  Capabilities specific to the `textDocument/inlineValue` request.++  @since 3.17.0+  -}+  _inlineValue :: (Maybe Language.LSP.Protocol.Internal.Types.InlineValueClientCapabilities.InlineValueClientCapabilities)+  , {-|+  Capabilities specific to the `textDocument/inlayHint` request.++  @since 3.17.0+  -}+  _inlayHint :: (Maybe Language.LSP.Protocol.Internal.Types.InlayHintClientCapabilities.InlayHintClientCapabilities)+  , {-|+  Capabilities specific to the diagnostic pull model.++  @since 3.17.0+  -}+  _diagnostic :: (Maybe Language.LSP.Protocol.Internal.Types.DiagnosticClientCapabilities.DiagnosticClientCapabilities)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON TextDocumentClientCapabilities where+  toJSON (TextDocumentClientCapabilities arg0 arg1 arg2 arg3 arg4 arg5 arg6 arg7 arg8 arg9 arg10 arg11 arg12 arg13 arg14 arg15 arg16 arg17 arg18 arg19 arg20 arg21 arg22 arg23 arg24 arg25 arg26 arg27 arg28 arg29) = Aeson.object $ concat $  ["synchronization" Language.LSP.Protocol.Types.Common..=? arg0+    ,"completion" Language.LSP.Protocol.Types.Common..=? arg1+    ,"hover" Language.LSP.Protocol.Types.Common..=? arg2+    ,"signatureHelp" Language.LSP.Protocol.Types.Common..=? arg3+    ,"declaration" Language.LSP.Protocol.Types.Common..=? arg4+    ,"definition" Language.LSP.Protocol.Types.Common..=? arg5+    ,"typeDefinition" Language.LSP.Protocol.Types.Common..=? arg6+    ,"implementation" Language.LSP.Protocol.Types.Common..=? arg7+    ,"references" Language.LSP.Protocol.Types.Common..=? arg8+    ,"documentHighlight" Language.LSP.Protocol.Types.Common..=? arg9+    ,"documentSymbol" Language.LSP.Protocol.Types.Common..=? arg10+    ,"codeAction" Language.LSP.Protocol.Types.Common..=? arg11+    ,"codeLens" Language.LSP.Protocol.Types.Common..=? arg12+    ,"documentLink" Language.LSP.Protocol.Types.Common..=? arg13+    ,"colorProvider" Language.LSP.Protocol.Types.Common..=? arg14+    ,"formatting" Language.LSP.Protocol.Types.Common..=? arg15+    ,"rangeFormatting" Language.LSP.Protocol.Types.Common..=? arg16+    ,"onTypeFormatting" Language.LSP.Protocol.Types.Common..=? arg17+    ,"rename" Language.LSP.Protocol.Types.Common..=? arg18+    ,"foldingRange" Language.LSP.Protocol.Types.Common..=? arg19+    ,"selectionRange" Language.LSP.Protocol.Types.Common..=? arg20+    ,"publishDiagnostics" Language.LSP.Protocol.Types.Common..=? arg21+    ,"callHierarchy" Language.LSP.Protocol.Types.Common..=? arg22+    ,"semanticTokens" Language.LSP.Protocol.Types.Common..=? arg23+    ,"linkedEditingRange" Language.LSP.Protocol.Types.Common..=? arg24+    ,"moniker" Language.LSP.Protocol.Types.Common..=? arg25+    ,"typeHierarchy" Language.LSP.Protocol.Types.Common..=? arg26+    ,"inlineValue" Language.LSP.Protocol.Types.Common..=? arg27+    ,"inlayHint" Language.LSP.Protocol.Types.Common..=? arg28+    ,"diagnostic" Language.LSP.Protocol.Types.Common..=? arg29]++instance Aeson.FromJSON TextDocumentClientCapabilities where+  parseJSON = Aeson.withObject "TextDocumentClientCapabilities" $ \arg -> TextDocumentClientCapabilities <$> arg Aeson..:! "synchronization" <*> arg Aeson..:! "completion" <*> arg Aeson..:! "hover" <*> arg Aeson..:! "signatureHelp" <*> arg Aeson..:! "declaration" <*> arg Aeson..:! "definition" <*> arg Aeson..:! "typeDefinition" <*> arg Aeson..:! "implementation" <*> arg Aeson..:! "references" <*> arg Aeson..:! "documentHighlight" <*> arg Aeson..:! "documentSymbol" <*> arg Aeson..:! "codeAction" <*> arg Aeson..:! "codeLens" <*> arg Aeson..:! "documentLink" <*> arg Aeson..:! "colorProvider" <*> arg Aeson..:! "formatting" <*> arg Aeson..:! "rangeFormatting" <*> arg Aeson..:! "onTypeFormatting" <*> arg Aeson..:! "rename" <*> arg Aeson..:! "foldingRange" <*> arg Aeson..:! "selectionRange" <*> arg Aeson..:! "publishDiagnostics" <*> arg Aeson..:! "callHierarchy" <*> arg Aeson..:! "semanticTokens" <*> arg Aeson..:! "linkedEditingRange" <*> arg Aeson..:! "moniker" <*> arg Aeson..:! "typeHierarchy" <*> arg Aeson..:! "inlineValue" <*> arg Aeson..:! "inlayHint" <*> arg Aeson..:! "diagnostic"
+ generated/Language/LSP/Protocol/Internal/Types/TextDocumentContentChangeEvent.hs view
@@ -0,0 +1,26 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TextDocumentContentChangeEvent where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row as Row+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|+An event describing a change to a text document. If only a text is provided+it is considered to be the full content of the document.+-}+newtype TextDocumentContentChangeEvent = TextDocumentContentChangeEvent ((Row.Rec ("range" Row..== Language.LSP.Protocol.Internal.Types.Range.Range Row..+ ("rangeLength" Row..== (Maybe Language.LSP.Protocol.Types.Common.UInt) Row..+ ("text" Row..== Data.Text.Text Row..+ Row.Empty)))) Language.LSP.Protocol.Types.Common.|? (Row.Rec ("text" Row..== Data.Text.Text Row..+ Row.Empty)))+  deriving newtype (Aeson.ToJSON, Aeson.FromJSON)+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)
+ generated/Language/LSP/Protocol/Internal/Types/TextDocumentEdit.hs view
@@ -0,0 +1,46 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TextDocumentEdit where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.AnnotatedTextEdit+import qualified Language.LSP.Protocol.Internal.Types.OptionalVersionedTextDocumentIdentifier+import qualified Language.LSP.Protocol.Internal.Types.TextEdit+import qualified Language.LSP.Protocol.Types.Common++{-|+Describes textual changes on a text document. A TextDocumentEdit describes all changes+on a document version Si and after they are applied move the document to version Si+1.+So the creator of a TextDocumentEdit doesn't need to sort the array of edits or do any+kind of ordering. However the edits must be non overlapping.+-}+data TextDocumentEdit = TextDocumentEdit +  { {-|+  The text document to change.+  -}+  _textDocument :: Language.LSP.Protocol.Internal.Types.OptionalVersionedTextDocumentIdentifier.OptionalVersionedTextDocumentIdentifier+  , {-|+  The edits to be applied.++  @since 3.16.0 - support for AnnotatedTextEdit. This is guarded using a+  client capability.+  -}+  _edits :: [(Language.LSP.Protocol.Internal.Types.TextEdit.TextEdit Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.AnnotatedTextEdit.AnnotatedTextEdit)]+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON TextDocumentEdit where+  toJSON (TextDocumentEdit arg0 arg1) = Aeson.object $ concat $  [["textDocument" Aeson..= arg0]+    ,["edits" Aeson..= arg1]]++instance Aeson.FromJSON TextDocumentEdit where+  parseJSON = Aeson.withObject "TextDocumentEdit" $ \arg -> TextDocumentEdit <$> arg Aeson..: "textDocument" <*> arg Aeson..: "edits"
+ generated/Language/LSP/Protocol/Internal/Types/TextDocumentFilter.hs view
@@ -0,0 +1,39 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TextDocumentFilter where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row as Row+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+A document filter denotes a document by different properties like+the `TextDocument.languageId` of+its resource, or a glob-pattern that is applied to the `TextDocument.fileName`.++Glob patterns can have the following syntax:+- `*` to match one or more characters in a path segment+- `?` to match on one character in a path segment+- `**` to match any number of path segments, including none+- `{}` to group sub patterns into an OR expression. (e.g. `**​/*.{ts,js}` matches all TypeScript and JavaScript files)+- `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)+- `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`)++@sample A language filter that applies to typescript files on disk: `{ language: 'typescript', scheme: 'file' }`+@sample A language filter that applies to all package.json paths: `{ language: 'json', pattern: '**package.json' }`++@since 3.17.0+-}+newtype TextDocumentFilter = TextDocumentFilter ((Row.Rec ("language" Row..== Data.Text.Text Row..+ ("scheme" Row..== (Maybe Data.Text.Text) Row..+ ("pattern" Row..== (Maybe Data.Text.Text) Row..+ Row.Empty)))) Language.LSP.Protocol.Types.Common.|? ((Row.Rec ("language" Row..== (Maybe Data.Text.Text) Row..+ ("scheme" Row..== Data.Text.Text Row..+ ("pattern" Row..== (Maybe Data.Text.Text) Row..+ Row.Empty)))) Language.LSP.Protocol.Types.Common.|? (Row.Rec ("language" Row..== (Maybe Data.Text.Text) Row..+ ("scheme" Row..== (Maybe Data.Text.Text) Row..+ ("pattern" Row..== Data.Text.Text Row..+ Row.Empty))))))+  deriving newtype (Aeson.ToJSON, Aeson.FromJSON)+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)
+ generated/Language/LSP/Protocol/Internal/Types/TextDocumentIdentifier.hs view
@@ -0,0 +1,33 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+A literal to identify a text document in the client.+-}+data TextDocumentIdentifier = TextDocumentIdentifier +  { {-|+  The text document's uri.+  -}+  _uri :: Language.LSP.Protocol.Types.Uri.Uri+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON TextDocumentIdentifier where+  toJSON (TextDocumentIdentifier arg0) = Aeson.object $ concat $  [["uri" Aeson..= arg0]]++instance Aeson.FromJSON TextDocumentIdentifier where+  parseJSON = Aeson.withObject "TextDocumentIdentifier" $ \arg -> TextDocumentIdentifier <$> arg Aeson..: "uri"
+ generated/Language/LSP/Protocol/Internal/Types/TextDocumentItem.hs view
@@ -0,0 +1,51 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TextDocumentItem where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+An item to transfer a text document from the client to the+server.+-}+data TextDocumentItem = TextDocumentItem +  { {-|+  The text document's uri.+  -}+  _uri :: Language.LSP.Protocol.Types.Uri.Uri+  , {-|+  The text document's language identifier.+  -}+  _languageId :: Data.Text.Text+  , {-|+  The version number of this document (it will increase after each+  change, including undo/redo).+  -}+  _version :: Language.LSP.Protocol.Types.Common.Int32+  , {-|+  The content of the opened text document.+  -}+  _text :: Data.Text.Text+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON TextDocumentItem where+  toJSON (TextDocumentItem arg0 arg1 arg2 arg3) = Aeson.object $ concat $  [["uri" Aeson..= arg0]+    ,["languageId" Aeson..= arg1]+    ,["version" Aeson..= arg2]+    ,["text" Aeson..= arg3]]++instance Aeson.FromJSON TextDocumentItem where+  parseJSON = Aeson.withObject "TextDocumentItem" $ \arg -> TextDocumentItem <$> arg Aeson..: "uri" <*> arg Aeson..: "languageId" <*> arg Aeson..: "version" <*> arg Aeson..: "text"
+ generated/Language/LSP/Protocol/Internal/Types/TextDocumentPositionParams.hs view
@@ -0,0 +1,40 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TextDocumentPositionParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+A parameter literal used in requests to pass a text document and a position inside that+document.+-}+data TextDocumentPositionParams = TextDocumentPositionParams +  { {-|+  The text document.+  -}+  _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+  , {-|+  The position inside the text document.+  -}+  _position :: Language.LSP.Protocol.Internal.Types.Position.Position+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON TextDocumentPositionParams where+  toJSON (TextDocumentPositionParams arg0 arg1) = Aeson.object $ concat $  [["textDocument" Aeson..= arg0]+    ,["position" Aeson..= arg1]]++instance Aeson.FromJSON TextDocumentPositionParams where+  parseJSON = Aeson.withObject "TextDocumentPositionParams" $ \arg -> TextDocumentPositionParams <$> arg Aeson..: "textDocument" <*> arg Aeson..: "position"
+ generated/Language/LSP/Protocol/Internal/Types/TextDocumentRegistrationOptions.hs view
@@ -0,0 +1,34 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TextDocumentRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+General text document registration options.+-}+data TextDocumentRegistrationOptions = TextDocumentRegistrationOptions +  { {-|+  A document selector to identify the scope of the registration. If set to null+  the document selector provided on the client side will be used.+  -}+  _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON TextDocumentRegistrationOptions where+  toJSON (TextDocumentRegistrationOptions arg0) = Aeson.object $ concat $  [["documentSelector" Aeson..= arg0]]++instance Aeson.FromJSON TextDocumentRegistrationOptions where+  parseJSON = Aeson.withObject "TextDocumentRegistrationOptions" $ \arg -> TextDocumentRegistrationOptions <$> arg Aeson..: "documentSelector"
+ generated/Language/LSP/Protocol/Internal/Types/TextDocumentSaveReason.hs view
@@ -0,0 +1,54 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TextDocumentSaveReason where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+Represents reasons why a text document is saved.+-}+data TextDocumentSaveReason = +    {-|+  Manually triggered, e.g. by the user pressing save, by starting debugging,+  or by an API call.+  -}+  TextDocumentSaveReason_Manual+  | {-|+  Automatic after a delay.+  -}+  TextDocumentSaveReason_AfterDelay+  | {-|+  When the editor lost focus.+  -}+  TextDocumentSaveReason_FocusOut+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)+  deriving ( Aeson.ToJSON+  , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum TextDocumentSaveReason Language.LSP.Protocol.Types.Common.UInt)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum TextDocumentSaveReason where+  knownValues = Data.Set.fromList [TextDocumentSaveReason_Manual+    ,TextDocumentSaveReason_AfterDelay+    ,TextDocumentSaveReason_FocusOut]+  type EnumBaseType TextDocumentSaveReason = Language.LSP.Protocol.Types.Common.UInt+  toEnumBaseType TextDocumentSaveReason_Manual = 1+  toEnumBaseType TextDocumentSaveReason_AfterDelay = 2+  toEnumBaseType TextDocumentSaveReason_FocusOut = 3+  fromEnumBaseType 1 = pure TextDocumentSaveReason_Manual+  fromEnumBaseType 2 = pure TextDocumentSaveReason_AfterDelay+  fromEnumBaseType 3 = pure TextDocumentSaveReason_FocusOut+  fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/TextDocumentSaveRegistrationOptions.hs view
@@ -0,0 +1,39 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TextDocumentSaveRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+Save registration options.+-}+data TextDocumentSaveRegistrationOptions = TextDocumentSaveRegistrationOptions +  { {-|+  A document selector to identify the scope of the registration. If set to null+  the document selector provided on the client side will be used.+  -}+  _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  , {-|+  The client is supposed to include the content on save.+  -}+  _includeText :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON TextDocumentSaveRegistrationOptions where+  toJSON (TextDocumentSaveRegistrationOptions arg0 arg1) = Aeson.object $ concat $  [["documentSelector" Aeson..= arg0]+    ,"includeText" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON TextDocumentSaveRegistrationOptions where+  parseJSON = Aeson.withObject "TextDocumentSaveRegistrationOptions" $ \arg -> TextDocumentSaveRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Aeson..:! "includeText"
+ generated/Language/LSP/Protocol/Internal/Types/TextDocumentSyncClientCapabilities.hs view
@@ -0,0 +1,49 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TextDocumentSyncClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data TextDocumentSyncClientCapabilities = TextDocumentSyncClientCapabilities +  { {-|+  Whether text document synchronization supports dynamic registration.+  -}+  _dynamicRegistration :: (Maybe Bool)+  , {-|+  The client supports sending will save notifications.+  -}+  _willSave :: (Maybe Bool)+  , {-|+  The client supports sending a will save request and+  waits for a response providing text edits which will+  be applied to the document before it is saved.+  -}+  _willSaveWaitUntil :: (Maybe Bool)+  , {-|+  The client supports did save notifications.+  -}+  _didSave :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON TextDocumentSyncClientCapabilities where+  toJSON (TextDocumentSyncClientCapabilities arg0 arg1 arg2 arg3) = Aeson.object $ concat $  ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+    ,"willSave" Language.LSP.Protocol.Types.Common..=? arg1+    ,"willSaveWaitUntil" Language.LSP.Protocol.Types.Common..=? arg2+    ,"didSave" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON TextDocumentSyncClientCapabilities where+  parseJSON = Aeson.withObject "TextDocumentSyncClientCapabilities" $ \arg -> TextDocumentSyncClientCapabilities <$> arg Aeson..:! "dynamicRegistration" <*> arg Aeson..:! "willSave" <*> arg Aeson..:! "willSaveWaitUntil" <*> arg Aeson..:! "didSave"
+ generated/Language/LSP/Protocol/Internal/Types/TextDocumentSyncKind.hs view
@@ -0,0 +1,57 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TextDocumentSyncKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+Defines how the host (editor) should sync+document changes to the language server.+-}+data TextDocumentSyncKind = +    {-|+  Documents should not be synced at all.+  -}+  TextDocumentSyncKind_None+  | {-|+  Documents are synced by always sending the full content+  of the document.+  -}+  TextDocumentSyncKind_Full+  | {-|+  Documents are synced by sending the full content on open.+  After that only incremental updates to the document are+  send.+  -}+  TextDocumentSyncKind_Incremental+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)+  deriving ( Aeson.ToJSON+  , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum TextDocumentSyncKind Language.LSP.Protocol.Types.Common.UInt)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum TextDocumentSyncKind where+  knownValues = Data.Set.fromList [TextDocumentSyncKind_None+    ,TextDocumentSyncKind_Full+    ,TextDocumentSyncKind_Incremental]+  type EnumBaseType TextDocumentSyncKind = Language.LSP.Protocol.Types.Common.UInt+  toEnumBaseType TextDocumentSyncKind_None = 0+  toEnumBaseType TextDocumentSyncKind_Full = 1+  toEnumBaseType TextDocumentSyncKind_Incremental = 2+  fromEnumBaseType 0 = pure TextDocumentSyncKind_None+  fromEnumBaseType 1 = pure TextDocumentSyncKind_Full+  fromEnumBaseType 2 = pure TextDocumentSyncKind_Incremental+  fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/TextDocumentSyncOptions.hs view
@@ -0,0 +1,59 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TextDocumentSyncOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.SaveOptions+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentSyncKind+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data TextDocumentSyncOptions = TextDocumentSyncOptions +  { {-|+  Open and close notifications are sent to the server. If omitted open close notification should not+  be sent.+  -}+  _openClose :: (Maybe Bool)+  , {-|+  Change notifications are sent to the server. See TextDocumentSyncKind.None, TextDocumentSyncKind.Full+  and TextDocumentSyncKind.Incremental. If omitted it defaults to TextDocumentSyncKind.None.+  -}+  _change :: (Maybe Language.LSP.Protocol.Internal.Types.TextDocumentSyncKind.TextDocumentSyncKind)+  , {-|+  If present will save notifications are sent to the server. If omitted the notification should not be+  sent.+  -}+  _willSave :: (Maybe Bool)+  , {-|+  If present will save wait until requests are sent to the server. If omitted the request should not be+  sent.+  -}+  _willSaveWaitUntil :: (Maybe Bool)+  , {-|+  If present save notifications are sent to the server. If omitted the notification should not be+  sent.+  -}+  _save :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.SaveOptions.SaveOptions))+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON TextDocumentSyncOptions where+  toJSON (TextDocumentSyncOptions arg0 arg1 arg2 arg3 arg4) = Aeson.object $ concat $  ["openClose" Language.LSP.Protocol.Types.Common..=? arg0+    ,"change" Language.LSP.Protocol.Types.Common..=? arg1+    ,"willSave" Language.LSP.Protocol.Types.Common..=? arg2+    ,"willSaveWaitUntil" Language.LSP.Protocol.Types.Common..=? arg3+    ,"save" Language.LSP.Protocol.Types.Common..=? arg4]++instance Aeson.FromJSON TextDocumentSyncOptions where+  parseJSON = Aeson.withObject "TextDocumentSyncOptions" $ \arg -> TextDocumentSyncOptions <$> arg Aeson..:! "openClose" <*> arg Aeson..:! "change" <*> arg Aeson..:! "willSave" <*> arg Aeson..:! "willSaveWaitUntil" <*> arg Aeson..:! "save"
+ generated/Language/LSP/Protocol/Internal/Types/TextEdit.hs view
@@ -0,0 +1,41 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TextEdit where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Types.Common++{-|+A text edit applicable to a text document.+-}+data TextEdit = TextEdit +  { {-|+  The range of the text document to be manipulated. To insert+  text into a document create a range where start === end.+  -}+  _range :: Language.LSP.Protocol.Internal.Types.Range.Range+  , {-|+  The string to be inserted. For delete operations use an+  empty string.+  -}+  _newText :: Data.Text.Text+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON TextEdit where+  toJSON (TextEdit arg0 arg1) = Aeson.object $ concat $  [["range" Aeson..= arg0]+    ,["newText" Aeson..= arg1]]++instance Aeson.FromJSON TextEdit where+  parseJSON = Aeson.withObject "TextEdit" $ \arg -> TextEdit <$> arg Aeson..: "range" <*> arg Aeson..: "newText"
+ generated/Language/LSP/Protocol/Internal/Types/TokenFormat.hs view
@@ -0,0 +1,39 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TokenFormat where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.LspEnum++{-|++-}+data TokenFormat = +    {-|++  -}+  TokenFormat_Relative+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)+  deriving ( Aeson.ToJSON+  , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum TokenFormat Data.Text.Text)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum TokenFormat where+  knownValues = Data.Set.fromList [TokenFormat_Relative]+  type EnumBaseType TokenFormat = Data.Text.Text+  toEnumBaseType TokenFormat_Relative = "relative"+  fromEnumBaseType "relative" = pure TokenFormat_Relative+  fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/TraceValues.hs view
@@ -0,0 +1,53 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TraceValues where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.LspEnum++{-|++-}+data TraceValues = +    {-|+  Turn tracing off.+  -}+  TraceValues_Off+  | {-|+  Trace messages only.+  -}+  TraceValues_Messages+  | {-|+  Verbose message tracing.+  -}+  TraceValues_Verbose+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)+  deriving ( Aeson.ToJSON+  , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum TraceValues Data.Text.Text)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum TraceValues where+  knownValues = Data.Set.fromList [TraceValues_Off+    ,TraceValues_Messages+    ,TraceValues_Verbose]+  type EnumBaseType TraceValues = Data.Text.Text+  toEnumBaseType TraceValues_Off = "off"+  toEnumBaseType TraceValues_Messages = "messages"+  toEnumBaseType TraceValues_Verbose = "verbose"+  fromEnumBaseType "off" = pure TraceValues_Off+  fromEnumBaseType "messages" = pure TraceValues_Messages+  fromEnumBaseType "verbose" = pure TraceValues_Verbose+  fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/TypeDefinitionClientCapabilities.hs view
@@ -0,0 +1,41 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TypeDefinitionClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Since 3.6.0+-}+data TypeDefinitionClientCapabilities = TypeDefinitionClientCapabilities +  { {-|+  Whether implementation supports dynamic registration. If this is set to `true`+  the client supports the new `TypeDefinitionRegistrationOptions` return value+  for the corresponding server capability as well.+  -}+  _dynamicRegistration :: (Maybe Bool)+  , {-|+  The client supports additional metadata in the form of definition links.++  Since 3.14.0+  -}+  _linkSupport :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON TypeDefinitionClientCapabilities where+  toJSON (TypeDefinitionClientCapabilities arg0 arg1) = Aeson.object $ concat $  ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+    ,"linkSupport" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON TypeDefinitionClientCapabilities where+  parseJSON = Aeson.withObject "TypeDefinitionClientCapabilities" $ \arg -> TypeDefinitionClientCapabilities <$> arg Aeson..:! "dynamicRegistration" <*> arg Aeson..:! "linkSupport"
+ generated/Language/LSP/Protocol/Internal/Types/TypeDefinitionOptions.hs view
@@ -0,0 +1,32 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TypeDefinitionOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data TypeDefinitionOptions = TypeDefinitionOptions +  { {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON TypeDefinitionOptions where+  toJSON (TypeDefinitionOptions arg0) = Aeson.object $ concat $  ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON TypeDefinitionOptions where+  parseJSON = Aeson.withObject "TypeDefinitionOptions" $ \arg -> TypeDefinitionOptions <$> arg Aeson..:! "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/TypeDefinitionParams.hs view
@@ -0,0 +1,51 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TypeDefinitionParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data TypeDefinitionParams = TypeDefinitionParams +  { {-|+  The text document.+  -}+  _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+  , {-|+  The position inside the text document.+  -}+  _position :: Language.LSP.Protocol.Internal.Types.Position.Position+  , {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  An optional token that a server can use to report partial results (e.g. streaming) to+  the client.+  -}+  _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON TypeDefinitionParams where+  toJSON (TypeDefinitionParams arg0 arg1 arg2 arg3) = Aeson.object $ concat $  [["textDocument" Aeson..= arg0]+    ,["position" Aeson..= arg1]+    ,"workDoneToken" Language.LSP.Protocol.Types.Common..=? arg2+    ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON TypeDefinitionParams where+  parseJSON = Aeson.withObject "TypeDefinitionParams" $ \arg -> TypeDefinitionParams <$> arg Aeson..: "textDocument" <*> arg Aeson..: "position" <*> arg Aeson..:! "workDoneToken" <*> arg Aeson..:! "partialResultToken"
+ generated/Language/LSP/Protocol/Internal/Types/TypeDefinitionRegistrationOptions.hs view
@@ -0,0 +1,46 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TypeDefinitionRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data TypeDefinitionRegistrationOptions = TypeDefinitionRegistrationOptions +  { {-|+  A document selector to identify the scope of the registration. If set to null+  the document selector provided on the client side will be used.+  -}+  _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  , {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  , {-|+  The id used to register the request. The id can be used to deregister+  the request again. See also Registration#id.+  -}+  _id :: (Maybe Data.Text.Text)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON TypeDefinitionRegistrationOptions where+  toJSON (TypeDefinitionRegistrationOptions arg0 arg1 arg2) = Aeson.object $ concat $  [["documentSelector" Aeson..= arg0]+    ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1+    ,"id" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON TypeDefinitionRegistrationOptions where+  parseJSON = Aeson.withObject "TypeDefinitionRegistrationOptions" $ \arg -> TypeDefinitionRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Aeson..:! "workDoneProgress" <*> arg Aeson..:! "id"
+ generated/Language/LSP/Protocol/Internal/Types/TypeHierarchyClientCapabilities.hs view
@@ -0,0 +1,34 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TypeHierarchyClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+@since 3.17.0+-}+data TypeHierarchyClientCapabilities = TypeHierarchyClientCapabilities +  { {-|+  Whether implementation supports dynamic registration. If this is set to `true`+  the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`+  return value for the corresponding server capability as well.+  -}+  _dynamicRegistration :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON TypeHierarchyClientCapabilities where+  toJSON (TypeHierarchyClientCapabilities arg0) = Aeson.object $ concat $  ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON TypeHierarchyClientCapabilities where+  parseJSON = Aeson.withObject "TypeHierarchyClientCapabilities" $ \arg -> TypeHierarchyClientCapabilities <$> arg Aeson..:! "dynamicRegistration"
+ generated/Language/LSP/Protocol/Internal/Types/TypeHierarchyItem.hs view
@@ -0,0 +1,79 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TypeHierarchyItem where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Range+import qualified Language.LSP.Protocol.Internal.Types.SymbolKind+import qualified Language.LSP.Protocol.Internal.Types.SymbolTag+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+@since 3.17.0+-}+data TypeHierarchyItem = TypeHierarchyItem +  { {-|+  The name of this item.+  -}+  _name :: Data.Text.Text+  , {-|+  The kind of this item.+  -}+  _kind :: Language.LSP.Protocol.Internal.Types.SymbolKind.SymbolKind+  , {-|+  Tags for this item.+  -}+  _tags :: (Maybe [Language.LSP.Protocol.Internal.Types.SymbolTag.SymbolTag])+  , {-|+  More detail for this item, e.g. the signature of a function.+  -}+  _detail :: (Maybe Data.Text.Text)+  , {-|+  The resource identifier of this item.+  -}+  _uri :: Language.LSP.Protocol.Types.Uri.Uri+  , {-|+  The range enclosing this symbol not including leading/trailing whitespace+  but everything else, e.g. comments and code.+  -}+  _range :: Language.LSP.Protocol.Internal.Types.Range.Range+  , {-|+  The range that should be selected and revealed when this symbol is being+  picked, e.g. the name of a function. Must be contained by the+  `TypeHierarchyItem.range`.+  -}+  _selectionRange :: Language.LSP.Protocol.Internal.Types.Range.Range+  , {-|+  A data entry field that is preserved between a type hierarchy prepare and+  supertypes or subtypes requests. It could also be used to identify the+  type hierarchy in the server, helping improve the performance on+  resolving supertypes and subtypes.+  -}+  _data_ :: (Maybe Data.Aeson.Value)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON TypeHierarchyItem where+  toJSON (TypeHierarchyItem arg0 arg1 arg2 arg3 arg4 arg5 arg6 arg7) = Aeson.object $ concat $  [["name" Aeson..= arg0]+    ,["kind" Aeson..= arg1]+    ,"tags" Language.LSP.Protocol.Types.Common..=? arg2+    ,"detail" Language.LSP.Protocol.Types.Common..=? arg3+    ,["uri" Aeson..= arg4]+    ,["range" Aeson..= arg5]+    ,["selectionRange" Aeson..= arg6]+    ,"data" Language.LSP.Protocol.Types.Common..=? arg7]++instance Aeson.FromJSON TypeHierarchyItem where+  parseJSON = Aeson.withObject "TypeHierarchyItem" $ \arg -> TypeHierarchyItem <$> arg Aeson..: "name" <*> arg Aeson..: "kind" <*> arg Aeson..:! "tags" <*> arg Aeson..:! "detail" <*> arg Aeson..: "uri" <*> arg Aeson..: "range" <*> arg Aeson..: "selectionRange" <*> arg Aeson..:! "data"
+ generated/Language/LSP/Protocol/Internal/Types/TypeHierarchyOptions.hs view
@@ -0,0 +1,34 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TypeHierarchyOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Type hierarchy options used during static registration.++@since 3.17.0+-}+data TypeHierarchyOptions = TypeHierarchyOptions +  { {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON TypeHierarchyOptions where+  toJSON (TypeHierarchyOptions arg0) = Aeson.object $ concat $  ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON TypeHierarchyOptions where+  parseJSON = Aeson.withObject "TypeHierarchyOptions" $ \arg -> TypeHierarchyOptions <$> arg Aeson..:! "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/TypeHierarchyPrepareParams.hs view
@@ -0,0 +1,47 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TypeHierarchyPrepareParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Position+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameter of a `textDocument/prepareTypeHierarchy` request.++@since 3.17.0+-}+data TypeHierarchyPrepareParams = TypeHierarchyPrepareParams +  { {-|+  The text document.+  -}+  _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+  , {-|+  The position inside the text document.+  -}+  _position :: Language.LSP.Protocol.Internal.Types.Position.Position+  , {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON TypeHierarchyPrepareParams where+  toJSON (TypeHierarchyPrepareParams arg0 arg1 arg2) = Aeson.object $ concat $  [["textDocument" Aeson..= arg0]+    ,["position" Aeson..= arg1]+    ,"workDoneToken" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON TypeHierarchyPrepareParams where+  parseJSON = Aeson.withObject "TypeHierarchyPrepareParams" $ \arg -> TypeHierarchyPrepareParams <$> arg Aeson..: "textDocument" <*> arg Aeson..: "position" <*> arg Aeson..:! "workDoneToken"
+ generated/Language/LSP/Protocol/Internal/Types/TypeHierarchyRegistrationOptions.hs view
@@ -0,0 +1,48 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TypeHierarchyRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector+import qualified Language.LSP.Protocol.Types.Common++{-|+Type hierarchy options used during static or dynamic registration.++@since 3.17.0+-}+data TypeHierarchyRegistrationOptions = TypeHierarchyRegistrationOptions +  { {-|+  A document selector to identify the scope of the registration. If set to null+  the document selector provided on the client side will be used.+  -}+  _documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  , {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  , {-|+  The id used to register the request. The id can be used to deregister+  the request again. See also Registration#id.+  -}+  _id :: (Maybe Data.Text.Text)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON TypeHierarchyRegistrationOptions where+  toJSON (TypeHierarchyRegistrationOptions arg0 arg1 arg2) = Aeson.object $ concat $  [["documentSelector" Aeson..= arg0]+    ,"workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg1+    ,"id" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON TypeHierarchyRegistrationOptions where+  parseJSON = Aeson.withObject "TypeHierarchyRegistrationOptions" $ \arg -> TypeHierarchyRegistrationOptions <$> arg Aeson..: "documentSelector" <*> arg Aeson..:! "workDoneProgress" <*> arg Aeson..:! "id"
+ generated/Language/LSP/Protocol/Internal/Types/TypeHierarchySubtypesParams.hs view
@@ -0,0 +1,47 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TypeHierarchySubtypesParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TypeHierarchyItem+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameter of a `typeHierarchy/subtypes` request.++@since 3.17.0+-}+data TypeHierarchySubtypesParams = TypeHierarchySubtypesParams +  { {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  An optional token that a server can use to report partial results (e.g. streaming) to+  the client.+  -}+  _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|++  -}+  _item :: Language.LSP.Protocol.Internal.Types.TypeHierarchyItem.TypeHierarchyItem+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON TypeHierarchySubtypesParams where+  toJSON (TypeHierarchySubtypesParams arg0 arg1 arg2) = Aeson.object $ concat $  ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+    ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg1+    ,["item" Aeson..= arg2]]++instance Aeson.FromJSON TypeHierarchySubtypesParams where+  parseJSON = Aeson.withObject "TypeHierarchySubtypesParams" $ \arg -> TypeHierarchySubtypesParams <$> arg Aeson..:! "workDoneToken" <*> arg Aeson..:! "partialResultToken" <*> arg Aeson..: "item"
+ generated/Language/LSP/Protocol/Internal/Types/TypeHierarchySupertypesParams.hs view
@@ -0,0 +1,47 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.TypeHierarchySupertypesParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TypeHierarchyItem+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameter of a `typeHierarchy/supertypes` request.++@since 3.17.0+-}+data TypeHierarchySupertypesParams = TypeHierarchySupertypesParams +  { {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  An optional token that a server can use to report partial results (e.g. streaming) to+  the client.+  -}+  _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|++  -}+  _item :: Language.LSP.Protocol.Internal.Types.TypeHierarchyItem.TypeHierarchyItem+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON TypeHierarchySupertypesParams where+  toJSON (TypeHierarchySupertypesParams arg0 arg1 arg2) = Aeson.object $ concat $  ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+    ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg1+    ,["item" Aeson..= arg2]]++instance Aeson.FromJSON TypeHierarchySupertypesParams where+  parseJSON = Aeson.withObject "TypeHierarchySupertypesParams" $ \arg -> TypeHierarchySupertypesParams <$> arg Aeson..:! "workDoneToken" <*> arg Aeson..:! "partialResultToken" <*> arg Aeson..: "item"
+ generated/Language/LSP/Protocol/Internal/Types/UInitializeParams.hs view
@@ -0,0 +1,101 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.UInitializeParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row as Row+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.ClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Internal.Types.TraceValues+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-# DEPRECATED _rootPath "in favour of rootUri." #-}+{-# DEPRECATED _rootUri "in favour of workspaceFolders." #-}+{-|+The initialize parameters+-}+data UInitializeParams = UInitializeParams +  { {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  The process Id of the parent process that started+  the server.++  Is `null` if the process has not been started by another process.+  If the parent process is not alive then the server should exit.+  -}+  _processId :: (Language.LSP.Protocol.Types.Common.Int32 Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  , {-|+  Information about the client++  @since 3.15.0+  -}+  _clientInfo :: (Maybe (Row.Rec ("name" Row..== Data.Text.Text Row..+ ("version" Row..== (Maybe Data.Text.Text) Row..+ Row.Empty))))+  , {-|+  The locale the client is currently showing the user interface+  in. This must not necessarily be the locale of the operating+  system.++  Uses IETF language tags as the value's syntax+  (See https://en.wikipedia.org/wiki/IETF_language_tag)++  @since 3.16.0+  -}+  _locale :: (Maybe Data.Text.Text)+  , {-|+  The rootPath of the workspace. Is null+  if no folder is open.++  @deprecated in favour of rootUri.+  -}+  _rootPath :: (Maybe (Data.Text.Text Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null))+  , {-|+  The rootUri of the workspace. Is null if no+  folder is open. If both `rootPath` and `rootUri` are set+  `rootUri` wins.++  @deprecated in favour of workspaceFolders.+  -}+  _rootUri :: (Language.LSP.Protocol.Types.Uri.Uri Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  , {-|+  The capabilities provided by the client (editor or tool)+  -}+  _capabilities :: Language.LSP.Protocol.Internal.Types.ClientCapabilities.ClientCapabilities+  , {-|+  User provided initialization options.+  -}+  _initializationOptions :: (Maybe Data.Aeson.Value)+  , {-|+  The initial trace setting. If omitted trace is disabled ('off').+  -}+  _trace :: (Maybe Language.LSP.Protocol.Internal.Types.TraceValues.TraceValues)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON UInitializeParams where+  toJSON (UInitializeParams arg0 arg1 arg2 arg3 arg4 arg5 arg6 arg7 arg8) = Aeson.object $ concat $  ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+    ,["processId" Aeson..= arg1]+    ,"clientInfo" Language.LSP.Protocol.Types.Common..=? arg2+    ,"locale" Language.LSP.Protocol.Types.Common..=? arg3+    ,"rootPath" Language.LSP.Protocol.Types.Common..=? arg4+    ,["rootUri" Aeson..= arg5]+    ,["capabilities" Aeson..= arg6]+    ,"initializationOptions" Language.LSP.Protocol.Types.Common..=? arg7+    ,"trace" Language.LSP.Protocol.Types.Common..=? arg8]++instance Aeson.FromJSON UInitializeParams where+  parseJSON = Aeson.withObject "_InitializeParams" $ \arg -> UInitializeParams <$> arg Aeson..:! "workDoneToken" <*> arg Aeson..: "processId" <*> arg Aeson..:! "clientInfo" <*> arg Aeson..:! "locale" <*> arg Aeson..:! "rootPath" <*> arg Aeson..: "rootUri" <*> arg Aeson..: "capabilities" <*> arg Aeson..:! "initializationOptions" <*> arg Aeson..:! "trace"
+ generated/Language/LSP/Protocol/Internal/Types/UnchangedDocumentDiagnosticReport.hs view
@@ -0,0 +1,46 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.UnchangedDocumentDiagnosticReport where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Singletons++{-|+A diagnostic report indicating that the last returned+report is still accurate.++@since 3.17.0+-}+data UnchangedDocumentDiagnosticReport = UnchangedDocumentDiagnosticReport +  { {-|+  A document diagnostic report indicating+  no changes to the last result. A server can+  only return `unchanged` if result ids are+  provided.+  -}+  _kind :: (Language.LSP.Protocol.Types.Singletons.AString "unchanged")+  , {-|+  A result id which will be sent on the next+  diagnostic request for the same document.+  -}+  _resultId :: Data.Text.Text+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON UnchangedDocumentDiagnosticReport where+  toJSON (UnchangedDocumentDiagnosticReport arg0 arg1) = Aeson.object $ concat $  [["kind" Aeson..= arg0]+    ,["resultId" Aeson..= arg1]]++instance Aeson.FromJSON UnchangedDocumentDiagnosticReport where+  parseJSON = Aeson.withObject "UnchangedDocumentDiagnosticReport" $ \arg -> UnchangedDocumentDiagnosticReport <$> arg Aeson..: "kind" <*> arg Aeson..: "resultId"
+ generated/Language/LSP/Protocol/Internal/Types/UniquenessLevel.hs view
@@ -0,0 +1,69 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.UniquenessLevel where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.LspEnum++{-|+Moniker uniqueness level to define scope of the moniker.++@since 3.16.0+-}+data UniquenessLevel = +    {-|+  The moniker is only unique inside a document+  -}+  UniquenessLevel_Document+  | {-|+  The moniker is unique inside a project for which a dump got created+  -}+  UniquenessLevel_Project+  | {-|+  The moniker is unique inside the group to which a project belongs+  -}+  UniquenessLevel_Group+  | {-|+  The moniker is unique inside the moniker scheme.+  -}+  UniquenessLevel_Scheme+  | {-|+  The moniker is globally unique+  -}+  UniquenessLevel_Global+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)+  deriving ( Aeson.ToJSON+  , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum UniquenessLevel Data.Text.Text)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum UniquenessLevel where+  knownValues = Data.Set.fromList [UniquenessLevel_Document+    ,UniquenessLevel_Project+    ,UniquenessLevel_Group+    ,UniquenessLevel_Scheme+    ,UniquenessLevel_Global]+  type EnumBaseType UniquenessLevel = Data.Text.Text+  toEnumBaseType UniquenessLevel_Document = "document"+  toEnumBaseType UniquenessLevel_Project = "project"+  toEnumBaseType UniquenessLevel_Group = "group"+  toEnumBaseType UniquenessLevel_Scheme = "scheme"+  toEnumBaseType UniquenessLevel_Global = "global"+  fromEnumBaseType "document" = pure UniquenessLevel_Document+  fromEnumBaseType "project" = pure UniquenessLevel_Project+  fromEnumBaseType "group" = pure UniquenessLevel_Group+  fromEnumBaseType "scheme" = pure UniquenessLevel_Scheme+  fromEnumBaseType "global" = pure UniquenessLevel_Global+  fromEnumBaseType _ = Nothing++
+ generated/Language/LSP/Protocol/Internal/Types/Unregistration.hs view
@@ -0,0 +1,39 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.Unregistration where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|+General parameters to unregister a request or notification.+-}+data Unregistration = Unregistration +  { {-|+  The id used to unregister the request or notification. Usually an id+  provided during the register request.+  -}+  _id :: Data.Text.Text+  , {-|+  The method to unregister for.+  -}+  _method :: Data.Text.Text+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON Unregistration where+  toJSON (Unregistration arg0 arg1) = Aeson.object $ concat $  [["id" Aeson..= arg0]+    ,["method" Aeson..= arg1]]++instance Aeson.FromJSON Unregistration where+  parseJSON = Aeson.withObject "Unregistration" $ \arg -> Unregistration <$> arg Aeson..: "id" <*> arg Aeson..: "method"
+ generated/Language/LSP/Protocol/Internal/Types/UnregistrationParams.hs view
@@ -0,0 +1,33 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.UnregistrationParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.Unregistration+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data UnregistrationParams = UnregistrationParams +  { {-|++  -}+  _unregisterations :: [Language.LSP.Protocol.Internal.Types.Unregistration.Unregistration]+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON UnregistrationParams where+  toJSON (UnregistrationParams arg0) = Aeson.object $ concat $  [["unregisterations" Aeson..= arg0]]++instance Aeson.FromJSON UnregistrationParams where+  parseJSON = Aeson.withObject "UnregistrationParams" $ \arg -> UnregistrationParams <$> arg Aeson..: "unregisterations"
+ generated/Language/LSP/Protocol/Internal/Types/VersionedNotebookDocumentIdentifier.hs view
@@ -0,0 +1,40 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.VersionedNotebookDocumentIdentifier where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+A versioned notebook document identifier.++@since 3.17.0+-}+data VersionedNotebookDocumentIdentifier = VersionedNotebookDocumentIdentifier +  { {-|+  The version number of this notebook document.+  -}+  _version :: Language.LSP.Protocol.Types.Common.Int32+  , {-|+  The notebook document's uri.+  -}+  _uri :: Language.LSP.Protocol.Types.Uri.Uri+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON VersionedNotebookDocumentIdentifier where+  toJSON (VersionedNotebookDocumentIdentifier arg0 arg1) = Aeson.object $ concat $  [["version" Aeson..= arg0]+    ,["uri" Aeson..= arg1]]++instance Aeson.FromJSON VersionedNotebookDocumentIdentifier where+  parseJSON = Aeson.withObject "VersionedNotebookDocumentIdentifier" $ \arg -> VersionedNotebookDocumentIdentifier <$> arg Aeson..: "version" <*> arg Aeson..: "uri"
+ generated/Language/LSP/Protocol/Internal/Types/VersionedTextDocumentIdentifier.hs view
@@ -0,0 +1,38 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.VersionedTextDocumentIdentifier where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+A text document identifier to denote a specific version of a text document.+-}+data VersionedTextDocumentIdentifier = VersionedTextDocumentIdentifier +  { {-|+  The text document's uri.+  -}+  _uri :: Language.LSP.Protocol.Types.Uri.Uri+  , {-|+  The version number of this document.+  -}+  _version :: Language.LSP.Protocol.Types.Common.Int32+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON VersionedTextDocumentIdentifier where+  toJSON (VersionedTextDocumentIdentifier arg0 arg1) = Aeson.object $ concat $  [["uri" Aeson..= arg0]+    ,["version" Aeson..= arg1]]++instance Aeson.FromJSON VersionedTextDocumentIdentifier where+  parseJSON = Aeson.withObject "VersionedTextDocumentIdentifier" $ \arg -> VersionedTextDocumentIdentifier <$> arg Aeson..: "uri" <*> arg Aeson..: "version"
+ generated/Language/LSP/Protocol/Internal/Types/WatchKind.hs view
@@ -0,0 +1,57 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WatchKind where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Set+import qualified Data.String+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.LspEnum++{-|++-}+data WatchKind = +    {-|+  Interested in create events.+  -}+  WatchKind_Create+  | {-|+  Interested in change events+  -}+  WatchKind_Change+  | {-|+  Interested in delete events+  -}+  WatchKind_Delete+  | WatchKind_Custom Language.LSP.Protocol.Types.Common.UInt+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)+  deriving ( Aeson.ToJSON+  , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum WatchKind Language.LSP.Protocol.Types.Common.UInt)++instance Language.LSP.Protocol.Types.LspEnum.LspEnum WatchKind where+  knownValues = Data.Set.fromList [WatchKind_Create+    ,WatchKind_Change+    ,WatchKind_Delete]+  type EnumBaseType WatchKind = Language.LSP.Protocol.Types.Common.UInt+  toEnumBaseType WatchKind_Create = 1+  toEnumBaseType WatchKind_Change = 2+  toEnumBaseType WatchKind_Delete = 4+  toEnumBaseType (WatchKind_Custom arg) = arg++instance Language.LSP.Protocol.Types.LspEnum.LspOpenEnum WatchKind where+  fromOpenEnumBaseType 1 = WatchKind_Create+  fromOpenEnumBaseType 2 = WatchKind_Change+  fromOpenEnumBaseType 4 = WatchKind_Delete+  fromOpenEnumBaseType arg = WatchKind_Custom arg++
+ generated/Language/LSP/Protocol/Internal/Types/WillSaveTextDocumentParams.hs view
@@ -0,0 +1,39 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WillSaveTextDocumentParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentSaveReason+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters sent in a will save text document notification.+-}+data WillSaveTextDocumentParams = WillSaveTextDocumentParams +  { {-|+  The document that will be saved.+  -}+  _textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier+  , {-|+  The 'TextDocumentSaveReason'.+  -}+  _reason :: Language.LSP.Protocol.Internal.Types.TextDocumentSaveReason.TextDocumentSaveReason+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON WillSaveTextDocumentParams where+  toJSON (WillSaveTextDocumentParams arg0 arg1) = Aeson.object $ concat $  [["textDocument" Aeson..= arg0]+    ,["reason" Aeson..= arg1]]++instance Aeson.FromJSON WillSaveTextDocumentParams where+  parseJSON = Aeson.withObject "WillSaveTextDocumentParams" $ \arg -> WillSaveTextDocumentParams <$> arg Aeson..: "textDocument" <*> arg Aeson..: "reason"
+ generated/Language/LSP/Protocol/Internal/Types/WindowClientCapabilities.hs view
@@ -0,0 +1,56 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WindowClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ShowDocumentClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.ShowMessageRequestClientCapabilities+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data WindowClientCapabilities = WindowClientCapabilities +  { {-|+  It indicates whether the client supports server initiated+  progress using the `window/workDoneProgress/create` request.++  The capability also controls Whether client supports handling+  of progress notifications. If set servers are allowed to report a+  `workDoneProgress` property in the request specific server+  capabilities.++  @since 3.15.0+  -}+  _workDoneProgress :: (Maybe Bool)+  , {-|+  Capabilities specific to the showMessage request.++  @since 3.16.0+  -}+  _showMessage :: (Maybe Language.LSP.Protocol.Internal.Types.ShowMessageRequestClientCapabilities.ShowMessageRequestClientCapabilities)+  , {-|+  Capabilities specific to the showDocument request.++  @since 3.16.0+  -}+  _showDocument :: (Maybe Language.LSP.Protocol.Internal.Types.ShowDocumentClientCapabilities.ShowDocumentClientCapabilities)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON WindowClientCapabilities where+  toJSON (WindowClientCapabilities arg0 arg1 arg2) = Aeson.object $ concat $  ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0+    ,"showMessage" Language.LSP.Protocol.Types.Common..=? arg1+    ,"showDocument" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON WindowClientCapabilities where+  parseJSON = Aeson.withObject "WindowClientCapabilities" $ \arg -> WindowClientCapabilities <$> arg Aeson..:! "workDoneProgress" <*> arg Aeson..:! "showMessage" <*> arg Aeson..:! "showDocument"
+ generated/Language/LSP/Protocol/Internal/Types/WorkDoneProgressBegin.hs view
@@ -0,0 +1,68 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkDoneProgressBegin where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Singletons++{-|++-}+data WorkDoneProgressBegin = WorkDoneProgressBegin +  { {-|++  -}+  _kind :: (Language.LSP.Protocol.Types.Singletons.AString "begin")+  , {-|+  Mandatory title of the progress operation. Used to briefly inform about+  the kind of operation being performed.++  Examples: "Indexing" or "Linking dependencies".+  -}+  _title :: Data.Text.Text+  , {-|+  Controls if a cancel button should show to allow the user to cancel the+  long running operation. Clients that don't support cancellation are allowed+  to ignore the setting.+  -}+  _cancellable :: (Maybe Bool)+  , {-|+  Optional, more detailed associated progress message. Contains+  complementary information to the `title`.++  Examples: "3/25 files", "project/src/module2", "node_modules/some_dep".+  If unset, the previous progress message (if any) is still valid.+  -}+  _message :: (Maybe Data.Text.Text)+  , {-|+  Optional progress percentage to display (value 100 is considered 100%).+  If not provided infinite progress is assumed and clients are allowed+  to ignore the `percentage` value in subsequent in report notifications.++  The value should be steadily rising. Clients are free to ignore values+  that are not following this rule. The value range is [0, 100].+  -}+  _percentage :: (Maybe Language.LSP.Protocol.Types.Common.UInt)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON WorkDoneProgressBegin where+  toJSON (WorkDoneProgressBegin arg0 arg1 arg2 arg3 arg4) = Aeson.object $ concat $  [["kind" Aeson..= arg0]+    ,["title" Aeson..= arg1]+    ,"cancellable" Language.LSP.Protocol.Types.Common..=? arg2+    ,"message" Language.LSP.Protocol.Types.Common..=? arg3+    ,"percentage" Language.LSP.Protocol.Types.Common..=? arg4]++instance Aeson.FromJSON WorkDoneProgressBegin where+  parseJSON = Aeson.withObject "WorkDoneProgressBegin" $ \arg -> WorkDoneProgressBegin <$> arg Aeson..: "kind" <*> arg Aeson..: "title" <*> arg Aeson..:! "cancellable" <*> arg Aeson..:! "message" <*> arg Aeson..:! "percentage"
+ generated/Language/LSP/Protocol/Internal/Types/WorkDoneProgressCancelParams.hs view
@@ -0,0 +1,33 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkDoneProgressCancelParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data WorkDoneProgressCancelParams = WorkDoneProgressCancelParams +  { {-|+  The token to be used to report progress.+  -}+  _token :: Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON WorkDoneProgressCancelParams where+  toJSON (WorkDoneProgressCancelParams arg0) = Aeson.object $ concat $  [["token" Aeson..= arg0]]++instance Aeson.FromJSON WorkDoneProgressCancelParams where+  parseJSON = Aeson.withObject "WorkDoneProgressCancelParams" $ \arg -> WorkDoneProgressCancelParams <$> arg Aeson..: "token"
+ generated/Language/LSP/Protocol/Internal/Types/WorkDoneProgressCreateParams.hs view
@@ -0,0 +1,33 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkDoneProgressCreateParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data WorkDoneProgressCreateParams = WorkDoneProgressCreateParams +  { {-|+  The token to be used to report progress.+  -}+  _token :: Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON WorkDoneProgressCreateParams where+  toJSON (WorkDoneProgressCreateParams arg0) = Aeson.object $ concat $  [["token" Aeson..= arg0]]++instance Aeson.FromJSON WorkDoneProgressCreateParams where+  parseJSON = Aeson.withObject "WorkDoneProgressCreateParams" $ \arg -> WorkDoneProgressCreateParams <$> arg Aeson..: "token"
+ generated/Language/LSP/Protocol/Internal/Types/WorkDoneProgressEnd.hs view
@@ -0,0 +1,40 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkDoneProgressEnd where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Singletons++{-|++-}+data WorkDoneProgressEnd = WorkDoneProgressEnd +  { {-|++  -}+  _kind :: (Language.LSP.Protocol.Types.Singletons.AString "end")+  , {-|+  Optional, a final message indicating to for example indicate the outcome+  of the operation.+  -}+  _message :: (Maybe Data.Text.Text)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON WorkDoneProgressEnd where+  toJSON (WorkDoneProgressEnd arg0 arg1) = Aeson.object $ concat $  [["kind" Aeson..= arg0]+    ,"message" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON WorkDoneProgressEnd where+  parseJSON = Aeson.withObject "WorkDoneProgressEnd" $ \arg -> WorkDoneProgressEnd <$> arg Aeson..: "kind" <*> arg Aeson..:! "message"
+ generated/Language/LSP/Protocol/Internal/Types/WorkDoneProgressOptions.hs view
@@ -0,0 +1,32 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkDoneProgressOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data WorkDoneProgressOptions = WorkDoneProgressOptions +  { {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON WorkDoneProgressOptions where+  toJSON (WorkDoneProgressOptions arg0) = Aeson.object $ concat $  ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON WorkDoneProgressOptions where+  parseJSON = Aeson.withObject "WorkDoneProgressOptions" $ \arg -> WorkDoneProgressOptions <$> arg Aeson..:! "workDoneProgress"
+ generated/Language/LSP/Protocol/Internal/Types/WorkDoneProgressParams.hs view
@@ -0,0 +1,33 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkDoneProgressParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data WorkDoneProgressParams = WorkDoneProgressParams +  { {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON WorkDoneProgressParams where+  toJSON (WorkDoneProgressParams arg0) = Aeson.object $ concat $  ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON WorkDoneProgressParams where+  parseJSON = Aeson.withObject "WorkDoneProgressParams" $ \arg -> WorkDoneProgressParams <$> arg Aeson..:! "workDoneToken"
+ generated/Language/LSP/Protocol/Internal/Types/WorkDoneProgressReport.hs view
@@ -0,0 +1,61 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkDoneProgressReport where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Singletons++{-|++-}+data WorkDoneProgressReport = WorkDoneProgressReport +  { {-|++  -}+  _kind :: (Language.LSP.Protocol.Types.Singletons.AString "report")+  , {-|+  Controls enablement state of a cancel button.++  Clients that don't support cancellation or don't support controlling the button's+  enablement state are allowed to ignore the property.+  -}+  _cancellable :: (Maybe Bool)+  , {-|+  Optional, more detailed associated progress message. Contains+  complementary information to the `title`.++  Examples: "3/25 files", "project/src/module2", "node_modules/some_dep".+  If unset, the previous progress message (if any) is still valid.+  -}+  _message :: (Maybe Data.Text.Text)+  , {-|+  Optional progress percentage to display (value 100 is considered 100%).+  If not provided infinite progress is assumed and clients are allowed+  to ignore the `percentage` value in subsequent in report notifications.++  The value should be steadily rising. Clients are free to ignore values+  that are not following this rule. The value range is [0, 100]+  -}+  _percentage :: (Maybe Language.LSP.Protocol.Types.Common.UInt)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON WorkDoneProgressReport where+  toJSON (WorkDoneProgressReport arg0 arg1 arg2 arg3) = Aeson.object $ concat $  [["kind" Aeson..= arg0]+    ,"cancellable" Language.LSP.Protocol.Types.Common..=? arg1+    ,"message" Language.LSP.Protocol.Types.Common..=? arg2+    ,"percentage" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON WorkDoneProgressReport where+  parseJSON = Aeson.withObject "WorkDoneProgressReport" $ \arg -> WorkDoneProgressReport <$> arg Aeson..: "kind" <*> arg Aeson..:! "cancellable" <*> arg Aeson..:! "message" <*> arg Aeson..:! "percentage"
+ generated/Language/LSP/Protocol/Internal/Types/WorkspaceClientCapabilities.hs view
@@ -0,0 +1,131 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkspaceClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.CodeLensWorkspaceClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.DiagnosticWorkspaceClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.DidChangeConfigurationClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.ExecuteCommandClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.FileOperationClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.InlayHintWorkspaceClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.InlineValueWorkspaceClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensWorkspaceClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceEditClientCapabilities+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceSymbolClientCapabilities+import qualified Language.LSP.Protocol.Types.Common++{-|+Workspace specific client capabilities.+-}+data WorkspaceClientCapabilities = WorkspaceClientCapabilities +  { {-|+  The client supports applying batch edits+  to the workspace by supporting the request+  'workspace/applyEdit'+  -}+  _applyEdit :: (Maybe Bool)+  , {-|+  Capabilities specific to `WorkspaceEdit`s.+  -}+  _workspaceEdit :: (Maybe Language.LSP.Protocol.Internal.Types.WorkspaceEditClientCapabilities.WorkspaceEditClientCapabilities)+  , {-|+  Capabilities specific to the `workspace/didChangeConfiguration` notification.+  -}+  _didChangeConfiguration :: (Maybe Language.LSP.Protocol.Internal.Types.DidChangeConfigurationClientCapabilities.DidChangeConfigurationClientCapabilities)+  , {-|+  Capabilities specific to the `workspace/didChangeWatchedFiles` notification.+  -}+  _didChangeWatchedFiles :: (Maybe Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesClientCapabilities.DidChangeWatchedFilesClientCapabilities)+  , {-|+  Capabilities specific to the `workspace/symbol` request.+  -}+  _symbol :: (Maybe Language.LSP.Protocol.Internal.Types.WorkspaceSymbolClientCapabilities.WorkspaceSymbolClientCapabilities)+  , {-|+  Capabilities specific to the `workspace/executeCommand` request.+  -}+  _executeCommand :: (Maybe Language.LSP.Protocol.Internal.Types.ExecuteCommandClientCapabilities.ExecuteCommandClientCapabilities)+  , {-|+  The client has support for workspace folders.++  @since 3.6.0+  -}+  _workspaceFolders :: (Maybe Bool)+  , {-|+  The client supports `workspace/configuration` requests.++  @since 3.6.0+  -}+  _configuration :: (Maybe Bool)+  , {-|+  Capabilities specific to the semantic token requests scoped to the+  workspace.++  @since 3.16.0.+  -}+  _semanticTokens :: (Maybe Language.LSP.Protocol.Internal.Types.SemanticTokensWorkspaceClientCapabilities.SemanticTokensWorkspaceClientCapabilities)+  , {-|+  Capabilities specific to the code lens requests scoped to the+  workspace.++  @since 3.16.0.+  -}+  _codeLens :: (Maybe Language.LSP.Protocol.Internal.Types.CodeLensWorkspaceClientCapabilities.CodeLensWorkspaceClientCapabilities)+  , {-|+  The client has support for file notifications/requests for user operations on files.++  Since 3.16.0+  -}+  _fileOperations :: (Maybe Language.LSP.Protocol.Internal.Types.FileOperationClientCapabilities.FileOperationClientCapabilities)+  , {-|+  Capabilities specific to the inline values requests scoped to the+  workspace.++  @since 3.17.0.+  -}+  _inlineValue :: (Maybe Language.LSP.Protocol.Internal.Types.InlineValueWorkspaceClientCapabilities.InlineValueWorkspaceClientCapabilities)+  , {-|+  Capabilities specific to the inlay hint requests scoped to the+  workspace.++  @since 3.17.0.+  -}+  _inlayHint :: (Maybe Language.LSP.Protocol.Internal.Types.InlayHintWorkspaceClientCapabilities.InlayHintWorkspaceClientCapabilities)+  , {-|+  Capabilities specific to the diagnostic requests scoped to the+  workspace.++  @since 3.17.0.+  -}+  _diagnostics :: (Maybe Language.LSP.Protocol.Internal.Types.DiagnosticWorkspaceClientCapabilities.DiagnosticWorkspaceClientCapabilities)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON WorkspaceClientCapabilities where+  toJSON (WorkspaceClientCapabilities arg0 arg1 arg2 arg3 arg4 arg5 arg6 arg7 arg8 arg9 arg10 arg11 arg12 arg13) = Aeson.object $ concat $  ["applyEdit" Language.LSP.Protocol.Types.Common..=? arg0+    ,"workspaceEdit" Language.LSP.Protocol.Types.Common..=? arg1+    ,"didChangeConfiguration" Language.LSP.Protocol.Types.Common..=? arg2+    ,"didChangeWatchedFiles" Language.LSP.Protocol.Types.Common..=? arg3+    ,"symbol" Language.LSP.Protocol.Types.Common..=? arg4+    ,"executeCommand" Language.LSP.Protocol.Types.Common..=? arg5+    ,"workspaceFolders" Language.LSP.Protocol.Types.Common..=? arg6+    ,"configuration" Language.LSP.Protocol.Types.Common..=? arg7+    ,"semanticTokens" Language.LSP.Protocol.Types.Common..=? arg8+    ,"codeLens" Language.LSP.Protocol.Types.Common..=? arg9+    ,"fileOperations" Language.LSP.Protocol.Types.Common..=? arg10+    ,"inlineValue" Language.LSP.Protocol.Types.Common..=? arg11+    ,"inlayHint" Language.LSP.Protocol.Types.Common..=? arg12+    ,"diagnostics" Language.LSP.Protocol.Types.Common..=? arg13]++instance Aeson.FromJSON WorkspaceClientCapabilities where+  parseJSON = Aeson.withObject "WorkspaceClientCapabilities" $ \arg -> WorkspaceClientCapabilities <$> arg Aeson..:! "applyEdit" <*> arg Aeson..:! "workspaceEdit" <*> arg Aeson..:! "didChangeConfiguration" <*> arg Aeson..:! "didChangeWatchedFiles" <*> arg Aeson..:! "symbol" <*> arg Aeson..:! "executeCommand" <*> arg Aeson..:! "workspaceFolders" <*> arg Aeson..:! "configuration" <*> arg Aeson..:! "semanticTokens" <*> arg Aeson..:! "codeLens" <*> arg Aeson..:! "fileOperations" <*> arg Aeson..:! "inlineValue" <*> arg Aeson..:! "inlayHint" <*> arg Aeson..:! "diagnostics"
+ generated/Language/LSP/Protocol/Internal/Types/WorkspaceDiagnosticParams.hs view
@@ -0,0 +1,54 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.PreviousResultId+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Types.Common++{-|+Parameters of the workspace diagnostic request.++@since 3.17.0+-}+data WorkspaceDiagnosticParams = WorkspaceDiagnosticParams +  { {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  An optional token that a server can use to report partial results (e.g. streaming) to+  the client.+  -}+  _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  The additional identifier provided during registration.+  -}+  _identifier :: (Maybe Data.Text.Text)+  , {-|+  The currently known diagnostic reports with their+  previous result ids.+  -}+  _previousResultIds :: [Language.LSP.Protocol.Internal.Types.PreviousResultId.PreviousResultId]+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON WorkspaceDiagnosticParams where+  toJSON (WorkspaceDiagnosticParams arg0 arg1 arg2 arg3) = Aeson.object $ concat $  ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+    ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg1+    ,"identifier" Language.LSP.Protocol.Types.Common..=? arg2+    ,["previousResultIds" Aeson..= arg3]]++instance Aeson.FromJSON WorkspaceDiagnosticParams where+  parseJSON = Aeson.withObject "WorkspaceDiagnosticParams" $ \arg -> WorkspaceDiagnosticParams <$> arg Aeson..:! "workDoneToken" <*> arg Aeson..:! "partialResultToken" <*> arg Aeson..:! "identifier" <*> arg Aeson..: "previousResultIds"
+ generated/Language/LSP/Protocol/Internal/Types/WorkspaceDiagnosticReport.hs view
@@ -0,0 +1,35 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticReport where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceDocumentDiagnosticReport+import qualified Language.LSP.Protocol.Types.Common++{-|+A workspace diagnostic report.++@since 3.17.0+-}+data WorkspaceDiagnosticReport = WorkspaceDiagnosticReport +  { {-|++  -}+  _items :: [Language.LSP.Protocol.Internal.Types.WorkspaceDocumentDiagnosticReport.WorkspaceDocumentDiagnosticReport]+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON WorkspaceDiagnosticReport where+  toJSON (WorkspaceDiagnosticReport arg0) = Aeson.object $ concat $  [["items" Aeson..= arg0]]++instance Aeson.FromJSON WorkspaceDiagnosticReport where+  parseJSON = Aeson.withObject "WorkspaceDiagnosticReport" $ \arg -> WorkspaceDiagnosticReport <$> arg Aeson..: "items"
+ generated/Language/LSP/Protocol/Internal/Types/WorkspaceDiagnosticReportPartialResult.hs view
@@ -0,0 +1,35 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticReportPartialResult where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceDocumentDiagnosticReport+import qualified Language.LSP.Protocol.Types.Common++{-|+A partial result for a workspace diagnostic report.++@since 3.17.0+-}+data WorkspaceDiagnosticReportPartialResult = WorkspaceDiagnosticReportPartialResult +  { {-|++  -}+  _items :: [Language.LSP.Protocol.Internal.Types.WorkspaceDocumentDiagnosticReport.WorkspaceDocumentDiagnosticReport]+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON WorkspaceDiagnosticReportPartialResult where+  toJSON (WorkspaceDiagnosticReportPartialResult arg0) = Aeson.object $ concat $  [["items" Aeson..= arg0]]++instance Aeson.FromJSON WorkspaceDiagnosticReportPartialResult where+  parseJSON = Aeson.withObject "WorkspaceDiagnosticReportPartialResult" $ \arg -> WorkspaceDiagnosticReportPartialResult <$> arg Aeson..: "items"
+ generated/Language/LSP/Protocol/Internal/Types/WorkspaceDocumentDiagnosticReport.hs view
@@ -0,0 +1,26 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkspaceDocumentDiagnosticReport where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceFullDocumentDiagnosticReport+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceUnchangedDocumentDiagnosticReport+import qualified Language.LSP.Protocol.Types.Common++{-|+A workspace diagnostic document report.++@since 3.17.0+-}+newtype WorkspaceDocumentDiagnosticReport = WorkspaceDocumentDiagnosticReport (Language.LSP.Protocol.Internal.Types.WorkspaceFullDocumentDiagnosticReport.WorkspaceFullDocumentDiagnosticReport Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.WorkspaceUnchangedDocumentDiagnosticReport.WorkspaceUnchangedDocumentDiagnosticReport)+  deriving newtype (Aeson.ToJSON, Aeson.FromJSON)+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)
+ generated/Language/LSP/Protocol/Internal/Types/WorkspaceEdit.hs view
@@ -0,0 +1,76 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkspaceEdit where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Map+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.ChangeAnnotation+import qualified Language.LSP.Protocol.Internal.Types.ChangeAnnotationIdentifier+import qualified Language.LSP.Protocol.Internal.Types.CreateFile+import qualified Language.LSP.Protocol.Internal.Types.DeleteFile+import qualified Language.LSP.Protocol.Internal.Types.RenameFile+import qualified Language.LSP.Protocol.Internal.Types.TextDocumentEdit+import qualified Language.LSP.Protocol.Internal.Types.TextEdit+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+A workspace edit represents changes to many resources managed in the workspace. The edit+should either provide `changes` or `documentChanges`. If documentChanges are present+they are preferred over `changes` if the client can handle versioned document edits.++Since version 3.13.0 a workspace edit can contain resource operations as well. If resource+operations are present clients need to execute the operations in the order in which they+are provided. So a workspace edit for example can consist of the following two changes:+(1) a create file a.txt and (2) a text document edit which insert text into file a.txt.++An invalid sequence (e.g. (1) delete file a.txt and (2) insert text into file a.txt) will+cause failure of the operation. How the client recovers from the failure is described by+the client capability: `workspace.workspaceEdit.failureHandling`+-}+data WorkspaceEdit = WorkspaceEdit +  { {-|+  Holds changes to existing resources.+  -}+  _changes :: (Maybe (Data.Map.Map Language.LSP.Protocol.Types.Uri.Uri [Language.LSP.Protocol.Internal.Types.TextEdit.TextEdit]))+  , {-|+  Depending on the client capability `workspace.workspaceEdit.resourceOperations` document changes+  are either an array of `TextDocumentEdit`s to express changes to n different text documents+  where each text document edit addresses a specific version of a text document. Or it can contain+  above `TextDocumentEdit`s mixed with create, rename and delete file / folder operations.++  Whether a client supports versioned document edits is expressed via+  `workspace.workspaceEdit.documentChanges` client capability.++  If a client neither supports `documentChanges` nor `workspace.workspaceEdit.resourceOperations` then+  only plain `TextEdit`s using the `changes` property are supported.+  -}+  _documentChanges :: (Maybe [(Language.LSP.Protocol.Internal.Types.TextDocumentEdit.TextDocumentEdit Language.LSP.Protocol.Types.Common.|? (Language.LSP.Protocol.Internal.Types.CreateFile.CreateFile Language.LSP.Protocol.Types.Common.|? (Language.LSP.Protocol.Internal.Types.RenameFile.RenameFile Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.DeleteFile.DeleteFile)))])+  , {-|+  A map of change annotations that can be referenced in `AnnotatedTextEdit`s or create, rename and+  delete file / folder operations.++  Whether clients honor this property depends on the client capability `workspace.changeAnnotationSupport`.++  @since 3.16.0+  -}+  _changeAnnotations :: (Maybe (Data.Map.Map Language.LSP.Protocol.Internal.Types.ChangeAnnotationIdentifier.ChangeAnnotationIdentifier Language.LSP.Protocol.Internal.Types.ChangeAnnotation.ChangeAnnotation))+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON WorkspaceEdit where+  toJSON (WorkspaceEdit arg0 arg1 arg2) = Aeson.object $ concat $  ["changes" Language.LSP.Protocol.Types.Common..=? arg0+    ,"documentChanges" Language.LSP.Protocol.Types.Common..=? arg1+    ,"changeAnnotations" Language.LSP.Protocol.Types.Common..=? arg2]++instance Aeson.FromJSON WorkspaceEdit where+  parseJSON = Aeson.withObject "WorkspaceEdit" $ \arg -> WorkspaceEdit <$> arg Aeson..:! "changes" <*> arg Aeson..:! "documentChanges" <*> arg Aeson..:! "changeAnnotations"
+ generated/Language/LSP/Protocol/Internal/Types/WorkspaceEditClientCapabilities.hs view
@@ -0,0 +1,70 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkspaceEditClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row as Row+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.FailureHandlingKind+import qualified Language.LSP.Protocol.Internal.Types.ResourceOperationKind+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data WorkspaceEditClientCapabilities = WorkspaceEditClientCapabilities +  { {-|+  The client supports versioned document changes in `WorkspaceEdit`s+  -}+  _documentChanges :: (Maybe Bool)+  , {-|+  The resource operations the client supports. Clients should at least+  support 'create', 'rename' and 'delete' files and folders.++  @since 3.13.0+  -}+  _resourceOperations :: (Maybe [Language.LSP.Protocol.Internal.Types.ResourceOperationKind.ResourceOperationKind])+  , {-|+  The failure handling strategy of a client if applying the workspace edit+  fails.++  @since 3.13.0+  -}+  _failureHandling :: (Maybe Language.LSP.Protocol.Internal.Types.FailureHandlingKind.FailureHandlingKind)+  , {-|+  Whether the client normalizes line endings to the client specific+  setting.+  If set to `true` the client will normalize line ending characters+  in a workspace edit to the client-specified new line+  character.++  @since 3.16.0+  -}+  _normalizesLineEndings :: (Maybe Bool)+  , {-|+  Whether the client in general supports change annotations on text edits,+  create file, rename file and delete file changes.++  @since 3.16.0+  -}+  _changeAnnotationSupport :: (Maybe (Row.Rec ("groupsOnLabel" Row..== (Maybe Bool) Row..+ Row.Empty)))+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON WorkspaceEditClientCapabilities where+  toJSON (WorkspaceEditClientCapabilities arg0 arg1 arg2 arg3 arg4) = Aeson.object $ concat $  ["documentChanges" Language.LSP.Protocol.Types.Common..=? arg0+    ,"resourceOperations" Language.LSP.Protocol.Types.Common..=? arg1+    ,"failureHandling" Language.LSP.Protocol.Types.Common..=? arg2+    ,"normalizesLineEndings" Language.LSP.Protocol.Types.Common..=? arg3+    ,"changeAnnotationSupport" Language.LSP.Protocol.Types.Common..=? arg4]++instance Aeson.FromJSON WorkspaceEditClientCapabilities where+  parseJSON = Aeson.withObject "WorkspaceEditClientCapabilities" $ \arg -> WorkspaceEditClientCapabilities <$> arg Aeson..:! "documentChanges" <*> arg Aeson..:! "resourceOperations" <*> arg Aeson..:! "failureHandling" <*> arg Aeson..:! "normalizesLineEndings" <*> arg Aeson..:! "changeAnnotationSupport"
+ generated/Language/LSP/Protocol/Internal/Types/WorkspaceFolder.hs view
@@ -0,0 +1,40 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkspaceFolder where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+A workspace folder inside a client.+-}+data WorkspaceFolder = WorkspaceFolder +  { {-|+  The associated URI for this workspace folder.+  -}+  _uri :: Language.LSP.Protocol.Types.Uri.Uri+  , {-|+  The name of the workspace folder. Used to refer to this+  workspace folder in the user interface.+  -}+  _name :: Data.Text.Text+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON WorkspaceFolder where+  toJSON (WorkspaceFolder arg0 arg1) = Aeson.object $ concat $  [["uri" Aeson..= arg0]+    ,["name" Aeson..= arg1]]++instance Aeson.FromJSON WorkspaceFolder where+  parseJSON = Aeson.withObject "WorkspaceFolder" $ \arg -> WorkspaceFolder <$> arg Aeson..: "uri" <*> arg Aeson..: "name"
+ generated/Language/LSP/Protocol/Internal/Types/WorkspaceFoldersChangeEvent.hs view
@@ -0,0 +1,38 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkspaceFoldersChangeEvent where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceFolder+import qualified Language.LSP.Protocol.Types.Common++{-|+The workspace folder change event.+-}+data WorkspaceFoldersChangeEvent = WorkspaceFoldersChangeEvent +  { {-|+  The array of added workspace folders+  -}+  _added :: [Language.LSP.Protocol.Internal.Types.WorkspaceFolder.WorkspaceFolder]+  , {-|+  The array of the removed workspace folders+  -}+  _removed :: [Language.LSP.Protocol.Internal.Types.WorkspaceFolder.WorkspaceFolder]+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON WorkspaceFoldersChangeEvent where+  toJSON (WorkspaceFoldersChangeEvent arg0 arg1) = Aeson.object $ concat $  [["added" Aeson..= arg0]+    ,["removed" Aeson..= arg1]]++instance Aeson.FromJSON WorkspaceFoldersChangeEvent where+  parseJSON = Aeson.withObject "WorkspaceFoldersChangeEvent" $ \arg -> WorkspaceFoldersChangeEvent <$> arg Aeson..: "added" <*> arg Aeson..: "removed"
+ generated/Language/LSP/Protocol/Internal/Types/WorkspaceFoldersInitializeParams.hs view
@@ -0,0 +1,39 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkspaceFoldersInitializeParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Internal.Types.WorkspaceFolder+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data WorkspaceFoldersInitializeParams = WorkspaceFoldersInitializeParams +  { {-|+  The workspace folders configured in the client when the server starts.++  This property is only available if the client supports workspace folders.+  It can be `null` if the client supports workspace folders but none are+  configured.++  @since 3.6.0+  -}+  _workspaceFolders :: (Maybe ([Language.LSP.Protocol.Internal.Types.WorkspaceFolder.WorkspaceFolder] Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null))+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON WorkspaceFoldersInitializeParams where+  toJSON (WorkspaceFoldersInitializeParams arg0) = Aeson.object $ concat $  ["workspaceFolders" Language.LSP.Protocol.Types.Common..=? arg0]++instance Aeson.FromJSON WorkspaceFoldersInitializeParams where+  parseJSON = Aeson.withObject "WorkspaceFoldersInitializeParams" $ \arg -> WorkspaceFoldersInitializeParams <$> arg Aeson..:! "workspaceFolders"
+ generated/Language/LSP/Protocol/Internal/Types/WorkspaceFoldersServerCapabilities.hs view
@@ -0,0 +1,44 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkspaceFoldersServerCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common++{-|++-}+data WorkspaceFoldersServerCapabilities = WorkspaceFoldersServerCapabilities +  { {-|+  The server has support for workspace folders+  -}+  _supported :: (Maybe Bool)+  , {-|+  Whether the server wants to receive workspace folder+  change notifications.++  If a string is provided the string is treated as an ID+  under which the notification is registered on the client+  side. The ID can be used to unregister for these events+  using the `client/unregisterCapability` request.+  -}+  _changeNotifications :: (Maybe (Data.Text.Text Language.LSP.Protocol.Types.Common.|? Bool))+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON WorkspaceFoldersServerCapabilities where+  toJSON (WorkspaceFoldersServerCapabilities arg0 arg1) = Aeson.object $ concat $  ["supported" Language.LSP.Protocol.Types.Common..=? arg0+    ,"changeNotifications" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON WorkspaceFoldersServerCapabilities where+  parseJSON = Aeson.withObject "WorkspaceFoldersServerCapabilities" $ \arg -> WorkspaceFoldersServerCapabilities <$> arg Aeson..:! "supported" <*> arg Aeson..:! "changeNotifications"
+ generated/Language/LSP/Protocol/Internal/Types/WorkspaceFullDocumentDiagnosticReport.hs view
@@ -0,0 +1,61 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkspaceFullDocumentDiagnosticReport where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Diagnostic+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Singletons+import qualified Language.LSP.Protocol.Types.Uri++{-|+A full document diagnostic report for a workspace diagnostic result.++@since 3.17.0+-}+data WorkspaceFullDocumentDiagnosticReport = WorkspaceFullDocumentDiagnosticReport +  { {-|+  A full document diagnostic report.+  -}+  _kind :: (Language.LSP.Protocol.Types.Singletons.AString "full")+  , {-|+  An optional result id. If provided it will+  be sent on the next diagnostic request for the+  same document.+  -}+  _resultId :: (Maybe Data.Text.Text)+  , {-|+  The actual items.+  -}+  _items :: [Language.LSP.Protocol.Internal.Types.Diagnostic.Diagnostic]+  , {-|+  The URI for which diagnostic information is reported.+  -}+  _uri :: Language.LSP.Protocol.Types.Uri.Uri+  , {-|+  The version number for which the diagnostics are reported.+  If the document is not marked as open `null` can be provided.+  -}+  _version :: (Language.LSP.Protocol.Types.Common.Int32 Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON WorkspaceFullDocumentDiagnosticReport where+  toJSON (WorkspaceFullDocumentDiagnosticReport arg0 arg1 arg2 arg3 arg4) = Aeson.object $ concat $  [["kind" Aeson..= arg0]+    ,"resultId" Language.LSP.Protocol.Types.Common..=? arg1+    ,["items" Aeson..= arg2]+    ,["uri" Aeson..= arg3]+    ,["version" Aeson..= arg4]]++instance Aeson.FromJSON WorkspaceFullDocumentDiagnosticReport where+  parseJSON = Aeson.withObject "WorkspaceFullDocumentDiagnosticReport" $ \arg -> WorkspaceFullDocumentDiagnosticReport <$> arg Aeson..: "kind" <*> arg Aeson..:! "resultId" <*> arg Aeson..: "items" <*> arg Aeson..: "uri" <*> arg Aeson..: "version"
+ generated/Language/LSP/Protocol/Internal/Types/WorkspaceSymbol.hs view
@@ -0,0 +1,78 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkspaceSymbol where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson+import qualified Data.Aeson as Aeson+import qualified Data.Row as Row+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.Location+import qualified Language.LSP.Protocol.Internal.Types.SymbolKind+import qualified Language.LSP.Protocol.Internal.Types.SymbolTag+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Uri++{-|+A special workspace symbol that supports locations without a range.++See also SymbolInformation.++@since 3.17.0+-}+data WorkspaceSymbol = WorkspaceSymbol +  { {-|+  The name of this symbol.+  -}+  _name :: Data.Text.Text+  , {-|+  The kind of this symbol.+  -}+  _kind :: Language.LSP.Protocol.Internal.Types.SymbolKind.SymbolKind+  , {-|+  Tags for this symbol.++  @since 3.16.0+  -}+  _tags :: (Maybe [Language.LSP.Protocol.Internal.Types.SymbolTag.SymbolTag])+  , {-|+  The name of the symbol containing this symbol. This information is for+  user interface purposes (e.g. to render a qualifier in the user interface+  if necessary). It can't be used to re-infer a hierarchy for the document+  symbols.+  -}+  _containerName :: (Maybe Data.Text.Text)+  , {-|+  The location of the symbol. Whether a server is allowed to+  return a location without a range depends on the client+  capability `workspace.symbol.resolveSupport`.++  See SymbolInformation#location for more details.+  -}+  _location :: (Language.LSP.Protocol.Internal.Types.Location.Location Language.LSP.Protocol.Types.Common.|? (Row.Rec ("uri" Row..== Language.LSP.Protocol.Types.Uri.Uri Row..+ Row.Empty)))+  , {-|+  A data entry field that is preserved on a workspace symbol between a+  workspace symbol request and a workspace symbol resolve request.+  -}+  _data_ :: (Maybe Data.Aeson.Value)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON WorkspaceSymbol where+  toJSON (WorkspaceSymbol arg0 arg1 arg2 arg3 arg4 arg5) = Aeson.object $ concat $  [["name" Aeson..= arg0]+    ,["kind" Aeson..= arg1]+    ,"tags" Language.LSP.Protocol.Types.Common..=? arg2+    ,"containerName" Language.LSP.Protocol.Types.Common..=? arg3+    ,["location" Aeson..= arg4]+    ,"data" Language.LSP.Protocol.Types.Common..=? arg5]++instance Aeson.FromJSON WorkspaceSymbol where+  parseJSON = Aeson.withObject "WorkspaceSymbol" $ \arg -> WorkspaceSymbol <$> arg Aeson..: "name" <*> arg Aeson..: "kind" <*> arg Aeson..:! "tags" <*> arg Aeson..:! "containerName" <*> arg Aeson..: "location" <*> arg Aeson..:! "data"
+ generated/Language/LSP/Protocol/Internal/Types/WorkspaceSymbolClientCapabilities.hs view
@@ -0,0 +1,58 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkspaceSymbolClientCapabilities where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row as Row+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.SymbolKind+import qualified Language.LSP.Protocol.Internal.Types.SymbolTag+import qualified Language.LSP.Protocol.Types.Common++{-|+Client capabilities for a `WorkspaceSymbolRequest`.+-}+data WorkspaceSymbolClientCapabilities = WorkspaceSymbolClientCapabilities +  { {-|+  Symbol request supports dynamic registration.+  -}+  _dynamicRegistration :: (Maybe Bool)+  , {-|+  Specific capabilities for the `SymbolKind` in the `workspace/symbol` request.+  -}+  _symbolKind :: (Maybe (Row.Rec ("valueSet" Row..== (Maybe [Language.LSP.Protocol.Internal.Types.SymbolKind.SymbolKind]) Row..+ Row.Empty)))+  , {-|+  The client supports tags on `SymbolInformation`.+  Clients supporting tags have to handle unknown tags gracefully.++  @since 3.16.0+  -}+  _tagSupport :: (Maybe (Row.Rec ("valueSet" Row..== [Language.LSP.Protocol.Internal.Types.SymbolTag.SymbolTag] Row..+ Row.Empty)))+  , {-|+  The client support partial workspace symbols. The client will send the+  request `workspaceSymbol/resolve` to the server to resolve additional+  properties.++  @since 3.17.0+  -}+  _resolveSupport :: (Maybe (Row.Rec ("properties" Row..== [Data.Text.Text] Row..+ Row.Empty)))+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON WorkspaceSymbolClientCapabilities where+  toJSON (WorkspaceSymbolClientCapabilities arg0 arg1 arg2 arg3) = Aeson.object $ concat $  ["dynamicRegistration" Language.LSP.Protocol.Types.Common..=? arg0+    ,"symbolKind" Language.LSP.Protocol.Types.Common..=? arg1+    ,"tagSupport" Language.LSP.Protocol.Types.Common..=? arg2+    ,"resolveSupport" Language.LSP.Protocol.Types.Common..=? arg3]++instance Aeson.FromJSON WorkspaceSymbolClientCapabilities where+  parseJSON = Aeson.withObject "WorkspaceSymbolClientCapabilities" $ \arg -> WorkspaceSymbolClientCapabilities <$> arg Aeson..:! "dynamicRegistration" <*> arg Aeson..:! "symbolKind" <*> arg Aeson..:! "tagSupport" <*> arg Aeson..:! "resolveSupport"
+ generated/Language/LSP/Protocol/Internal/Types/WorkspaceSymbolOptions.hs view
@@ -0,0 +1,40 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkspaceSymbolOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Server capabilities for a `WorkspaceSymbolRequest`.+-}+data WorkspaceSymbolOptions = WorkspaceSymbolOptions +  { {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  , {-|+  The server provides support to resolve additional+  information for a workspace symbol.++  @since 3.17.0+  -}+  _resolveProvider :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON WorkspaceSymbolOptions where+  toJSON (WorkspaceSymbolOptions arg0 arg1) = Aeson.object $ concat $  ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0+    ,"resolveProvider" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON WorkspaceSymbolOptions where+  parseJSON = Aeson.withObject "WorkspaceSymbolOptions" $ \arg -> WorkspaceSymbolOptions <$> arg Aeson..:! "workDoneProgress" <*> arg Aeson..:! "resolveProvider"
+ generated/Language/LSP/Protocol/Internal/Types/WorkspaceSymbolParams.hs view
@@ -0,0 +1,46 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkspaceSymbolParams where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Internal.Types.ProgressToken+import qualified Language.LSP.Protocol.Types.Common++{-|+The parameters of a `WorkspaceSymbolRequest`.+-}+data WorkspaceSymbolParams = WorkspaceSymbolParams +  { {-|+  An optional token that a server can use to report work done progress.+  -}+  _workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  An optional token that a server can use to report partial results (e.g. streaming) to+  the client.+  -}+  _partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)+  , {-|+  A query string to filter symbols by. Clients may send an empty+  string here to request all symbols.+  -}+  _query :: Data.Text.Text+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON WorkspaceSymbolParams where+  toJSON (WorkspaceSymbolParams arg0 arg1 arg2) = Aeson.object $ concat $  ["workDoneToken" Language.LSP.Protocol.Types.Common..=? arg0+    ,"partialResultToken" Language.LSP.Protocol.Types.Common..=? arg1+    ,["query" Aeson..= arg2]]++instance Aeson.FromJSON WorkspaceSymbolParams where+  parseJSON = Aeson.withObject "WorkspaceSymbolParams" $ \arg -> WorkspaceSymbolParams <$> arg Aeson..:! "workDoneToken" <*> arg Aeson..:! "partialResultToken" <*> arg Aeson..: "query"
+ generated/Language/LSP/Protocol/Internal/Types/WorkspaceSymbolRegistrationOptions.hs view
@@ -0,0 +1,40 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkspaceSymbolRegistrationOptions where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Language.LSP.Protocol.Types.Common++{-|+Registration options for a `WorkspaceSymbolRequest`.+-}+data WorkspaceSymbolRegistrationOptions = WorkspaceSymbolRegistrationOptions +  { {-|++  -}+  _workDoneProgress :: (Maybe Bool)+  , {-|+  The server provides support to resolve additional+  information for a workspace symbol.++  @since 3.17.0+  -}+  _resolveProvider :: (Maybe Bool)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON WorkspaceSymbolRegistrationOptions where+  toJSON (WorkspaceSymbolRegistrationOptions arg0 arg1) = Aeson.object $ concat $  ["workDoneProgress" Language.LSP.Protocol.Types.Common..=? arg0+    ,"resolveProvider" Language.LSP.Protocol.Types.Common..=? arg1]++instance Aeson.FromJSON WorkspaceSymbolRegistrationOptions where+  parseJSON = Aeson.withObject "WorkspaceSymbolRegistrationOptions" $ \arg -> WorkspaceSymbolRegistrationOptions <$> arg Aeson..:! "workDoneProgress" <*> arg Aeson..:! "resolveProvider"
+ generated/Language/LSP/Protocol/Internal/Types/WorkspaceUnchangedDocumentDiagnosticReport.hs view
@@ -0,0 +1,57 @@+-- THIS IS A GENERATED FILE, DO NOT EDIT++{-# OPTIONS_GHC -Wno-unused-imports #-}+{-# OPTIONS_GHC -Wno-unused-matches #-}+{-# OPTIONS_GHC -Wno-deprecations #-}+module Language.LSP.Protocol.Internal.Types.WorkspaceUnchangedDocumentDiagnosticReport where++import Control.DeepSeq+import Data.Hashable+import GHC.Generics+import qualified Data.Aeson as Aeson+import qualified Data.Row.Aeson as Aeson+import qualified Data.Row.Hashable as Hashable+import qualified Data.Text+import qualified Language.LSP.Protocol.Types.Common+import qualified Language.LSP.Protocol.Types.Singletons+import qualified Language.LSP.Protocol.Types.Uri++{-|+An unchanged document diagnostic report for a workspace diagnostic result.++@since 3.17.0+-}+data WorkspaceUnchangedDocumentDiagnosticReport = WorkspaceUnchangedDocumentDiagnosticReport +  { {-|+  A document diagnostic report indicating+  no changes to the last result. A server can+  only return `unchanged` if result ids are+  provided.+  -}+  _kind :: (Language.LSP.Protocol.Types.Singletons.AString "unchanged")+  , {-|+  A result id which will be sent on the next+  diagnostic request for the same document.+  -}+  _resultId :: Data.Text.Text+  , {-|+  The URI for which diagnostic information is reported.+  -}+  _uri :: Language.LSP.Protocol.Types.Uri.Uri+  , {-|+  The version number for which the diagnostics are reported.+  If the document is not marked as open `null` can be provided.+  -}+  _version :: (Language.LSP.Protocol.Types.Common.Int32 Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)+  }+  deriving stock (Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)++instance Aeson.ToJSON WorkspaceUnchangedDocumentDiagnosticReport where+  toJSON (WorkspaceUnchangedDocumentDiagnosticReport arg0 arg1 arg2 arg3) = Aeson.object $ concat $  [["kind" Aeson..= arg0]+    ,["resultId" Aeson..= arg1]+    ,["uri" Aeson..= arg2]+    ,["version" Aeson..= arg3]]++instance Aeson.FromJSON WorkspaceUnchangedDocumentDiagnosticReport where+  parseJSON = Aeson.withObject "WorkspaceUnchangedDocumentDiagnosticReport" $ \arg -> WorkspaceUnchangedDocumentDiagnosticReport <$> arg Aeson..: "kind" <*> arg Aeson..: "resultId" <*> arg Aeson..: "uri" <*> arg Aeson..: "version"
+ generator/CodeGen.hs view
@@ -0,0 +1,980 @@+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE ViewPatterns #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE QuasiQuotes #-}+{- | The main module for generating code from the metamodel++See Note [Code generation approach] for why we do it this way.+-}+module CodeGen where++import qualified Data.Text as T+import qualified Data.Map as Map+import qualified Data.Set as Set+import qualified Text.RE.Replace as RE+import qualified Text.RE.TDFA.Text as RE+import Language.LSP.MetaModel as MM+import Control.Monad.Reader+import Control.Monad.Writer+import Prettyprinter+import Data.Traversable+import Data.Foldable+import System.FilePath+import System.Directory+import qualified Data.Text.IO as T+import Data.List (sort, intersperse)+import Data.Maybe (maybeToList, fromMaybe, catMaybes, mapMaybe)+import Data.Function++-- | A mapping from names in the metamodel to their names in the generated Haskell.+type SymbolTable = Map.Map T.Text T.Text++-- | A mapping from names in the metamodel to their structure definition, used for chasing+-- supertypes.+type StructTable = Map.Map T.Text Structure++data CodeGenEnv = CodeGenEnv {+  symbolTable :: SymbolTable+  , structTable :: StructTable+  , modulePrefix :: T.Text+  , outputDir :: FilePath+  }++-- | Monad for running overall code generation in, has access to the environment and settings.+type CodeGenM = ReaderT CodeGenEnv IO+-- | Monad for running module generation in, the same as 'CodeGenM' with the ability to record imports.+type ModuleGenM = WriterT (Set.Set T.Text) CodeGenM++typesModSegment :: T.Text+typesModSegment = "Types"++pragma :: T.Text -> Doc ann -> Doc ann+pragma kind doc = "{-#" <+> pretty kind <+> doc <+> "#-}"++-- comment out Generic for a faster build...+toStockDerive :: [T.Text]+toStockDerive = ["Show", "Eq", "Ord", "Generic"]++toAnyclassDerive :: [T.Text]+toAnyclassDerive = ["NFData", "Hashable"]++indentSize :: Int+indentSize = 2++optDeprecated :: T.Text -> Maybe T.Text -> [Doc ann]+optDeprecated name mreason = case mreason of+  Just reason -> ["{-# DEPRECATED" <+> pretty name <+> dquotes (pretty reason) <+> "#-}"]+  Nothing -> []++-- TODO: since and proposed are a mess, figure out whether there's a useful way to include them+mkDocumentation :: Maybe T.Text -> Maybe T.Text -> Maybe Bool -> ModuleGenM (Maybe T.Text)+mkDocumentation (Just doc) _since proposed = Just <$> fixupDocumentation doc+mkDocumentation Nothing _since proposed = pure Nothing++fixupDocumentation :: T.Text -> ModuleGenM T.Text+fixupDocumentation t = do+  -- TODO: use the symbol table to map these to the actual entity names+  let+    fixupJSDocLinks t = RE.replaceAll "`$1`" (t RE.*=~ [RE.re|{@link[[:space:]]+$([[:word:].]+).*}|])+    fixupMarkdownLinks t = RE.replaceAll "`$1`" $ t RE.*=~ [RE.re|\[[[:word:].]+\][[:space:]]*\(#$([[:word:].]+)\)|]+  let t' = fixupJSDocLinks t+  let t'' = fixupMarkdownLinks t'+  pure t''++multilineHaddock :: Doc ann -> Doc ann+multilineHaddock doc = vsep [ "{-|", doc , "-}" ]++genModule :: forall ann . T.Text -> [T.Text] -> Maybe [T.Text] -> ModuleGenM (Doc ann) -> CodeGenM T.Text+genModule name pragmas mexports action = do+  (doc, imports) <- runWriterT action+  mp <- asks modulePrefix+  dir <- asks outputDir+  let+      -- these are both common in the generated code+      ghcOptions :: [T.Text] = ["-Wno-unused-imports", "-Wno-unused-matches", "-Wno-deprecations"]+      fullModName = mp <> "." <> name+      warning = "-- THIS IS A GENERATED FILE, DO NOT EDIT"+      pragmaSection = hardvcat (fmap (\p -> "{-#" <+> "LANGUAGE" <+> pretty p <+> "#-}") pragmas)+      optionsSection = hardvcat (fmap (\p -> "{-#" <+> "OPTIONS_GHC" <+> pretty p <+> "#-}") ghcOptions)+      header = case mexports of+        Just exports -> "module" <+> pretty fullModName <+> parens (cat $ punctuate "," (fmap pretty exports)) <+> "where"+        Nothing -> "module" <+> pretty fullModName <+> "where"+      -- TODO: replace with regex+      isSelfImport imp = (" " <> fullModName <> " ") `T.isInfixOf` imp || (" " <> fullModName) `T.isSuffixOf` imp+      importSection = hardvcat (fmap pretty $ filter (not . isSelfImport) $ toList imports)+      mod = warning <> hardline+          <> pragmaSection <> hardline+          <> optionsSection <> hardline+          <> header <> hardline <> hardline+          <> importSection +          <> hardline <> hardline +          <> doc <> hardline+      printed = T.pack $ show mod++      modSegments = T.unpack <$> T.splitOn "." fullModName+      modulePath = foldl (</>) dir modSegments <.> "hs"++  lift $ createDirectoryIfMissing True $ takeDirectory modulePath+  lift $ T.writeFile modulePath printed+  pure fullModName++data Qualification = Unqual | Qual | QualAs T.Text | As T.Text++ensureImport :: T.Text -> Qualification -> ModuleGenM T.Text+ensureImport mod Unqual = tell (Set.singleton $ "import " <> mod) >> pure mod+ensureImport mod Qual = tell (Set.singleton $ "import qualified " <> mod) >> pure mod+ensureImport mod (QualAs qual) = tell (Set.singleton $ "import qualified " <> mod <> " as " <> qual) >> pure qual+ensureImport mod (As qual) = tell (Set.singleton $ "import " <> mod <> " as " <> qual) >> pure qual++ensureLSPImport :: T.Text -> Qualification -> ModuleGenM T.Text+ensureLSPImport mod qual = do+  mp <- asks modulePrefix+  ensureImport (mp <> "." <> mod) qual++entityName :: T.Text -> T.Text -> ModuleGenM T.Text+entityName mod n = do+  qual <- ensureImport mod Qual+  pure $ qual <> "." <> n++lspEntityName :: T.Text -> T.Text -> ModuleGenM T.Text+lspEntityName mod n = do+  qual <- ensureLSPImport mod Qual+  pure $ qual <> "." <> n++genFromMetaModel :: T.Text -> FilePath -> MetaModel -> IO ()+genFromMetaModel prefix dir mm = do+  let (symbolTable, structTable) = buildTables mm+  flip runReaderT (CodeGenEnv symbolTable structTable prefix dir) $ do+    structModuleNames <- traverse genStruct (structures mm)+    -- Don't even generate LSPAny, LSPObject, or LSPArry+    aliasModuleNames <- traverse genAlias (filter (\TypeAlias{name} -> name `notElem` ["LSPAny", "LSPObject", "LSPArray"]) (typeAliases mm))+    enumModuleNames <- traverse genEnum (enumerations mm)+    methodModuleName <- genMethods (requests mm) (notifications mm)+    -- not the methods, we export them separately!+    genAllModule $ sort $ concat [structModuleNames, aliasModuleNames, enumModuleNames]+    -- Have to use the string form of the generated Name+    -- since we might have mangled the original name+    let structNames = mapMaybe (\Structure{name} -> Map.lookup name symbolTable) (structures mm)+    genLensModule structNames+    pure ()+  pure ()+-- | Names we can't put in Haskell code.+reservedNames :: Set.Set T.Text+reservedNames = Set.fromList [ "data", "type" ]++-- | Sanitize a name so we can use it in Haskell.+sanitizeName :: T.Text -> T.Text+sanitizeName n =+  -- Names can't start with underscores! Replace that with a 'U' for lack+  -- of a better idea+  let n' = if "_" `T.isPrefixOf` n then T.cons 'U' $ T.tail n else n+  -- Names can't have '$'s! Just throw them away.+      n'' = T.filter (\c -> c /= '$') n'+  -- If we end up with a reserved name, suffix with an underscore. This+  -- relibly gets us something recognizable, rather than trying to systematize+  -- the conversion of 'type' into 'tpe' or similar.+      n''' = if n'' `Set.member` reservedNames then n'' <> "_" else n''+  in n'''++-- | Make a name to be used at the top-level (i.e. not as a member of anything).+makeToplevelName :: T.Text -> T.Text+makeToplevelName n = capitalize $ sanitizeName n++-- | Make a name for a constructor, optionally including a contextual name to qualify it with.+makeConstrName :: Maybe T.Text -> T.Text -> T.Text+makeConstrName context n =+  let+    cap = capitalize n+    disambiguated = case context of { Just t -> t <> "_" <> cap; Nothing -> cap }+  in sanitizeName disambiguated++-- | Make a name for a field.+makeFieldName :: T.Text -> T.Text+makeFieldName n = "_" <> sanitizeName n++buildTables :: MetaModel -> (SymbolTable, StructTable)+buildTables (MetaModel{structures, enumerations, typeAliases}) =+  let bothEntries = flip fmap structures $ \s@Structure{name} ->+        ((name, makeToplevelName name), (name, s))+      (entries, sentries) = unzip bothEntries++      entries' = flip fmap enumerations $ \Enumeration{name} -> (name, makeToplevelName name)++      entries'' = flip fmap typeAliases $ \TypeAlias{name} -> (name, makeToplevelName name)+      symbolTable = Map.fromList $ entries <> entries' <> entries''++      structTable = Map.fromList sentries+  in (symbolTable, structTable)++-- | Translate a type in the metamodel into the corresponding Haskell type.+-- See Note [Translating metamodel types]+convertType :: Type -> ModuleGenM (Doc ann)+convertType = \case+  BaseType n -> case n of+    URI         -> pretty <$> entityName "Language.LSP.Protocol.Types.Uri" "Uri"+    DocumentUri -> pretty <$> entityName "Language.LSP.Protocol.Types.Uri" "Uri"+    Integer     -> pretty <$> entityName "Language.LSP.Protocol.Types.Common" "Int32"+    UInteger    -> pretty <$> entityName "Language.LSP.Protocol.Types.Common" "UInt"+    Decimal     -> pure "Float"+    RegExp      -> pretty <$> entityName "Data.Text" "Text"+    String      -> pretty <$> entityName "Data.Text" "Text"+    Boolean     -> pure "Bool"+    Null        -> pretty <$> entityName "Language.LSP.Protocol.Types.Common" "Null"++  -- Special cases: these are in fact defined in the meta model, but+  -- we have way better types for them++  -- 'LSPAny' is a big union of anything in the metamodel, we just+  -- keep that as an aeson 'Value'+  ReferenceType "LSPAny" -> pretty <$> entityName "Data.Aeson" "Value"+  -- 'LSPObject' is an empty structure ... better to just say it's an aeson 'Object'!+  ReferenceType "LSPObject" -> pretty <$> entityName "Data.Aeson" "Object"+  -- 'LSPArray' is a list of 'LSPAny'... better to just say it's an aeson 'Array'!+  ReferenceType "LSPArray" -> pretty <$> entityName "Data.Aeson" "Array"++  ReferenceType n -> do+    st <- asks symbolTable+    case Map.lookup n st of+      Just thn -> pretty <$> lspEntityName (typesModSegment <> "." <> thn) thn+      Nothing  -> fail $ "Reference to unknown type: " <> show n+  ArrayType e -> do+    innerType <- convertType e+    pure $ brackets innerType+  MapType k v -> do+    kt <- convertType k+    vt <- convertType v+    n <- pretty <$> entityName "Data.Map" "Map"+    pure $ parens $ n <+> kt <+> vt+  OrType es -> do+    est <- traverse convertType es+    n <- pretty <$> entityName "Language.LSP.Protocol.Types.Common" "|?"+    pure $ foldr1 (\ty o -> parens (ty <+> n <+> o)) est+  AndType es -> do+    st <- asks structTable+    props <- for es $ \case+      ReferenceType t | Just e <- Map.lookup t st -> getStructProperties e+      t -> fail $ "element of 'and' type was not a reference to a structure: " ++ show t+    genAnonymousStruct $ concat props+  StructureLiteralType (StructureLiteral {properties}) -> genAnonymousStruct properties+  TupleType es -> do+    est <- traverse convertType es+    pure $ tupled est+  StringLiteralType s -> do+    tycon <- entityName "Language.LSP.Protocol.Types.Singletons" "AString"+    let ty = pretty tycon <+> dquotes (pretty s)+    pure $ parens ty+  IntegerLiteralType n -> do+    tycon <- entityName "Language.LSP.Protocol.Types.Singletons" "AnInteger"+    let ty = pretty tycon <+> pretty n+    pure $ parens ty+  BooleanLiteralType _ -> fail "unsupported: boolean literal types"++genStruct :: Structure -> CodeGenM T.Text+genStruct s@Structure{name} = do+  st <- asks symbolTable+  hsName <- case Map.lookup name st of+    Just hsn -> pure hsn+    Nothing  -> fail $ "Unknown type: " <> show name+  genModule (typesModSegment <> "." <> hsName) [] Nothing (printStruct hsName s)++printStruct :: T.Text -> Structure -> ModuleGenM (Doc ann)+printStruct tn s@Structure{name, documentation, since, proposed, deprecated} = do+  let structName = name++  props <- getStructProperties s+  args <- for props $ \Property{name, type_, optional, documentation, since, proposed, deprecated} -> do+      pty <- convertType type_+      let mty = case optional of+            Just True -> parens ("Maybe" <+> pty)+            _         -> pty+      let n = makeFieldName name+      propDoc <- multilineHaddock . pretty <$> mkDocumentation documentation since proposed+      pure $ hardvcat [propDoc, pretty n <+> "::" <+> mty]++  -- Annoyingly, this won't deprecate the lens, which is defined somewhere else entirely. Unclear what to do about that.+  let deprecations = optDeprecated tn deprecated ++ (flip concatMap props $ \Property{name, deprecated} -> optDeprecated (makeFieldName name) deprecated)++  ensureImport "GHC.Generics" Unqual+  ensureImport "Control.DeepSeq" Unqual+  ensureImport "Data.Hashable" Unqual+  let derivDoc =+        let stockDeriv = "deriving stock" <+> tupled (fmap pretty toStockDerive)+            anyclassDeriv = "deriving anyclass" <+> tupled (fmap pretty toAnyclassDerive)+        in indent indentSize $ hardvcat [stockDeriv, anyclassDeriv]+  dataDoc <- multilineHaddock . pretty <$> mkDocumentation documentation since proposed+  let dataDecl = "data" <+> pretty tn <+> "=" <+> pretty tn <+> nest indentSize (encloseSep (line <> "{ ") (line <> "}") ", " args)+      datad = hardvcat (deprecations ++ [dataDoc, dataDecl, derivDoc])++  ensureImport "Data.Aeson" (QualAs "Aeson")+  ensureImport "Data.Row.Aeson" (QualAs "Aeson")+  ensureImport "Data.Row.Hashable" (QualAs "Hashable")+  matcherName <- entityName "Language.LSP.Protocol.Types.Common" ".=?"+  let toJsonD =+        let (unzip -> (args, pairEs)) = flip fmap (zip props [0..]) $ \(Property{name, optional}, i) ->+              let n :: T.Text = "arg" <> (T.pack $ show i)+                  pairE = case optional of+                    Just True -> dquotes (pretty name) <+> pretty matcherName <+> pretty n+                    _ -> brackets (dquotes (pretty name) <+> "Aeson..=" <+> pretty n)+              in (pretty n, pairE)+            body = "Aeson.object $ concat $ " <+> encloseSep "[" "]" "," pairEs+            toJsonDoc = "toJSON" <+> parens (pretty tn <+> hsep args) <+> "=" <+> nest indentSize body+            instanceDoc = "instance Aeson.ToJSON" <+> pretty tn <+> "where" <> nest indentSize (hardline <> toJsonDoc)+        in instanceDoc++  fromJsonD <- do+    let vn :: T.Text = "arg"+    let exprs = flip fmap props $ \Property{name, optional} ->+          case optional of+            Just True -> pretty vn <+> "Aeson..:!" <+> dquotes (pretty name)+            _         -> pretty vn <+> "Aeson..:" <+> dquotes (pretty name)+    let lamBody = mkIterApplicativeApp (pretty tn) exprs+    let body = "Aeson.withObject" <+> dquotes (pretty structName) <+> "$" <+> "\\" <> pretty vn <+> "->" <+> nest indentSize lamBody+    let fromJsonDoc = "parseJSON" <+> "=" <+> nest indentSize body+    let instanceDoc = "instance Aeson.FromJSON" <+> pretty tn <+> "where" <> nest indentSize (hardline <> fromJsonDoc)+    pure instanceDoc++  pure $+    datad <>+    hardline <> hardline <>+    toJsonD <>+    hardline <> hardline <>+    fromJsonD++-- | Get the list of properties of a struct, including inherited ones.+getStructProperties :: Structure -> ModuleGenM [Property]+getStructProperties s@Structure{name, properties, extends, mixins} = do+  st <- asks structTable+  let+    extends' = fromMaybe [] extends+    mixins' = fromMaybe [] mixins+    supertypes = extends' ++ mixins'+  superProps <- for supertypes $ \case+    ReferenceType t | Just e <- Map.lookup t st -> getStructProperties e+    t -> fail $ "supertype of structure " ++ show name ++ " was not a reference to a structure: " ++ show t+  let allSuperProps = concat superProps+      -- If a property is redefined in the current type, then it overrides the inherited one+      localNames = foldMap (\Property{name} -> Set.singleton name) properties+      filteredSuperProps = filter (\Property{name} -> name `Set.notMember` localNames) allSuperProps+  pure (filteredSuperProps ++ properties)++-- | Generate a type corresponding to an anonymous struct.+genAnonymousStruct :: [Property] -> ModuleGenM (Doc ann)+genAnonymousStruct properties = do+  row <- for properties $ \Property{name, type_, optional} -> do+    pty <- convertType type_+    let mty = case optional of+          Just True -> parens ("Maybe" <+> pty)+          _         -> pty+    ensureImport "Data.Row" (QualAs "Row")+    pure $ dquotes (pretty name) <+> "Row..==" <+> mty+  let tyList = foldr (\ty l -> parens $ ty <+> "Row..+" <+> l) "Row.Empty" row+  pure $ parens $ "Row.Rec" <+> tyList++genEnum :: Enumeration -> CodeGenM T.Text+genEnum e@Enumeration{name} = do+  st <- asks symbolTable+  hsName <- case Map.lookup name st of+    Just hsn -> pure hsn+    Nothing  -> fail $ "Unknown type: " <> show name+  genModule (typesModSegment <> "." <> hsName) [] Nothing (printEnum hsName e)++printEnum :: T.Text -> Enumeration -> ModuleGenM (Doc ann)+printEnum tn Enumeration{name, type_, values, supportsCustomValues, documentation, since, proposed, deprecated} = do+  st <- asks symbolTable++  let enumName = name+      enumNameString = T.unpack enumName+      -- This indicates whether or not the enum is "open" and supports custom values.+      -- We need to branch on this a lot!+      custom = fromMaybe False supportsCustomValues++  -- The (Haskell) type of the elements of this enum. Useful, so we can generate various+  -- code (e.g. for parsing JSON) generically but use this type to pin down what we want to do.+  ty <- case type_ of+    BaseType Integer  -> pretty <$> entityName "Language.LSP.Protocol.Types.Common" "Int32"+    BaseType UInteger -> pretty <$> entityName "Language.LSP.Protocol.Types.Common" "UInt"+    BaseType String   -> pretty <$> entityName "Data.Text" "Text"+    _                 -> fail $ "enumeration of unexpected type " ++ show type_++  let isString = case type_ of+        BaseType String -> True+        _ -> False++  -- https://github.com/microsoft/vscode-languageserver-node/issues/1035+  let badEnumValues = ["jsonrpcReservedErrorRangeStart", "jsonrpcReservedErrorRangeEnd", "serverErrorStart", "serverErrorEnd"]+      values' = filter (\EnumerationEntry{name} -> name `notElem` badEnumValues) values+  -- The associations between constructor names and their literals+  assocs <- for values' $ \EnumerationEntry{name, value, documentation, since, proposed} -> do+        let cn = makeConstrName (Just enumName) name+          -- The literal for the actual enum value in this case+            lit = case value of+                T t -> pretty $ show $ T.unpack t+                I i -> pretty $ show i+        doc <- mkDocumentation documentation since proposed+        pure (cn, lit, doc)++  let normalCons = flip fmap assocs $ \(cn, _, doc) ->+        hardvcat [ multilineHaddock $ pretty doc,  pretty cn ]+  let customCon =+        let cn = makeConstrName (Just enumName) "Custom"+        in if custom then Just (cn, pretty cn <+> ty) else Nothing+  let cons = normalCons ++ (fmap snd $ maybeToList customCon)++  ensureImport "Data.Aeson" (QualAs "Aeson")+  ensureImport "Data.Row.Aeson" (QualAs "Aeson")+  ensureImport "Data.Row.Hashable" (QualAs "Hashable")++  lspEnumN <- pretty <$> entityName "Language.LSP.Protocol.Types.LspEnum" "LspEnum"+  let knownValuesN = "knownValues"+  let toBaseTypeN = "toEnumBaseType"+  let fromBaseTypeN = "fromEnumBaseType"+  lspOpenEnumN <- pretty <$> entityName "Language.LSP.Protocol.Types.LspEnum" "LspOpenEnum"+  let fromOpenBaseTypeN = "fromOpenEnumBaseType"+  asLspEnumN <- pretty <$> entityName "Language.LSP.Protocol.Types.LspEnum" "AsLspEnum"+  isStringN <- pretty <$> entityName "Data.String" "IsString"++  let deprecations = optDeprecated tn deprecated ++ (flip concatMap values' $ \EnumerationEntry{name, deprecated} -> optDeprecated (makeConstrName (Just enumName) name) deprecated)++  ensureImport "GHC.Generics" Unqual+  ensureImport "Control.DeepSeq" Unqual+  ensureImport "Data.Hashable" Unqual+  dataDoc <- multilineHaddock . pretty <$> mkDocumentation documentation since proposed+  let derivDoc =+        let+          toDeriveViaLspEnum = ["Aeson.ToJSON", "Aeson.FromJSON"] ++ if custom && isString then [isStringN] else []+          stockDeriv = "deriving stock" <+> tupled (fmap pretty toStockDerive)+          anyclassDeriv = "deriving anyclass" <+> tupled (fmap pretty toAnyclassDerive)+          viaDeriv = "deriving" <+> tupled toDeriveViaLspEnum <+> "via" <+> parens (asLspEnumN <+> pretty tn <+> ty)+        in indent indentSize $ hardvcat [stockDeriv, anyclassDeriv, viaDeriv]+  let dataDecl = "data" <+> pretty tn <+> "=" <+> nest indentSize (encloseSep (line <> "  ") mempty "| " cons)+      dataD = hardvcat (deprecations ++ [dataDoc, dataDecl, derivDoc])++  setFromListN <- pretty <$> entityName "Data.Set" "fromList"+  let knownValuesD =+        let valuesList = nest indentSize $ encloseSep "[" "]" "," $ flip fmap assocs $ \(n, _, _) -> pretty n+        in knownValuesN <+> "=" <+> setFromListN <+> valuesList++  let toBaseTypeD =+        -- xToValue X1 = <X1 value>+        let normalClauses = flip fmap assocs $ \(n, v, _) -> toBaseTypeN <+> pretty n <+> "=" <+> v+        -- xToValue (CustomX c) = c+            customClause = case customCon of+              Just (cn, _) ->+                let vn :: T.Text = "arg"+                in Just $ toBaseTypeN <+> parens (pretty cn <+> pretty vn) <+> "=" <+> pretty vn+              Nothing -> Nothing+            clauses = normalClauses ++ maybeToList customClause+        in hardvcat clauses++  let fromBaseTypeD =+        let fn = if custom then fromOpenBaseTypeN else fromBaseTypeN+        -- valueToX <X1 value> = X+        -- or+        -- valueToX <X1 value> = Just X+            normalClauses = flip fmap assocs $ \(n, v, _) -> fn <+> v <+> "=" <+> if custom then pretty n else "pure" <+> pretty n+        -- valueToX c = CustomX c+        -- or+        -- valueToX _ = Nothing+            fallThroughClause = case customCon of+              Just (cn, _) ->+                let vn :: T.Text = "arg"+                in fn <+> pretty vn <+> "=" <+> pretty cn <+> pretty vn+              Nothing ->  fn <+> "_ = Nothing"+            clauses = normalClauses ++ [fallThroughClause]+        in hardvcat clauses++  let lspEnumD =+        let+          baseTypeD = "type EnumBaseType" <+> pretty tn <+> "=" <+> ty+          decls = [knownValuesD, baseTypeD, toBaseTypeD] ++ if custom then [] else [fromBaseTypeD]+          instanceDoc = "instance" <+> lspEnumN <+> pretty tn <+> "where" <> nest indentSize (hardline <> vcat decls)+        in instanceDoc+  let lspOpenEnumD = "instance" <+> lspOpenEnumN <+> pretty tn <+> "where" <> nest indentSize (hardline <> fromBaseTypeD)++  pure $+    dataD <>+    hardline <> hardline <>+    lspEnumD <>+    hardline <> hardline <>+    (if custom then lspOpenEnumD <> hardline <> hardline else "")++genAlias :: TypeAlias -> CodeGenM T.Text+genAlias a@TypeAlias{name} = do+  st <- asks symbolTable+  hsName <- case Map.lookup name st of+    Just hsn -> pure hsn+    Nothing  -> fail $ "Unknown type: " <> show name+  genModule (typesModSegment <> "." <> hsName) [] Nothing (printAlias hsName a)++printAlias :: forall ann . T.Text -> TypeAlias -> ModuleGenM (Doc ann)+printAlias hsName TypeAlias{name, type_, documentation, since, proposed, deprecated} = do+  st <- asks symbolTable+  rhs <- convertType type_++  ensureImport "GHC.Generics" Unqual+  ensureImport "Control.DeepSeq" Unqual+  ensureImport "Data.Hashable" Unqual+  ensureImport "Data.Aeson" (QualAs "Aeson")+  ensureImport "Data.Row.Aeson" (QualAs "Aeson")+  ensureImport "Data.Row.Hashable" (QualAs "Hashable")+  -- In practice, it seems that only base types and aliases to base types get used as map keys, so deriving+  -- To/FromJSONKey for them seems to be enough+  let derivDoc =+        let aesonDeriving :: [Doc ann] = ["Aeson.ToJSON", "Aeson.FromJSON"] ++ case type_ of { BaseType _ -> ["Aeson.ToJSONKey", "Aeson.FromJSONKey"]; _ -> [] }+            newtypeDeriv = "deriving newtype" <+> tupled aesonDeriving+            stockDeriv = "deriving stock" <+> tupled (fmap pretty toStockDerive)+            anyclassDeriv = "deriving anyclass" <+> tupled (fmap pretty toAnyclassDerive)+        in indent indentSize $ hardvcat [newtypeDeriv, stockDeriv, anyclassDeriv]+  dataDoc <- multilineHaddock . pretty <$> mkDocumentation documentation since proposed+  let dataDecl = "newtype" <+> pretty hsName <+> "=" <+> pretty hsName <+> rhs+      datad = hardvcat (optDeprecated hsName deprecated ++ [dataDoc, dataDecl, derivDoc])+  pure datad++---------------++data RequestData ann = RequestData+  { methCon                :: Doc ann+  , singCon                :: Doc ann+  , paramsEq               :: Doc ann+  , resultEq               :: Doc ann+  , errorDataEq            :: Doc ann+  , registrationOptionsEq  :: Doc ann+  , toStringClause         :: Doc ann+  , fromStringClause       :: Doc ann+  , messageDirectionClause :: Doc ann+  , messageKindClause      :: Doc ann+  }++data NotificationData ann = NotificationData+  { methCon                :: Doc ann+  , singCon                :: Doc ann+  , paramsEq               :: Doc ann+  , registrationOptionsEq  :: Doc ann+  , toStringClause         :: Doc ann+  , fromStringClause       :: Doc ann+  , messageDirectionClause :: Doc ann+  , messageKindClause      :: Doc ann+  }++data CustomData ann = CustomData+  { methCon                :: Doc ann+  , singCon                :: Doc ann+  , paramsEq               :: Doc ann+  , resultEq               :: Doc ann+  , errorDataEq            :: Doc ann+  , registrationOptionsEq  :: Doc ann+  , toStringClause         :: Doc ann+  , fromStringClause       :: Doc ann+  , messageDirectionClause :: Doc ann+  , messageKindClause      :: Doc ann+  }++-- See Note [Generating code for methods]+-- TODO: partial result params+printMethods :: [Request] -> [Notification] -> ModuleGenM (Doc ann)+printMethods reqs nots = do+  let mtyN = "Method"+      styN = "SMethod"+      sstyN = "SomeMethod"+      smcn = "SomeMethod"+      mpN = "MessageParams"+      mrN = "MessageResult"+      edN = "ErrorData"+      roN = "RegistrationOptions"+      toStringN = "someMethodToMethodString"+      fromStringN = "methodStringToSomeMethod"+      mdN = "messageDirection"+      mkN = "messageKind"++  let methodName context fullName =+        let pieces = T.splitOn "/" fullName+        in pretty $ makeConstrName context $ foldMap capitalize pieces+  let messagePartType t = case t of+        Just ty -> convertType ty+        -- See Note [Absent parameters/results/errors]+        Nothing -> do+          ensureImport "Data.Void" Qual+          pure "Maybe Data.Void.Void"++  ensureImport "Language.LSP.Protocol.Message.Meta" (QualAs "MM")++  -- Construct the various pieces we'll need for the declarations in one go+  reqData <- for reqs $ \Request{method, params, result, errorData, registrationOptions, messageDirection} -> do+    -- <constructor name> :: Method <direction> <method type>+    let mcn = methodName (Just mtyN) method+        direction = case messageDirection of+            MM.ClientToServer -> "MM.ClientToServer"+            MM.ServerToClient -> "MM.ServerToClient"+            MM.Both           -> "f"+        methCon = mcn <+> "::" <+> pretty mtyN <+> direction <+> "MM.Request"+        scn = methodName (Just styN) method+        singCon = scn <+> "::" <+> pretty styN <+> mcn++    -- MessageParams <constructor name> = <param type>+    paramTy <- messagePartType params+    let paramsEq = mpN <+> mcn <+> "=" <+> paramTy+    -- MessageResult <constructor name> = <result type>+    resultTy <- messagePartType (Just result)+    let resultEq = mrN <+> mcn <+> "=" <+> resultTy+    errDatTy <- messagePartType errorData+    let errorDataEq = edN <+> mcn <+> "=" <+> errDatTy+    regOptsTy <- messagePartType registrationOptions+    let registrationOptionsEq = roN <+> mcn <+> "=" <+> regOptsTy++    let toStringClause = toStringN <+> parens (smcn <+> scn) <+> "=" <+> dquotes (pretty method)+        fromStringClause = fromStringN <+> dquotes (pretty method) <+> "=" <+> smcn <+> scn+        messageDirectionClause =+          let d = case messageDirection of+                MM.ClientToServer -> "MM.SClientToServer"+                MM.ServerToClient -> "MM.SServerToClient"+                MM.Both           -> "MM.SBothDirections"+          in mdN <+> scn <+> "=" <+> d+        messageKindClause = "messageKind" <+> scn <+> "=" <+> "MM.SRequest"+    pure $ RequestData {..}++  notData <- for nots $ \Notification{method, params, registrationOptions, messageDirection} -> do+    let mcn = methodName (Just mtyN) method+        direction = case messageDirection of+            MM.ClientToServer -> "MM.ClientToServer"+            MM.ServerToClient -> "MM.ServerToClient"+            MM.Both           -> "f"+        methCon = mcn <+> "::" <+> pretty mtyN <+> direction <+> "MM.Notification"+        scn = methodName (Just styN) method+        singCon = scn <+> "::" <+> pretty styN <+> mcn++    -- MessageParams <constructor name> = <param type>+    paramTy <- messagePartType params+    let paramsEq = mpN <+> mcn <+> "=" <+> paramTy+    regOptsTy <- messagePartType registrationOptions+    let registrationOptionsEq = roN <+> mcn <+> "=" <+> regOptsTy++    let toStringClause = toStringN <+> parens (smcn <+> scn) <+> "=" <+> dquotes (pretty method)+        fromStringClause = fromStringN <+> dquotes (pretty method) <+> "=" <+> smcn <+> scn+        messageDirectionClause =+          let d = case messageDirection of+                MM.ClientToServer -> "MM.SClientToServer"+                MM.ServerToClient -> "MM.SServerToClient"+                MM.Both           -> "MM.SBothDirections"+          in "messageDirection" <+> scn <+> "=" <+> d+        messageKindClause = "messageKind" <+> scn <+> "=" <+> "MM.SNotification"++    pure $ NotificationData {..}++  -- Add the custom method case, which isn't in the metamodel+  customDat <- do+    let mcn = methodName (Just mtyN) "CustomMethod"+        -- Method_CustomMethod :: Symbol -> Method f t+        methCon = mcn <+> "::" <+> "GHC.TypeLits.Symbol" <+> "->" <+> pretty mtyN <+> "f" <+> "t"+        -- SMethod_CustomMethod :: KnownSymbol s => SMethod Method_CustomMethod+        scn = methodName (Just styN) "CustomMethod"+    ensureImport "Data.Proxy" Qual+    ensureImport "GHC.TypeLits" Qual+    let singCon = scn <+> "::" <+> "forall s . GHC.TypeLits.KnownSymbol s =>" <+> "Data.Proxy.Proxy s" <+> "->" <+> pretty styN <+> parens (mcn <+> "s")+    -- MessageParams (Method_CustomMethod s) = Value+    ensureImport "Data.Aeson" (QualAs "Aeson")+    let paramsEq = mpN <+> parens (mcn <+> "s") <+> "=" <+> "Aeson.Value"+    -- MessageResult (Method_CustomMethod s) = Value+        resultEq = mrN <+> parens (mcn <+> "s") <+> "=" <+> "Aeson.Value"+    -- Can shove whatever you want in the error data for custom methods?+    -- ErrorData (Method_CustomMethod s) = Value+        errorDataEq = edN <+> parens (mcn <+> "s") <+> "=" <+> "Aeson.Value"+    -- Can't register custom methods+    -- RegistrationOptions (Method_CustomMethod s) = Void+    ensureImport "Data.Void" Qual+    let registrationOptionsEq = roN <+> parens (mcn <+> "s") <+> "=" <+> "Data.Void.Void"++    let toStringClause = toStringN <+> parens (smcn <+> parens (scn <+> "v")) <+> "=" <+> "GHC.TypeLits.symbolVal v"+        fromStringClause = fromStringN <+> "v = case GHC.TypeLits.someSymbolVal v of { GHC.TypeLits.SomeSymbol p ->" <+> smcn <+> parens (scn <+> "p") <+> "; }"+        messageDirectionClause = mdN <+> parens (scn <+> "_") <+> "=" <+> "MM.SBothDirections"+        messageKindClause = mkN <+> parens (scn <+> "_") <+> "=" <+> "MM.SBothTypes"++    pure $ CustomData {..}++  ensureImport "Data.Kind" (QualAs "Kind")+  let dataD =+        let sigD = "type" <+> pretty mtyN <+> ":: MM.MessageDirection -> MM.MessageKind -> Kind.Type"+            docD = "-- | A type representing a LSP method (or class of methods), intended to be used mostly at the type level."+            ctors = fmap (\RequestData{..} -> methCon) reqData ++ fmap (\NotificationData{..} -> methCon) notData ++ [(\CustomData{..} -> methCon) customDat]+            dataD = nest indentSize $ "data" <+> pretty mtyN <+> "f t" <+> "where" <+> (hardline <> hardvcat ctors)+        -- This only really exists on the type level so we don't really want instances anyway+        in hardvcat [docD, sigD, dataD]++  let mpD =+        let sigD = "type" <+> mpN <+> ":: forall f t ." <+> pretty mtyN <+> "f t" <+> "->" <+> "Kind.Type"+            docD = "-- | Maps a LSP method to its parameter type."+            eqns = fmap (\RequestData{..} -> paramsEq) reqData ++ fmap (\NotificationData{..} -> paramsEq) notData ++ [(\CustomData{..} -> paramsEq) customDat]+            declD = nest indentSize $ "type family" <+> mpN <+> parens ("m :: " <+> pretty mtyN <+> "f t") <+> "where" <+> (hardline <> hardvcat eqns)+        in hardvcat [docD, sigD, declD]++  let mrD =+        let sigD = "type" <+> mrN <+> ":: forall f t ." <+> pretty mtyN <+> "f t" <+> "->" <+> "Kind.Type"+            docD = "-- | Maps a LSP method to its result type."+        -- TODO: should we give notifiations ()?+            eqns = fmap (\RequestData{..} -> resultEq) reqData ++ [(\CustomData{..} -> resultEq) customDat]+            declD = nest indentSize $ "type family" <+> mrN <+> parens ("m :: " <+> pretty mtyN <+> "f t") <+> "where" <+> (hardline <> hardvcat eqns)+        in hardvcat [docD, sigD, declD]++  let edD =+        let sigD = "type" <+> edN <+> ":: forall f t ." <+> pretty mtyN <+> "f t" <+> "->" <+> "Kind.Type"+            docD = "-- | Maps a LSP method to its error data type."+        -- TODO: should we give notifiations ()?+            eqns = fmap (\RequestData{..} -> errorDataEq) reqData ++ [(\CustomData{..} -> errorDataEq) customDat]+            declD = nest indentSize $ "type family" <+> edN <+> parens ("m :: " <+> pretty mtyN <+> "f t") <+> "where" <+> (hardline <> hardvcat eqns)+        in hardvcat [docD, sigD, declD]++  let roD =+        let sigD = "type" <+> roN <+> ":: forall f t ." <+> pretty mtyN <+> "f t" <+> "->" <+> "Kind.Type"+            docD = "-- | Maps a LSP method to its registration options type."+            eqns = fmap (\RequestData{..} -> registrationOptionsEq) reqData ++ fmap (\NotificationData{..} -> registrationOptionsEq) notData ++ [(\CustomData{..} -> registrationOptionsEq) customDat]+            declD = nest indentSize $ "type family" <+> roN <+> parens ("m :: " <+> pretty mtyN <+> "f t") <+> "where" <+> (hardline <> hardvcat eqns)+        in hardvcat [docD, sigD, declD]++  let singD =+        let sigD = "type" <+> pretty styN <+> ":: forall f t ." <+> pretty mtyN <+> "f t" <+> "->" <+> "Kind.Type"+            docD = "-- | A singleton type for 'Method'."+            ctors = fmap (\RequestData{..} -> singCon) reqData ++ fmap (\NotificationData{..} -> singCon) notData ++ [(\CustomData{..} -> singCon) customDat]+        -- Can't derive instances, it's a GADT, will do them later+            dataD = nest indentSize $ "data" <+> pretty styN <+> "m" <+> "where" <+> (hardline <> hardvcat ctors)+        in hardvcat [docD, sigD, dataD]++  let ssmD =+        let ctor = smcn <+> "::" <+> "forall m ." <+> pretty styN <+> "m" <+> "->" <+> sstyN+            docD = "-- | A method which isn't statically known."+        -- Can't derive instances because it's a GADT and we're not doing the instances for SMethod here either+            dataD = nest indentSize $ "data" <+> sstyN <+> "where" <+> (hardline <> ctor)+        in hardvcat [docD, dataD]++  -- methodToString :: SomeMethod -> String+  let toStringD =+        let docD = "-- | Turn a 'SomeMethod' into its LSP method string."+            sigD = toStringN <+> "::" <+> sstyN <+> "->" <+> "String"+            clauses = fmap (\RequestData{..} -> toStringClause) reqData ++ fmap (\NotificationData{..} -> toStringClause) notData ++ [(\CustomData{..} -> toStringClause) customDat]+        in hardvcat [docD, sigD, hardvcat clauses]+  -- stringToMethod :: String -> SomeMethod+  let fromStringD =+        let docD = "-- | Turn a LSP method string into a 'SomeMethod'."+            sigD = fromStringN <+> "::" <+> "String" <+> "->" <+> sstyN+            clauses = fmap (\RequestData{..} -> fromStringClause) reqData ++ fmap (\NotificationData{..} -> fromStringClause) notData ++ [(\CustomData{..} -> fromStringClause) customDat]+        in hardvcat [docD, sigD, hardvcat clauses]++  let messageDirectionD =+        let docD = "-- | Get a singleton witness for the message direction of a 'SMethod'."+            sigD = mdN <+> ":: forall f t (m :: Method f t) ." <+> pretty styN <+> "m" <+> "->" <+> "MM.SMessageDirection f"+            clauses = fmap (\RequestData{..} -> messageDirectionClause) reqData ++ fmap (\NotificationData{..} -> messageDirectionClause) notData ++ [(\CustomData{..} -> messageDirectionClause) customDat]+        in hardvcat [docD, sigD, hardvcat clauses]++  let messageKindD =+        let docD = "-- | Get a singleton witness for the message kind of a 'SMethod'."+            sigD = mkN <+> ":: forall f t (m :: Method f t) ." <+> pretty styN <+> "m" <+> "->" <+> "MM.SMessageKind t"+            clauses = fmap (\RequestData{..} -> messageKindClause) reqData ++ fmap (\NotificationData{..} -> messageKindClause) notData ++ [(\CustomData{..} -> messageKindClause) customDat]+        in hardvcat [docD, sigD, hardvcat clauses]++  pure $+    dataD <>+    hardline <> hardline <>+    mpD <>+    hardline <> hardline <>+    mrD <>+    hardline <> hardline <>+    edD <>+    hardline <> hardline <>+    roD <>+    hardline <> hardline <>+    singD <>+    hardline <> hardline <>+    ssmD <>+    hardline <> hardline <>+    toStringD <>+    hardline <> hardline <>+    fromStringD <>+    hardline <> hardline <>+    messageDirectionD <>+    hardline <> hardline <>+    messageKindD++genMethods :: [Request] -> [Notification] -> CodeGenM T.Text+genMethods reqs nots = do+  genModule "Method" [] Nothing (printMethods reqs nots)++--------------++genLensModule :: [T.Text] -> CodeGenM T.Text+genLensModule names = do+  genModule "Lens" ["TemplateHaskell"] Nothing $ do+    mkLensesN <- pretty <$> entityName "Control.Lens.TH" "makeFieldsNoPrefix"+    decls <- for names $ \thn -> do+      nm <- pretty <$> lspEntityName (typesModSegment <> "." <> thn) thn+      let lensesD = mkLensesN <+> "''" <> nm+      pure lensesD+    pure $ hardvcat decls++---------------++printReExports :: [T.Text] -> ModuleGenM (Doc ann)+printReExports names = do+  for_ names $ \n -> ensureImport n (As "Export")+  pure mempty++genAllModule :: [T.Text] -> CodeGenM T.Text+genAllModule names = do+  genModule typesModSegment [] (Just ["module Export"]) (printReExports names)++---------------++capitalize :: T.Text -> T.Text+capitalize s = T.toUpper (T.singleton (T.head s)) `T.append` T.tail s++uncapitalize :: T.Text -> T.Text+uncapitalize s = T.toLower (T.singleton (T.head s)) `T.append` T.tail s++hardvcat :: [Doc ann] -> Doc ann+hardvcat = concatWith (\x y -> x <> hardline <> y)++mkIterApplicativeApp :: Doc a -> [Doc a] -> Doc a+mkIterApplicativeApp hd [] = "pure" <+> hd+mkIterApplicativeApp hd (a:rest) =+  let acc = hd <+> "<$>" <+> a+  in foldl' (\acc a -> acc <+> "<*>" <+> a) acc rest++{- Note [Code generation approach]+The approach we take here is quite primitive: we just print out Haskell modules+as strings. This ends up being better than the alternatives!++Using TH:+- Hard to make it work reliably on all GHC versions+- Have to produce everything in a single module+- Slow compilation: the TH itself is slow, and then it produces a gigantic module+  which must be compiled in one go+- Hard to debug: you have to dump splices and dig through the output++Various other libraries for generating Haskell:+- Only support old versions of Haskell syntax (we need GADTs and type families)+- Are dubiously supported+-}++{- Note [Translating metamodel types]++= Or types++Or types are translated directly into anonymous unions using '(|?)'.++= And types++And types are difficult to handle in general (it's not even clear what that means). We assume+that they contain only references to structures, and translate them as anonymous records+with the union of the fields of the components of the and type.++= Null++We would like a type that reliably serializes to/from null, since null alternatives+are called out explicitly in the LSP spec. In the end, we just defined a specific type for+this: 'Null'.++= Enumerations++Enumerations are compiled as simple sum types.++Enums that allow custom values get a special extra constructor for that.++= Type aliases++Type aliases are compiled to newtype definitions.++The alternative would be to compile them to type aliases. It's not at all clear which+one is better, but this way is closer to how we did things before and in some cases+makes things easier (e.g. when there is a type alias for an anoymous record you get+slightly better errors before you go under the newtype).++= Structures++Top level strutures are compiled into record datatypes.++Properties for structures are included in the following order:+- Properties from types in 'extends' (including all their inherited properties).+- Properties from types in 'mixins' (including all their inherited properties).+- Properties defined in the struct itself.++We insist that extended and mixed in types are references to top-level structures (it's+unclear that anything else makes sense).++Field names for structure properties are not disambiguated: we rely on `DuplicateRecordFields`.+We generate lenses for conveniently accessing all the duplicate fields, hence+the fields themselves are prefixed with an underscore so they don't clash with the lenses.++== Optional fields++Optional fields are translated as 'Maybe' types. We can configure `aeson` to do the right thing+for datatypes, and for anonymous records we have our own instances in 'Data.Row.Aeson'.++== Structure literals++Structure literals are translated directly as anonymous records. See Note [Anonymous records].++== String/integer literals++String and integer literal types are weird. They're inhabited by only that specific+string or integer. They're often used for "kind" fields i.e. to encode sum types.+We do try to represent this faithfully, so we have types 'AString' and 'AnInteger'+which behave like this.++-}++{- Note [Generating code for methods]+The code generation for methods is in many ways the most complicated part,+because there are some type-level parts. We follow the same basic approach as the+old way:+- A 'Method' type that represents a method, with type parameters for direction and+type (notification/request).+- A 'SMethod' singleton GADT indexed by a 'Method' that can be passed around at runtime.+- A variety of type families for mapping 'Method's to their parameter types, result types, etc.++We also generate a few functions. The ultimate goal would be to avoid any non-generated+code having to do a full pattern match on 'Method', since it's gigantic and that's not+very maintainable. We don't quite achieve that yet.+-}++{- Note [Absent parameters/results/errors]+Many methods don't *have* parameters/results/errors. What are we supposed to do there?+We can't say the type is 'Null', because the client will send us messages where the+value is absent, not just null. We really need a way to say the value is *absent*.++We have a cunning trick for this: use 'Maybe Void'. That can only ever be 'Nothing',+and sine we're configuring aeson to omit 'Nothing' fields in objects, that's exactly+what we want.++See also https://github.com/haskell/aeson/issues/646 for some relevant discussion.+-}++{- Note [Anonymous records]+We need anonymous records in a few places. We could lift each of these to the top+level and declare a new Haskell record type for them, but this requires us to make+lots of arbitrary choices (e.g. what do we call all these new types?) and takes us+further from representing the metamodel accurately. So we instead use an actual+anonymous records library, in this case `row-types`.+-}++{- Note [Avoiding name clashes]+It is difficult to avoid name clashes, especially since we don't control the input+source. And there are plenty of name clashes in the metamodel.+- Field names clash a lot+- Constructor names clash+- There are a few instances where constructor names clash with type names.++One approach would be to generate lots of modules and use Haskell's module system+to disambiguate. But this would prevent us from providing large modules that+re-export things, rather we would need users to import each module that they+use individually, which would be quite tedious. That would also force us to+expose the generated module structure.++The main thing we do is just pick non-clashing names. The crude heuristic+we have adopted is to prefix many values with the name of the type with which they+are associated, followed by an underscore. So the constructors of `X` will be+`X_A`, `X_B` etc.++We don't do this for fields, instead we rely on `DuplicateRecordFields` and+use classy lenses.+-}
+ generator/Main.hs view
@@ -0,0 +1,10 @@+{-# LANGUAGE OverloadedStrings #-}+module Main (main) where++import CodeGen+import Language.LSP.MetaModel++-- Run this from the lsp-types directory with "cabal run generator" to regenerate+-- the generated files from the metamodel.+main :: IO ()+main = genFromMetaModel "Language.LSP.Protocol.Internal" "generated" metaModel
lsp-types.cabal view
@@ -1,141 +1,581 @@-cabal-version:       2.2-name:                lsp-types-version:             1.6.0.1-synopsis:            Haskell library for the Microsoft Language Server Protocol, data types+cabal-version:      3.0+name:               lsp-types+version:            2.0.0.0+synopsis:+  Haskell library for the Microsoft Language Server Protocol, data types -description:         An implementation of the types to allow language implementors to-                     support the Language Server Protocol for their specific language.+description:+  An implementation of the types to allow language implementors to+  support the Language Server Protocol for their specific language. -homepage:            https://github.com/haskell/lsp-license:             MIT-license-file:        LICENSE-author:              Alan Zimmerman-maintainer:          alan.zimm@gmail.com-copyright:           Alan Zimmerman, 2016-2021-category:            Development-build-type:          Simple-extra-source-files:  ChangeLog.md, README.md+homepage:           https://github.com/haskell/lsp+license:            MIT+license-file:       LICENSE+author:             Alan Zimmerman+maintainer:         alan.zimm@gmail.com+copyright:          Alan Zimmerman, 2016-2021+category:           Development+build-type:         Simple+extra-source-files:+  ChangeLog.md+  README.md +source-repository head+  type:     git+  location: https://github.com/haskell/lsp+ flag force-ospath-  default: False-  manual: False-  description: Force a version bound on filepath library, to enable 'OsPath'.+  default:     False+  manual:      False+  description:+    Force a version bound on filepath library, to enable 'OsPath'.  library-  exposed-modules:     Language.LSP.Types-                     , Language.LSP.Types.Capabilities-                     , Language.LSP.Types.Lens-                     , Language.LSP.Types.SMethodMap-                     , Data.IxMap-  other-modules:       Language.LSP.Types.CallHierarchy-                     , Language.LSP.Types.Cancellation-                     , Language.LSP.Types.ClientCapabilities-                     , Language.LSP.Types.CodeAction-                     , Language.LSP.Types.CodeLens-                     , Language.LSP.Types.Command-                     , Language.LSP.Types.Common-                     , Language.LSP.Types.Completion-                     , Language.LSP.Types.Configuration-                     , Language.LSP.Types.Declaration-                     , Language.LSP.Types.Definition-                     , Language.LSP.Types.Diagnostic-                     , Language.LSP.Types.DocumentColor-                     , Language.LSP.Types.DocumentFilter-                     , Language.LSP.Types.DocumentHighlight-                     , Language.LSP.Types.DocumentLink-                     , Language.LSP.Types.DocumentSymbol-                     , Language.LSP.Types.FoldingRange-                     , Language.LSP.Types.Formatting-                     , Language.LSP.Types.Hover-                     , Language.LSP.Types.Implementation-                     , Language.LSP.Types.Initialize-                     , Language.LSP.Types.Location-                     , Language.LSP.Types.LspId-                     , Language.LSP.Types.MarkupContent-                     , Language.LSP.Types.Method-                     , Language.LSP.Types.Message-                     , Language.LSP.Types.Parsing-                     , Language.LSP.Types.Progress-                     , Language.LSP.Types.Registration-                     , Language.LSP.Types.References-                     , Language.LSP.Types.Rename-                     , Language.LSP.Types.SelectionRange-                     , Language.LSP.Types.ServerCapabilities-                     , Language.LSP.Types.SemanticTokens-                     , Language.LSP.Types.SignatureHelp-                     , Language.LSP.Types.StaticRegistrationOptions-                     , Language.LSP.Types.TextDocument-                     , Language.LSP.Types.TypeDefinition-                     , Language.LSP.Types.Uri-                     , Language.LSP.Types.Utils-                     , Language.LSP.Types.Window-                     , Language.LSP.Types.WatchedFiles-                     , Language.LSP.Types.WorkspaceEdit-                     , Language.LSP.Types.WorkspaceFolders-                     , Language.LSP.Types.WorkspaceSymbol-                     , Language.LSP.Types.Uri.OsPath- -- other-extensions:-  ghc-options:         -Wall-  build-depends:       base >= 4.11 && < 5-                     , aeson >=1.2.2.0-                     , binary-                     , containers-                     , data-default-                     , deepseq-                     , Diff >= 0.2-                     , dlist-                     , hashable-                     , lens >= 4.15.2-                     , mtl < 2.4-                     , network-uri >= 2.6-                     , mod-                     , scientific-                     , some-                     , text-                     , template-haskell-                     , unordered-containers-                     , exceptions-                     , safe-  if flag(force-ospath)-    build-depends: filepath ^>= 1.4.100.0-  else-    build-depends: filepath-  hs-source-dirs:      src-  default-language:    Haskell2010+  hs-source-dirs:     src generated+  default-language:   Haskell2010+  -- Various things we want on by default+  -- * syntactic niceties, QOL+  -- * we always want more deriving options+  -- * we want all data strict by default+  -- * we have lots of duplicte record fields+  -- * extended type class stuff particularly for the+  --   lens classes+  -- * fancy types for singletons etc.   default-extensions:+    DataKinds+    DeriveAnyClass+    DeriveGeneric+    DerivingStrategies+    DerivingVia     DuplicateRecordFields+    FlexibleInstances+    FunctionalDependencies+    GADTs+    GeneralizedNewtypeDeriving+    KindSignatures+    MultiParamTypeClasses+    NegativeLiterals+    OverloadedStrings+    PolyKinds+    ScopedTypeVariables+    StandaloneDeriving+    StandaloneKindSignatures     StrictData+    TypeApplications+    TypeFamilies+    TypeOperators+    UndecidableInstances +  build-depends:+    , aeson             >=1.2.2.0+    , base              >=4.11    && <5+    , binary+    , containers+    , data-default+    , deepseq+    , Diff              >=0.2+    , dlist+    , exceptions+    , hashable+    , lens              >=4.15.2+    , mod+    , mtl               <2.4+    , network-uri       >=2.6+    , row-types+    , safe+    , some+    , template-haskell+    , text+    -- needed for aeson < 1+    , unordered-containers++  if flag(force-ospath)+    build-depends: filepath ^>=1.4.100.0+  else+    build-depends: filepath++  ghc-options:+    -Wall -Wmissing-deriving-strategies+    -Wno-unticked-promoted-constructors++  exposed-modules:+    Data.IxMap+    Data.Row.Aeson+    Data.Row.Hashable+    Language.LSP.Protocol.Capabilities+    Language.LSP.Protocol.Message+    Language.LSP.Protocol.Types+    Language.LSP.Protocol.Lens+    Language.LSP.Protocol.Utils.Misc+    Language.LSP.Protocol.Utils.SMethodMap++  other-modules:+    Language.LSP.Protocol.Message.Lens+    Language.LSP.Protocol.Message.LspId+    Language.LSP.Protocol.Message.Meta+    Language.LSP.Protocol.Message.Method+    Language.LSP.Protocol.Message.Parsing+    Language.LSP.Protocol.Message.Registration+    Language.LSP.Protocol.Message.Types+    Language.LSP.Protocol.Types.CodeAction+    Language.LSP.Protocol.Types.Common+    Language.LSP.Protocol.Types.Edit+    Language.LSP.Protocol.Types.Lens+    Language.LSP.Protocol.Types.Location+    Language.LSP.Protocol.Types.LspEnum+    Language.LSP.Protocol.Types.MarkupContent+    Language.LSP.Protocol.Types.Orphans+    Language.LSP.Protocol.Types.Progress+    Language.LSP.Protocol.Types.SemanticTokens+    Language.LSP.Protocol.Types.Singletons+    Language.LSP.Protocol.Types.Uri+    Language.LSP.Protocol.Types.Uri.OsPath+    Language.LSP.Protocol.Types.WatchKinds++  -- The generated modules+  -- In principle these could be in a separate component,+  -- but a) the generated modules depend on some of the common code+  -- and b) some of the helper code depends on the generated modules+  -- It's simpler to just have everything in together, otherwise we'd+  -- actually need three layers!+  other-modules:+    Language.LSP.Protocol.Internal.Lens+    Language.LSP.Protocol.Internal.Method+    Language.LSP.Protocol.Internal.Types+    Language.LSP.Protocol.Internal.Types.AnnotatedTextEdit+    Language.LSP.Protocol.Internal.Types.ApplyWorkspaceEditParams+    Language.LSP.Protocol.Internal.Types.ApplyWorkspaceEditResult+    Language.LSP.Protocol.Internal.Types.BaseSymbolInformation+    Language.LSP.Protocol.Internal.Types.CallHierarchyClientCapabilities+    Language.LSP.Protocol.Internal.Types.CallHierarchyIncomingCall+    Language.LSP.Protocol.Internal.Types.CallHierarchyIncomingCallsParams+    Language.LSP.Protocol.Internal.Types.CallHierarchyItem+    Language.LSP.Protocol.Internal.Types.CallHierarchyOptions+    Language.LSP.Protocol.Internal.Types.CallHierarchyOutgoingCall+    Language.LSP.Protocol.Internal.Types.CallHierarchyOutgoingCallsParams+    Language.LSP.Protocol.Internal.Types.CallHierarchyPrepareParams+    Language.LSP.Protocol.Internal.Types.CallHierarchyRegistrationOptions+    Language.LSP.Protocol.Internal.Types.CancelParams+    Language.LSP.Protocol.Internal.Types.ChangeAnnotation+    Language.LSP.Protocol.Internal.Types.ChangeAnnotationIdentifier+    Language.LSP.Protocol.Internal.Types.ClientCapabilities+    Language.LSP.Protocol.Internal.Types.CodeAction+    Language.LSP.Protocol.Internal.Types.CodeActionClientCapabilities+    Language.LSP.Protocol.Internal.Types.CodeActionContext+    Language.LSP.Protocol.Internal.Types.CodeActionKind+    Language.LSP.Protocol.Internal.Types.CodeActionOptions+    Language.LSP.Protocol.Internal.Types.CodeActionParams+    Language.LSP.Protocol.Internal.Types.CodeActionRegistrationOptions+    Language.LSP.Protocol.Internal.Types.CodeActionTriggerKind+    Language.LSP.Protocol.Internal.Types.CodeDescription+    Language.LSP.Protocol.Internal.Types.CodeLens+    Language.LSP.Protocol.Internal.Types.CodeLensClientCapabilities+    Language.LSP.Protocol.Internal.Types.CodeLensOptions+    Language.LSP.Protocol.Internal.Types.CodeLensParams+    Language.LSP.Protocol.Internal.Types.CodeLensRegistrationOptions+    Language.LSP.Protocol.Internal.Types.CodeLensWorkspaceClientCapabilities+    Language.LSP.Protocol.Internal.Types.Color+    Language.LSP.Protocol.Internal.Types.ColorInformation+    Language.LSP.Protocol.Internal.Types.ColorPresentation+    Language.LSP.Protocol.Internal.Types.ColorPresentationParams+    Language.LSP.Protocol.Internal.Types.Command+    Language.LSP.Protocol.Internal.Types.CompletionClientCapabilities+    Language.LSP.Protocol.Internal.Types.CompletionContext+    Language.LSP.Protocol.Internal.Types.CompletionItem+    Language.LSP.Protocol.Internal.Types.CompletionItemKind+    Language.LSP.Protocol.Internal.Types.CompletionItemLabelDetails+    Language.LSP.Protocol.Internal.Types.CompletionItemTag+    Language.LSP.Protocol.Internal.Types.CompletionList+    Language.LSP.Protocol.Internal.Types.CompletionOptions+    Language.LSP.Protocol.Internal.Types.CompletionParams+    Language.LSP.Protocol.Internal.Types.CompletionRegistrationOptions+    Language.LSP.Protocol.Internal.Types.CompletionTriggerKind+    Language.LSP.Protocol.Internal.Types.ConfigurationItem+    Language.LSP.Protocol.Internal.Types.ConfigurationParams+    Language.LSP.Protocol.Internal.Types.CreateFile+    Language.LSP.Protocol.Internal.Types.CreateFileOptions+    Language.LSP.Protocol.Internal.Types.CreateFilesParams+    Language.LSP.Protocol.Internal.Types.Declaration+    Language.LSP.Protocol.Internal.Types.DeclarationClientCapabilities+    Language.LSP.Protocol.Internal.Types.DeclarationLink+    Language.LSP.Protocol.Internal.Types.DeclarationOptions+    Language.LSP.Protocol.Internal.Types.DeclarationParams+    Language.LSP.Protocol.Internal.Types.DeclarationRegistrationOptions+    Language.LSP.Protocol.Internal.Types.Definition+    Language.LSP.Protocol.Internal.Types.DefinitionClientCapabilities+    Language.LSP.Protocol.Internal.Types.DefinitionLink+    Language.LSP.Protocol.Internal.Types.DefinitionOptions+    Language.LSP.Protocol.Internal.Types.DefinitionParams+    Language.LSP.Protocol.Internal.Types.DefinitionRegistrationOptions+    Language.LSP.Protocol.Internal.Types.DeleteFile+    Language.LSP.Protocol.Internal.Types.DeleteFileOptions+    Language.LSP.Protocol.Internal.Types.DeleteFilesParams+    Language.LSP.Protocol.Internal.Types.Diagnostic+    Language.LSP.Protocol.Internal.Types.DiagnosticClientCapabilities+    Language.LSP.Protocol.Internal.Types.DiagnosticOptions+    Language.LSP.Protocol.Internal.Types.DiagnosticRegistrationOptions+    Language.LSP.Protocol.Internal.Types.DiagnosticRelatedInformation+    Language.LSP.Protocol.Internal.Types.DiagnosticServerCancellationData+    Language.LSP.Protocol.Internal.Types.DiagnosticSeverity+    Language.LSP.Protocol.Internal.Types.DiagnosticTag+    Language.LSP.Protocol.Internal.Types.DiagnosticWorkspaceClientCapabilities+    Language.LSP.Protocol.Internal.Types.DidChangeConfigurationClientCapabilities+    Language.LSP.Protocol.Internal.Types.DidChangeConfigurationParams+    Language.LSP.Protocol.Internal.Types.DidChangeConfigurationRegistrationOptions+    Language.LSP.Protocol.Internal.Types.DidChangeNotebookDocumentParams+    Language.LSP.Protocol.Internal.Types.DidChangeTextDocumentParams+    Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesClientCapabilities+    Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesParams+    Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesRegistrationOptions+    Language.LSP.Protocol.Internal.Types.DidChangeWorkspaceFoldersParams+    Language.LSP.Protocol.Internal.Types.DidCloseNotebookDocumentParams+    Language.LSP.Protocol.Internal.Types.DidCloseTextDocumentParams+    Language.LSP.Protocol.Internal.Types.DidOpenNotebookDocumentParams+    Language.LSP.Protocol.Internal.Types.DidOpenTextDocumentParams+    Language.LSP.Protocol.Internal.Types.DidSaveNotebookDocumentParams+    Language.LSP.Protocol.Internal.Types.DidSaveTextDocumentParams+    Language.LSP.Protocol.Internal.Types.DocumentColorClientCapabilities+    Language.LSP.Protocol.Internal.Types.DocumentColorOptions+    Language.LSP.Protocol.Internal.Types.DocumentColorParams+    Language.LSP.Protocol.Internal.Types.DocumentColorRegistrationOptions+    Language.LSP.Protocol.Internal.Types.DocumentDiagnosticParams+    Language.LSP.Protocol.Internal.Types.DocumentDiagnosticReport+    Language.LSP.Protocol.Internal.Types.DocumentDiagnosticReportKind+    Language.LSP.Protocol.Internal.Types.DocumentDiagnosticReportPartialResult+    Language.LSP.Protocol.Internal.Types.DocumentFilter+    Language.LSP.Protocol.Internal.Types.DocumentFormattingClientCapabilities+    Language.LSP.Protocol.Internal.Types.DocumentFormattingOptions+    Language.LSP.Protocol.Internal.Types.DocumentFormattingParams+    Language.LSP.Protocol.Internal.Types.DocumentFormattingRegistrationOptions+    Language.LSP.Protocol.Internal.Types.DocumentHighlight+    Language.LSP.Protocol.Internal.Types.DocumentHighlightClientCapabilities+    Language.LSP.Protocol.Internal.Types.DocumentHighlightKind+    Language.LSP.Protocol.Internal.Types.DocumentHighlightOptions+    Language.LSP.Protocol.Internal.Types.DocumentHighlightParams+    Language.LSP.Protocol.Internal.Types.DocumentHighlightRegistrationOptions+    Language.LSP.Protocol.Internal.Types.DocumentLink+    Language.LSP.Protocol.Internal.Types.DocumentLinkClientCapabilities+    Language.LSP.Protocol.Internal.Types.DocumentLinkOptions+    Language.LSP.Protocol.Internal.Types.DocumentLinkParams+    Language.LSP.Protocol.Internal.Types.DocumentLinkRegistrationOptions+    Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingClientCapabilities+    Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingOptions+    Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingParams+    Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingRegistrationOptions+    Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingClientCapabilities+    Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingOptions+    Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingParams+    Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingRegistrationOptions+    Language.LSP.Protocol.Internal.Types.DocumentSelector+    Language.LSP.Protocol.Internal.Types.DocumentSymbol+    Language.LSP.Protocol.Internal.Types.DocumentSymbolClientCapabilities+    Language.LSP.Protocol.Internal.Types.DocumentSymbolOptions+    Language.LSP.Protocol.Internal.Types.DocumentSymbolParams+    Language.LSP.Protocol.Internal.Types.DocumentSymbolRegistrationOptions+    Language.LSP.Protocol.Internal.Types.ErrorCodes+    Language.LSP.Protocol.Internal.Types.ExecuteCommandClientCapabilities+    Language.LSP.Protocol.Internal.Types.ExecuteCommandOptions+    Language.LSP.Protocol.Internal.Types.ExecuteCommandParams+    Language.LSP.Protocol.Internal.Types.ExecuteCommandRegistrationOptions+    Language.LSP.Protocol.Internal.Types.ExecutionSummary+    Language.LSP.Protocol.Internal.Types.FailureHandlingKind+    Language.LSP.Protocol.Internal.Types.FileChangeType+    Language.LSP.Protocol.Internal.Types.FileCreate+    Language.LSP.Protocol.Internal.Types.FileDelete+    Language.LSP.Protocol.Internal.Types.FileEvent+    Language.LSP.Protocol.Internal.Types.FileOperationClientCapabilities+    Language.LSP.Protocol.Internal.Types.FileOperationFilter+    Language.LSP.Protocol.Internal.Types.FileOperationOptions+    Language.LSP.Protocol.Internal.Types.FileOperationPattern+    Language.LSP.Protocol.Internal.Types.FileOperationPatternKind+    Language.LSP.Protocol.Internal.Types.FileOperationPatternOptions+    Language.LSP.Protocol.Internal.Types.FileOperationRegistrationOptions+    Language.LSP.Protocol.Internal.Types.FileRename+    Language.LSP.Protocol.Internal.Types.FileSystemWatcher+    Language.LSP.Protocol.Internal.Types.FoldingRange+    Language.LSP.Protocol.Internal.Types.FoldingRangeClientCapabilities+    Language.LSP.Protocol.Internal.Types.FoldingRangeKind+    Language.LSP.Protocol.Internal.Types.FoldingRangeOptions+    Language.LSP.Protocol.Internal.Types.FoldingRangeParams+    Language.LSP.Protocol.Internal.Types.FoldingRangeRegistrationOptions+    Language.LSP.Protocol.Internal.Types.FormattingOptions+    Language.LSP.Protocol.Internal.Types.FullDocumentDiagnosticReport+    Language.LSP.Protocol.Internal.Types.GeneralClientCapabilities+    Language.LSP.Protocol.Internal.Types.GlobPattern+    Language.LSP.Protocol.Internal.Types.Hover+    Language.LSP.Protocol.Internal.Types.HoverClientCapabilities+    Language.LSP.Protocol.Internal.Types.HoverOptions+    Language.LSP.Protocol.Internal.Types.HoverParams+    Language.LSP.Protocol.Internal.Types.HoverRegistrationOptions+    Language.LSP.Protocol.Internal.Types.ImplementationClientCapabilities+    Language.LSP.Protocol.Internal.Types.ImplementationOptions+    Language.LSP.Protocol.Internal.Types.ImplementationParams+    Language.LSP.Protocol.Internal.Types.ImplementationRegistrationOptions+    Language.LSP.Protocol.Internal.Types.InitializedParams+    Language.LSP.Protocol.Internal.Types.InitializeError+    Language.LSP.Protocol.Internal.Types.InitializeParams+    Language.LSP.Protocol.Internal.Types.InitializeResult+    Language.LSP.Protocol.Internal.Types.InlayHint+    Language.LSP.Protocol.Internal.Types.InlayHintClientCapabilities+    Language.LSP.Protocol.Internal.Types.InlayHintKind+    Language.LSP.Protocol.Internal.Types.InlayHintLabelPart+    Language.LSP.Protocol.Internal.Types.InlayHintOptions+    Language.LSP.Protocol.Internal.Types.InlayHintParams+    Language.LSP.Protocol.Internal.Types.InlayHintRegistrationOptions+    Language.LSP.Protocol.Internal.Types.InlayHintWorkspaceClientCapabilities+    Language.LSP.Protocol.Internal.Types.InlineValue+    Language.LSP.Protocol.Internal.Types.InlineValueClientCapabilities+    Language.LSP.Protocol.Internal.Types.InlineValueContext+    Language.LSP.Protocol.Internal.Types.InlineValueEvaluatableExpression+    Language.LSP.Protocol.Internal.Types.InlineValueOptions+    Language.LSP.Protocol.Internal.Types.InlineValueParams+    Language.LSP.Protocol.Internal.Types.InlineValueRegistrationOptions+    Language.LSP.Protocol.Internal.Types.InlineValueText+    Language.LSP.Protocol.Internal.Types.InlineValueVariableLookup+    Language.LSP.Protocol.Internal.Types.InlineValueWorkspaceClientCapabilities+    Language.LSP.Protocol.Internal.Types.InsertReplaceEdit+    Language.LSP.Protocol.Internal.Types.InsertTextFormat+    Language.LSP.Protocol.Internal.Types.InsertTextMode+    Language.LSP.Protocol.Internal.Types.LinkedEditingRangeClientCapabilities+    Language.LSP.Protocol.Internal.Types.LinkedEditingRangeOptions+    Language.LSP.Protocol.Internal.Types.LinkedEditingRangeParams+    Language.LSP.Protocol.Internal.Types.LinkedEditingRangeRegistrationOptions+    Language.LSP.Protocol.Internal.Types.LinkedEditingRanges+    Language.LSP.Protocol.Internal.Types.Location+    Language.LSP.Protocol.Internal.Types.LocationLink+    Language.LSP.Protocol.Internal.Types.LogMessageParams+    Language.LSP.Protocol.Internal.Types.LogTraceParams+    Language.LSP.Protocol.Internal.Types.LSPErrorCodes+    Language.LSP.Protocol.Internal.Types.MarkdownClientCapabilities+    Language.LSP.Protocol.Internal.Types.MarkedString+    Language.LSP.Protocol.Internal.Types.MarkupContent+    Language.LSP.Protocol.Internal.Types.MarkupKind+    Language.LSP.Protocol.Internal.Types.MessageActionItem+    Language.LSP.Protocol.Internal.Types.MessageType+    Language.LSP.Protocol.Internal.Types.Moniker+    Language.LSP.Protocol.Internal.Types.MonikerClientCapabilities+    Language.LSP.Protocol.Internal.Types.MonikerKind+    Language.LSP.Protocol.Internal.Types.MonikerOptions+    Language.LSP.Protocol.Internal.Types.MonikerParams+    Language.LSP.Protocol.Internal.Types.MonikerRegistrationOptions+    Language.LSP.Protocol.Internal.Types.NotebookCell+    Language.LSP.Protocol.Internal.Types.NotebookCellArrayChange+    Language.LSP.Protocol.Internal.Types.NotebookCellKind+    Language.LSP.Protocol.Internal.Types.NotebookCellTextDocumentFilter+    Language.LSP.Protocol.Internal.Types.NotebookDocument+    Language.LSP.Protocol.Internal.Types.NotebookDocumentChangeEvent+    Language.LSP.Protocol.Internal.Types.NotebookDocumentClientCapabilities+    Language.LSP.Protocol.Internal.Types.NotebookDocumentFilter+    Language.LSP.Protocol.Internal.Types.NotebookDocumentIdentifier+    Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncClientCapabilities+    Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncOptions+    Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncRegistrationOptions+    Language.LSP.Protocol.Internal.Types.OptionalVersionedTextDocumentIdentifier+    Language.LSP.Protocol.Internal.Types.ParameterInformation+    Language.LSP.Protocol.Internal.Types.PartialResultParams+    Language.LSP.Protocol.Internal.Types.Pattern+    Language.LSP.Protocol.Internal.Types.Position+    Language.LSP.Protocol.Internal.Types.PositionEncodingKind+    Language.LSP.Protocol.Internal.Types.PrepareRenameParams+    Language.LSP.Protocol.Internal.Types.PrepareRenameResult+    Language.LSP.Protocol.Internal.Types.PrepareSupportDefaultBehavior+    Language.LSP.Protocol.Internal.Types.PreviousResultId+    Language.LSP.Protocol.Internal.Types.ProgressParams+    Language.LSP.Protocol.Internal.Types.ProgressToken+    Language.LSP.Protocol.Internal.Types.PublishDiagnosticsClientCapabilities+    Language.LSP.Protocol.Internal.Types.PublishDiagnosticsParams+    Language.LSP.Protocol.Internal.Types.Range+    Language.LSP.Protocol.Internal.Types.ReferenceClientCapabilities+    Language.LSP.Protocol.Internal.Types.ReferenceContext+    Language.LSP.Protocol.Internal.Types.ReferenceOptions+    Language.LSP.Protocol.Internal.Types.ReferenceParams+    Language.LSP.Protocol.Internal.Types.ReferenceRegistrationOptions+    Language.LSP.Protocol.Internal.Types.Registration+    Language.LSP.Protocol.Internal.Types.RegistrationParams+    Language.LSP.Protocol.Internal.Types.RegularExpressionsClientCapabilities+    Language.LSP.Protocol.Internal.Types.RelatedFullDocumentDiagnosticReport+    Language.LSP.Protocol.Internal.Types.RelatedUnchangedDocumentDiagnosticReport+    Language.LSP.Protocol.Internal.Types.RelativePattern+    Language.LSP.Protocol.Internal.Types.RenameClientCapabilities+    Language.LSP.Protocol.Internal.Types.RenameFile+    Language.LSP.Protocol.Internal.Types.RenameFileOptions+    Language.LSP.Protocol.Internal.Types.RenameFilesParams+    Language.LSP.Protocol.Internal.Types.RenameOptions+    Language.LSP.Protocol.Internal.Types.RenameParams+    Language.LSP.Protocol.Internal.Types.RenameRegistrationOptions+    Language.LSP.Protocol.Internal.Types.ResourceOperation+    Language.LSP.Protocol.Internal.Types.ResourceOperationKind+    Language.LSP.Protocol.Internal.Types.SaveOptions+    Language.LSP.Protocol.Internal.Types.SelectionRange+    Language.LSP.Protocol.Internal.Types.SelectionRangeClientCapabilities+    Language.LSP.Protocol.Internal.Types.SelectionRangeOptions+    Language.LSP.Protocol.Internal.Types.SelectionRangeParams+    Language.LSP.Protocol.Internal.Types.SelectionRangeRegistrationOptions+    Language.LSP.Protocol.Internal.Types.SemanticTokenModifiers+    Language.LSP.Protocol.Internal.Types.SemanticTokens+    Language.LSP.Protocol.Internal.Types.SemanticTokensClientCapabilities+    Language.LSP.Protocol.Internal.Types.SemanticTokensDelta+    Language.LSP.Protocol.Internal.Types.SemanticTokensDeltaParams+    Language.LSP.Protocol.Internal.Types.SemanticTokensDeltaPartialResult+    Language.LSP.Protocol.Internal.Types.SemanticTokensEdit+    Language.LSP.Protocol.Internal.Types.SemanticTokensLegend+    Language.LSP.Protocol.Internal.Types.SemanticTokensOptions+    Language.LSP.Protocol.Internal.Types.SemanticTokensParams+    Language.LSP.Protocol.Internal.Types.SemanticTokensPartialResult+    Language.LSP.Protocol.Internal.Types.SemanticTokensRangeParams+    Language.LSP.Protocol.Internal.Types.SemanticTokensRegistrationOptions+    Language.LSP.Protocol.Internal.Types.SemanticTokensWorkspaceClientCapabilities+    Language.LSP.Protocol.Internal.Types.SemanticTokenTypes+    Language.LSP.Protocol.Internal.Types.ServerCapabilities+    Language.LSP.Protocol.Internal.Types.SetTraceParams+    Language.LSP.Protocol.Internal.Types.ShowDocumentClientCapabilities+    Language.LSP.Protocol.Internal.Types.ShowDocumentParams+    Language.LSP.Protocol.Internal.Types.ShowDocumentResult+    Language.LSP.Protocol.Internal.Types.ShowMessageParams+    Language.LSP.Protocol.Internal.Types.ShowMessageRequestClientCapabilities+    Language.LSP.Protocol.Internal.Types.ShowMessageRequestParams+    Language.LSP.Protocol.Internal.Types.SignatureHelp+    Language.LSP.Protocol.Internal.Types.SignatureHelpClientCapabilities+    Language.LSP.Protocol.Internal.Types.SignatureHelpContext+    Language.LSP.Protocol.Internal.Types.SignatureHelpOptions+    Language.LSP.Protocol.Internal.Types.SignatureHelpParams+    Language.LSP.Protocol.Internal.Types.SignatureHelpRegistrationOptions+    Language.LSP.Protocol.Internal.Types.SignatureHelpTriggerKind+    Language.LSP.Protocol.Internal.Types.SignatureInformation+    Language.LSP.Protocol.Internal.Types.StaticRegistrationOptions+    Language.LSP.Protocol.Internal.Types.SymbolInformation+    Language.LSP.Protocol.Internal.Types.SymbolKind+    Language.LSP.Protocol.Internal.Types.SymbolTag+    Language.LSP.Protocol.Internal.Types.TextDocumentChangeRegistrationOptions+    Language.LSP.Protocol.Internal.Types.TextDocumentClientCapabilities+    Language.LSP.Protocol.Internal.Types.TextDocumentContentChangeEvent+    Language.LSP.Protocol.Internal.Types.TextDocumentEdit+    Language.LSP.Protocol.Internal.Types.TextDocumentFilter+    Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier+    Language.LSP.Protocol.Internal.Types.TextDocumentItem+    Language.LSP.Protocol.Internal.Types.TextDocumentPositionParams+    Language.LSP.Protocol.Internal.Types.TextDocumentRegistrationOptions+    Language.LSP.Protocol.Internal.Types.TextDocumentSaveReason+    Language.LSP.Protocol.Internal.Types.TextDocumentSaveRegistrationOptions+    Language.LSP.Protocol.Internal.Types.TextDocumentSyncClientCapabilities+    Language.LSP.Protocol.Internal.Types.TextDocumentSyncKind+    Language.LSP.Protocol.Internal.Types.TextDocumentSyncOptions+    Language.LSP.Protocol.Internal.Types.TextEdit+    Language.LSP.Protocol.Internal.Types.TokenFormat+    Language.LSP.Protocol.Internal.Types.TraceValues+    Language.LSP.Protocol.Internal.Types.TypeDefinitionClientCapabilities+    Language.LSP.Protocol.Internal.Types.TypeDefinitionOptions+    Language.LSP.Protocol.Internal.Types.TypeDefinitionParams+    Language.LSP.Protocol.Internal.Types.TypeDefinitionRegistrationOptions+    Language.LSP.Protocol.Internal.Types.TypeHierarchyClientCapabilities+    Language.LSP.Protocol.Internal.Types.TypeHierarchyItem+    Language.LSP.Protocol.Internal.Types.TypeHierarchyOptions+    Language.LSP.Protocol.Internal.Types.TypeHierarchyPrepareParams+    Language.LSP.Protocol.Internal.Types.TypeHierarchyRegistrationOptions+    Language.LSP.Protocol.Internal.Types.TypeHierarchySubtypesParams+    Language.LSP.Protocol.Internal.Types.TypeHierarchySupertypesParams+    Language.LSP.Protocol.Internal.Types.UInitializeParams+    Language.LSP.Protocol.Internal.Types.UnchangedDocumentDiagnosticReport+    Language.LSP.Protocol.Internal.Types.UniquenessLevel+    Language.LSP.Protocol.Internal.Types.Unregistration+    Language.LSP.Protocol.Internal.Types.UnregistrationParams+    Language.LSP.Protocol.Internal.Types.VersionedNotebookDocumentIdentifier+    Language.LSP.Protocol.Internal.Types.VersionedTextDocumentIdentifier+    Language.LSP.Protocol.Internal.Types.WatchKind+    Language.LSP.Protocol.Internal.Types.WillSaveTextDocumentParams+    Language.LSP.Protocol.Internal.Types.WindowClientCapabilities+    Language.LSP.Protocol.Internal.Types.WorkDoneProgressBegin+    Language.LSP.Protocol.Internal.Types.WorkDoneProgressCancelParams+    Language.LSP.Protocol.Internal.Types.WorkDoneProgressCreateParams+    Language.LSP.Protocol.Internal.Types.WorkDoneProgressEnd+    Language.LSP.Protocol.Internal.Types.WorkDoneProgressOptions+    Language.LSP.Protocol.Internal.Types.WorkDoneProgressParams+    Language.LSP.Protocol.Internal.Types.WorkDoneProgressReport+    Language.LSP.Protocol.Internal.Types.WorkspaceClientCapabilities+    Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticParams+    Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticReport+    Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticReportPartialResult+    Language.LSP.Protocol.Internal.Types.WorkspaceDocumentDiagnosticReport+    Language.LSP.Protocol.Internal.Types.WorkspaceEdit+    Language.LSP.Protocol.Internal.Types.WorkspaceEditClientCapabilities+    Language.LSP.Protocol.Internal.Types.WorkspaceFolder+    Language.LSP.Protocol.Internal.Types.WorkspaceFoldersChangeEvent+    Language.LSP.Protocol.Internal.Types.WorkspaceFoldersInitializeParams+    Language.LSP.Protocol.Internal.Types.WorkspaceFoldersServerCapabilities+    Language.LSP.Protocol.Internal.Types.WorkspaceFullDocumentDiagnosticReport+    Language.LSP.Protocol.Internal.Types.WorkspaceSymbol+    Language.LSP.Protocol.Internal.Types.WorkspaceSymbolClientCapabilities+    Language.LSP.Protocol.Internal.Types.WorkspaceSymbolOptions+    Language.LSP.Protocol.Internal.Types.WorkspaceSymbolParams+    Language.LSP.Protocol.Internal.Types.WorkspaceSymbolRegistrationOptions+    Language.LSP.Protocol.Internal.Types.WorkspaceUnchangedDocumentDiagnosticReport++library metamodel+  -- We don't currently re-export this from the main+  -- library, but it's here if people want it+  visibility: public+  hs-source-dirs:     metamodel+  default-language:   Haskell2010+  default-extensions: StrictData+  exposed-modules:+    Language.LSP.MetaModel+    Language.LSP.MetaModel.Types++  build-depends:+    , aeson             >=1.2.2.0+    , base              >=4.11    && <5+    , file-embed+    , lens              >=4.15.2+    , template-haskell+    , text++executable generator+  hs-source-dirs:     generator+  default-language:   Haskell2010+  default-extensions: StrictData+  main-is:            Main.hs+  other-modules:      CodeGen+  build-depends:+    , base                 >=4.11 && <5+    , containers+    , directory+    , filepath+    , lsp-types:metamodel+    , mtl+    , prettyprinter+    , regex+    , text+ test-suite lsp-types-test-  type:                exitcode-stdio-1.0-  hs-source-dirs:      test-  main-is:             Main.hs-  other-modules:       Spec-                       CapabilitiesSpec-                       JsonSpec-                       MethodSpec-                       ServerCapabilitiesSpec-                       SemanticTokensSpec-                       TypesSpec-                       URIFilePathSpec-                       WorkspaceEditSpec-                       LocationSpec-  build-depends:       base-                     , QuickCheck-                     -- for instance Arbitrary Value-                     , aeson >= 2.0.3.0-                     , filepath-                     , hspec-                     , lsp-types-                     , lens >= 4.15.2-                     , network-uri-                     , quickcheck-instances-                     , text-                     , tuple-  build-tool-depends:  hspec-discover:hspec-discover-  ghc-options:         -threaded -rtsopts -with-rtsopts=-N -Wall-  default-language:    Haskell2010+  type:               exitcode-stdio-1.0+  hs-source-dirs:     test+  default-language:   Haskell2010+  main-is:            Main.hs+  other-modules:+    CapabilitiesSpec+    JsonSpec+    LocationSpec+    MethodSpec+    SemanticTokensSpec+    ServerCapabilitiesSpec+    Spec+    TypesSpec+    URIFilePathSpec+    WorkspaceEditSpec -source-repository head-  type:     git-  location: https://github.com/haskell/lsp+  ghc-options:        -threaded -rtsopts -with-rtsopts=-N -Wall++  build-depends:+    , aeson                 >=2.0.3.0+    , base+    , filepath+    , hspec+    , lens                  >=4.15.2+    , lsp-types+    , network-uri+    , QuickCheck+    , quickcheck-instances+    , row-types+    , text++  build-tool-depends: hspec-discover:hspec-discover
+ metamodel/Language/LSP/MetaModel.hs view
@@ -0,0 +1,12 @@+{-# LANGUAGE TemplateHaskell       #-}++module Language.LSP.MetaModel (module Export, metaModel) where++import Language.LSP.MetaModel.Types as Export++import Data.FileEmbed (makeRelativeToProject)+import qualified Language.Haskell.TH as TH++-- | The metamodel used to generate the LSP types in this package.+metaModel :: MetaModel+metaModel = $(loadMetaModelFromFile =<< makeRelativeToProject "metaModel.json")
+ metamodel/Language/LSP/MetaModel/Types.hs view
@@ -0,0 +1,259 @@+{-# LANGUAGE DataKinds             #-}+{-# LANGUAGE DerivingStrategies             #-}+{-# LANGUAGE DeriveLift             #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE GADTs                 #-}+{-# LANGUAGE KindSignatures        #-}+{-# LANGUAGE LambdaCase            #-}+{-# LANGUAGE OverloadedStrings     #-}+{-# LANGUAGE ScopedTypeVariables   #-}+{-# LANGUAGE TemplateHaskell       #-}+{-# LANGUAGE TypeApplications      #-}+{-|+This defines the types of the LSP "metamodel", which is a machine-readable format specifying the+types used in the LSP protocol.++The type system is quite typescript-y, which isn't surprising given that the whole protocol is+very typescript-y.++A typescript version of the metamodel types can be found here, which is useful for constructing+this Haskell model of them:+https://github.com/microsoft/vscode-languageserver-node/blob/main/tools/src/metaModel.ts+-}+module Language.LSP.MetaModel.Types where++import           Data.Aeson         hiding (Null, String)+import qualified Data.Aeson         as JSON+import qualified Data.Aeson.TH      as JSON+import qualified Data.Char          as Char+import           Data.Text          (Text)++import           Control.Lens+import           Control.Monad.IO.Class+import qualified Data.List.NonEmpty as NE++import Language.Haskell.TH.Syntax (Lift(..), Q, Exp, addDependentFile)++-- | What direction is this message sent in: server to client, client to server, or both?+data MessageDirection = ServerToClient | ClientToServer | Both+  deriving stock (Show, Eq, Ord, Lift)++instance ToJSON MessageDirection where+  toJSON ServerToClient = toJSON @String "serverToClient"+  toJSON ClientToServer = toJSON @String "clientToServer"+  toJSON Both           = toJSON @String "both"++instance FromJSON MessageDirection where+  parseJSON = withText "MessageDirection" $ \case+    "serverToClient" -> pure ServerToClient+    "clientToServer" -> pure ClientToServer+    "both"           -> pure Both+    t                -> fail $ "unknown message direction " ++ show t++-- | The "base types" in the metamodel.+data BaseTypeName = URI | DocumentUri | Integer | UInteger | Decimal | RegExp | String | Boolean | Null+  deriving stock (Show, Eq, Ord, Lift)++-- | A property of a structure.+data Property = Property+  { name          :: Text+  , type_         :: Type+  , optional      :: Maybe Bool+  , documentation :: Maybe Text+  , since         :: Maybe Text+  , proposed      :: Maybe Bool+  , deprecated    :: Maybe Text+  }+  deriving stock (Show, Eq, Ord, Lift)++-- | An anonymous structure type.+data StructureLiteral = StructureLiteral+  { properties    :: [Property]+  , documentation :: Maybe Text+  , since         :: Maybe Text+  , proposed      :: Maybe Bool+  , deprecated    :: Maybe Text+  }+  deriving stock (Show, Eq, Ord, Lift)++-- | The various kinds of type in the metamodel.+data Type =+  BaseType { btName :: BaseTypeName }+  | ReferenceType { rtName :: Text }+  | ArrayType { atElement :: Type }+  | MapType { mKey :: Type, mValue :: Type }+  | AndType { aItems :: NE.NonEmpty Type }+  | OrType { oItems :: NE.NonEmpty Type }+  | TupleType { tItems :: [Type] }+  | StructureLiteralType { stlValue :: StructureLiteral }+  | StringLiteralType { slValue :: Text }+  | IntegerLiteralType { ilValue :: Integer }+  | BooleanLiteralType { blValue :: Bool }+  deriving stock (Show, Eq, Ord, Lift)++-- | A request message.+data Request = Request+  { method              :: Text+  , params              :: Maybe Type -- typescript says it can be [Type], but it never is so whatever+  , result              :: Type+  , partialResult       :: Maybe Type+  , errorData           :: Maybe Type+  , registrationOptions :: Maybe Type+  , messageDirection    :: MessageDirection+  , documentation       :: Maybe Text+  , since               :: Maybe Text+  , proposed            :: Maybe Bool+  , deprecated          :: Maybe Text+  }+  deriving stock (Show, Eq, Ord, Lift)++-- | A notification message.+data Notification = Notification+  { method              :: Text+  , params              :: Maybe Type+  , registrationOptions :: Maybe Type+  , messageDirection    :: MessageDirection+  , documentation       :: Maybe Text+  , since               :: Maybe Text+  , proposed            :: Maybe Bool+  , deprecated          :: Maybe Text+  }+  deriving stock (Show, Eq, Ord, Lift)++-- | A structure type.+data Structure = Structure+  { name          :: Text+  , extends       :: Maybe [Type]+  , mixins        :: Maybe [Type]+  , properties    :: [Property]+  , documentation :: Maybe Text+  , since         :: Maybe Text+  , proposed      :: Maybe Bool+  , deprecated    :: Maybe Text+  }+  deriving stock (Show, Eq, Ord, Lift)++-- | A type alias.+data TypeAlias = TypeAlias+  { name          :: Text+  , type_         :: Type+  , documentation :: Maybe Text+  , since         :: Maybe Text+  , proposed      :: Maybe Bool+  , deprecated    :: Maybe Text+  }+  deriving stock (Show, Eq, Ord, Lift)++-- | This is just 'string | int' on the typescript side, but+-- it's convenient to have a proper type here.+data TextOrInteger = T Text | I Integer+  deriving stock (Show, Eq, Ord, Lift)++-- | An entry in an enumeration.+data EnumerationEntry = EnumerationEntry+  { name          :: Text+  , value         :: TextOrInteger+  , documentation :: Maybe Text+  , since         :: Maybe Text+  , proposed      :: Maybe Bool+  , deprecated    :: Maybe Text+  }+  deriving stock (Show, Eq, Ord, Lift)++-- | An enumeration type.+data Enumeration = Enumeration+  { name                 :: Text+  , type_                :: Type+  , values               :: [EnumerationEntry]+  , supportsCustomValues :: Maybe Bool+  , documentation        :: Maybe Text+  , since                :: Maybe Text+  , proposed             :: Maybe Bool+  , deprecated           :: Maybe Text+  }+  deriving stock (Show, Eq, Ord, Lift)++-- | Metadata about the metamodel iteslf.+data MetaData = MetaData+  { version :: Text+  }+  deriving stock (Show, Eq, Ord, Lift)++-- | The entire metamodel.+data MetaModel = MetaModel+  { metaData      :: MetaData+  , requests      :: [Request]+  , notifications :: [Notification]+  , structures    :: [Structure]+  , enumerations  :: [Enumeration]+  , typeAliases   :: [TypeAlias]+  }+  deriving stock (Show, Eq, Ord, Lift)++-- We need to do some massaging to make sure that we get the right aeson instances for+-- these types and can actually parse the incoming data!+$(+  let+      -- "type" is a very common field name, we use "type_" on the Haskell side+      defOpts = defaultOptions{fieldLabelModifier = \case { "type_" -> "type"; x -> x; }}++      propertyInst = JSON.deriveJSON defOpts ''Property+      slInst = JSON.deriveJSON defOpts ''StructureLiteral++      -- 'BaseType' is a union of strings, so we encode it as an untagged sum with some+      -- mangling of the constructor names+      baseTyNameToTag :: String -> String+      baseTyNameToTag = \case+        "Integer"  -> "integer"+        "UInteger" -> "uinteger"+        "Decimal"  -> "decimal"+        "String"   -> "string"+        "Boolean"  -> "boolean"+        "Null"     -> "null"+        x          -> x+      baseTyNameInst = JSON.deriveJSON (defOpts{sumEncoding=JSON.UntaggedValue, constructorTagModifier=baseTyNameToTag}) ''BaseTypeName++      -- 'Type' is a *tagged* union, but the tag is a string field (sigh), fortunately+      -- aeson can deal with this. Also needs some constructor mangling.+      typeToTag :: String -> String+      typeToTag = \case+        "BaseType"             -> "base"+        "ReferenceType"        -> "reference"+        "ArrayType"            -> "array"+        "MapType"              -> "map"+        "AndType"              -> "and"+        "OrType"               -> "or"+        "TupleType"            -> "tuple"+        "StructureLiteralType" -> "literal"+        "StringLiteralType"    -> "stringLiteral"+        "IntegerLiteralType"   -> "integerLiteral"+        "BooleanLiteralType"   -> "booleanLiteral"+        x                      -> x+      typeOpts = defOpts+        { sumEncoding=JSON.defaultTaggedObject{tagFieldName="kind"}+        , constructorTagModifier=typeToTag+        , fieldLabelModifier= \s -> over _head Char.toLower $ Prelude.dropWhile Char.isLower s+        }+      typeInst = JSON.deriveJSON typeOpts ''Type++      -- The rest are mostly normal+      reqInst = JSON.deriveJSON defOpts ''Request+      notInst = JSON.deriveJSON defOpts ''Notification+      sInst = JSON.deriveJSON defOpts ''Structure+      taInst = JSON.deriveJSON defOpts ''TypeAlias+      -- TextOrInteger is also an untagged sum+      tiInst = JSON.deriveJSON (defOpts{sumEncoding=UntaggedValue}) ''TextOrInteger+      eeInst = JSON.deriveJSON defOpts ''EnumerationEntry+      eInst = JSON.deriveJSON defOpts ''Enumeration+      mdInst = JSON.deriveJSON defOpts ''MetaData+      mmInst = JSON.deriveJSON defOpts ''MetaModel+  in mconcat <$> sequence [ propertyInst, slInst, baseTyNameInst, typeInst, reqInst, notInst, sInst, taInst, tiInst, eeInst, eInst, mdInst, mmInst ]+ )++loadMetaModelFromFile :: FilePath -> Q Exp+loadMetaModelFromFile fp = do+  addDependentFile fp+  res <- liftIO $ JSON.eitherDecodeFileStrict' fp+  case res of+    Left e   -> fail e+    Right (mm :: MetaModel) -> lift mm
src/Data/IxMap.hs view
@@ -1,16 +1,16 @@+{-# LANGUAGE BangPatterns     #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE RankNTypes       #-} {-# LANGUAGE TypeFamilies     #-} {-# LANGUAGE TypeInType       #-}-{-# LANGUAGE RankNTypes       #-}-{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ViewPatterns     #-}-{-# LANGUAGE BangPatterns     #-}  module Data.IxMap where +import           Data.Kind import qualified Data.Map.Strict as M-import Data.Some-import Data.Kind-import Unsafe.Coerce+import           Data.Some+import           Unsafe.Coerce  -- a `compare` b <=> toBase a `compare` toBase b -- toBase (i :: f a) == toBase (j :: f b) <=> a ~ b@@ -22,7 +22,7 @@  emptyIxMap :: IxMap k f emptyIxMap = IxMap M.empty- + insertIxMap :: IxOrd k => k m -> f m -> IxMap k f -> Maybe (IxMap k f) insertIxMap (toBase -> i) x (IxMap m)   | M.notMember i m = Just $ IxMap $ M.insert i (mkSome x) m@@ -32,10 +32,10 @@ lookupIxMap i (IxMap m) =   case M.lookup (toBase i) m of     Just (Some v) -> Just $ unsafeCoerce v-    Nothing -> Nothing+    Nothing       -> Nothing  pickFromIxMap :: IxOrd k => k m -> IxMap k f -> (Maybe (f m), IxMap k f) pickFromIxMap i (IxMap m) =   case M.updateLookupWithKey (\_ _ -> Nothing) (toBase i) m of-    (Nothing,!m') -> (Nothing,IxMap m')+    (Nothing,!m')       -> (Nothing,IxMap m')     (Just (Some k),!m') -> (Just (unsafeCoerce k),IxMap m')
+ src/Data/Row/Aeson.hs view
@@ -0,0 +1,100 @@+{-# LANGUAGE FlexibleContexts     #-}+{-# LANGUAGE FlexibleInstances    #-}+{-# LANGUAGE ScopedTypeVariables  #-}+{-# LANGUAGE TypeApplications     #-}+{-# LANGUAGE TypeOperators        #-}+{-# LANGUAGE UndecidableInstances #-}++{-# OPTIONS_GHC -Wno-orphans #-}++{-|+This module defines orphan `aeson` instances for `Data.Row`.+They differ from the instances in `row-types-aeson` in one crucial respect: they+serialise `Nothing` fields by *omitting* them in the resulting object, and parse absent fields as `Nothing`.+`aeson` can be configured to have this behviour for instances for datatypes, but we want to do this+for record types generically.++This is crucial to match what LSP clients expect.+-}+module Data.Row.Aeson where++import           Data.Aeson+import           Data.Aeson.Types      (Parser, typeMismatch)+import           Data.List             (intercalate)++import           Data.Row+import           Data.Row.Internal+import qualified Data.Row.Records      as Rec++import           Data.Bifunctor        (second)+import           Data.Functor.Const+import           Data.Functor.Identity+import           Data.Proxy+import           Data.String++-- `aeson` does not need such a typeclass because it generates code per-instance+-- that handles this, whereas we want to work generically.++-- | Serialise a value as an entry in a JSON object. This allows customizing the+-- behaviour in the object context, in order to e.g. omit the field.+class ToJSONEntry a where+  -- We use String so we can use fromString on it to get a key that works+  -- in both aeson-1 and aeson-2+  toJSONEntry :: String -> a -> Object++instance {-# OVERLAPPING #-} ToJSON a => ToJSONEntry (Maybe a) where+  -- Omit Nothing fields+  toJSONEntry _ Nothing = mempty+  toJSONEntry k v       = fromString k .= toJSON v++instance {-# OVERLAPPABLE #-} ToJSON a => ToJSONEntry a where+  toJSONEntry k v = fromString k .= toJSON v++class FromJSONEntry a where+  parseJSONEntry :: Object -> String -> Parser a++instance {-# OVERLAPPING #-} FromJSON a => FromJSONEntry (Maybe a) where+  -- Parse Nothing fields as optional+  parseJSONEntry o k = o .:? (fromString k)++instance {-# OVERLAPPABLE #-} FromJSON a => FromJSONEntry a where+  parseJSONEntry o k = o .: (fromString k)++------++instance Forall r ToJSONEntry => ToJSON (Rec r) where+  -- Sadly, there appears to be no helper we can use that gives us access to the keys, so I just used metamorph directly+  -- adapted from 'eraseWithLabels'+  toJSON rc = Object $ getConst $ metamorph @_ @r @ToJSONEntry @(,) @Rec @(Const Object) @Identity Proxy doNil doUncons doCons rc+      where+        doNil :: Rec Empty -> Const Object Empty+        doNil _ = Const mempty+        doUncons+          :: forall l r'+          . (KnownSymbol l)+          => Label l+          -> Rec r'+          -> (Rec (r' .- l), Identity (r' .! l))+        doUncons l = second Identity . lazyUncons l+        doCons+          :: forall l t r'+          . (KnownSymbol l, ToJSONEntry t)+          => Label l+          -> (Const Object r', Identity t)+          -> Const Object (Extend l t r')+        doCons l (Const c, Identity x) = Const $ toJSONEntry (show' l) x <> c++instance (AllUniqueLabels r, Forall r FromJSONEntry) => FromJSON (Rec r) where+  parseJSON (Object o) = do+    r <- Rec.fromLabelsA @FromJSONEntry $ \ l -> do+      x <- parseJSONEntry o (fromString $ show l)+      x `seq` pure x+    r `seq` pure r++  parseJSON v = typeMismatch msg v+    where msg = "REC: {" ++ intercalate "," (labels @r @FromJSONEntry) ++ "}"++--- Copied from the library, as it's private++lazyUncons :: KnownSymbol l => Label l -> Rec r -> (Rec (r .- l), r .! l)+lazyUncons l r = (Rec.lazyRemove l r, r .! l)
+ src/Data/Row/Hashable.hs view
@@ -0,0 +1,18 @@+{-# LANGUAGE FlexibleContexts     #-}+{-# LANGUAGE FlexibleInstances    #-}+{-# LANGUAGE ScopedTypeVariables  #-}+{-# LANGUAGE TypeApplications     #-}+{-# LANGUAGE TypeOperators        #-}+{-# LANGUAGE UndecidableInstances #-}++{-# OPTIONS_GHC -Wno-orphans #-}++module Data.Row.Hashable where++import           Data.Hashable++import           Data.Row+import qualified Data.Row.Records      as Rec++instance (Forall r Hashable, Forall r Eq) => Hashable (Rec r) where+  hashWithSalt s record = hashWithSalt s (Rec.erase @Hashable (hashWithSalt s) record)
+ src/Language/LSP/Protocol/Capabilities.hs view
@@ -0,0 +1,308 @@+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE OverloadedLabels      #-}+{-# LANGUAGE OverloadedStrings     #-}+module Language.LSP.Protocol.Capabilities+  (+    fullCaps+  , LSPVersion(..)+  , capsForVersion+  ) where++import           Data.Row+import qualified Data.Set                          as Set+import           Language.LSP.Protocol.Types+import           Prelude                           hiding (min)++{-+TODO: this is out-of-date/needs an audit+TODO: can we generate this? process the 'since' annotations in the metamodel?+-}++-- | Capabilities for full conformance to the current (v3.15) LSP specification.+fullCaps :: ClientCapabilities+fullCaps = capsForVersion (LSPVersion maxBound maxBound)++-- | A specific version of the LSP specification.+data LSPVersion = LSPVersion Int Int -- ^ Construct a major.minor version++-- | Capabilities for full conformance to the LSP specification up until a version.+-- Some important milestones:+--+-- * 3.12 textDocument/prepareRename request+-- * 3.11 CodeActionOptions provided by the server+-- * 3.10 hierarchical document symbols, folding ranges+-- * 3.9 completion item preselect+-- * 3.8 codeAction literals+-- * 3.7 related information in diagnostics+-- * 3.6 workspace folders, colors, goto type/implementation+-- * 3.4 extended completion item and symbol item kinds+-- * 3.0 dynamic registration+capsForVersion :: LSPVersion -> ClientCapabilities+capsForVersion (LSPVersion maj min) = caps+  where+    caps = ClientCapabilities {+      _workspace=Just w+      , _textDocument=Just td+      , _window=Just window+      , _general=since 3 16 general+      , _experimental=Nothing+      -- TODO+      , _notebookDocument=Nothing+      }+    w = WorkspaceClientCapabilities {+      _applyEdit = Just True+      , _workspaceEdit = Just (WorkspaceEditClientCapabilities+                  (Just True)+                  (since 3 13 resourceOperations)+                  Nothing+                  (since 3 16 True)+                  (since 3 16 (#groupsOnLabel .== Just True)))+      , _didChangeConfiguration = Just (DidChangeConfigurationClientCapabilities dynamicReg)+      , _didChangeWatchedFiles = Just (DidChangeWatchedFilesClientCapabilities dynamicReg (Just True))+      , _symbol = Just symbolCapabilities+      , _executeCommand = Just (ExecuteCommandClientCapabilities dynamicReg)+      , _workspaceFolders = since 3 6 True+      , _configuration = since 3 6 True+      , _semanticTokens = since 3 16 (SemanticTokensWorkspaceClientCapabilities $ Just True)+      -- TODO+      , _codeLens = Nothing+      , _fileOperations = Nothing+      , _inlineValue = Nothing+      , _inlayHint = Nothing+      , _diagnostics = Nothing+      }++    resourceOperations =+      [ ResourceOperationKind_Create+      , ResourceOperationKind_Delete+      , ResourceOperationKind_Rename+      ]++    symbolCapabilities = WorkspaceSymbolClientCapabilities+      dynamicReg+      (since 3 4 (#valueSet .== Just sKs))+      (since 3 16 (#valueSet .== [SymbolTag_Deprecated]))+      (since 3 17 (#properties .== []))++    sKs+      | maj >= 3 && min >= 4 = oldSKs ++ newSKs+      | otherwise            = oldSKs++    oldSKs =   [ SymbolKind_File+               , SymbolKind_Module+               , SymbolKind_Namespace+               , SymbolKind_Package+               , SymbolKind_Class+               , SymbolKind_Method+               , SymbolKind_Property+               , SymbolKind_Field+               , SymbolKind_Constructor+               , SymbolKind_Enum+               , SymbolKind_Interface+               , SymbolKind_Function+               , SymbolKind_Variable+               , SymbolKind_Constant+               , SymbolKind_String+               , SymbolKind_Number+               , SymbolKind_Boolean+               , SymbolKind_Array+               ]++    newSKs = [ SymbolKind_Object+             , SymbolKind_Key+             , SymbolKind_Null+             , SymbolKind_EnumMember+             , SymbolKind_Struct+             , SymbolKind_Event+             , SymbolKind_Operator+             , SymbolKind_TypeParameter+             ]++    -- Only one token format for now, just list it here+    tfs = [ TokenFormat_Relative ]++    semanticTokensCapabilities = SemanticTokensClientCapabilities {+        _dynamicRegistration=Just True+        , _requests= #range .== Just (InL True) .+ #full .== Just (InR (#delta .== Just True))+        , _tokenTypes=toEnumBaseType <$> Set.toList (knownValues @SemanticTokenTypes)+        , _tokenModifiers=toEnumBaseType <$> Set.toList (knownValues @SemanticTokenModifiers)+        , _formats=tfs+        , _overlappingTokenSupport=Just True+        , _multilineTokenSupport=Just True+        , _serverCancelSupport=Just True+        , _augmentsSyntaxTokens=Just True+      }++    td = TextDocumentClientCapabilities {+          _synchronization=Just sync+          , _completion=Just completionCapability+          , _hover=Just hoverCapability+          , _signatureHelp=Just signatureHelpCapability+          , _references=Just (ReferenceClientCapabilities dynamicReg)+          , _documentHighlight=Just (DocumentHighlightClientCapabilities dynamicReg)+          , _documentSymbol=Just documentSymbolCapability+          , _formatting=Just (DocumentFormattingClientCapabilities dynamicReg)+          , _rangeFormatting=Just (DocumentRangeFormattingClientCapabilities dynamicReg)+          , _onTypeFormatting=Just (DocumentOnTypeFormattingClientCapabilities dynamicReg)+          , _declaration=since 3 14 (DeclarationClientCapabilities dynamicReg (Just True))+          , _definition=Just (DefinitionClientCapabilities dynamicReg (since 3 14 True))+          , _typeDefinition=since 3 6 (TypeDefinitionClientCapabilities dynamicReg (since 3 14 True))+          , _implementation=since 3 6 (ImplementationClientCapabilities dynamicReg (since 3 14 True))+          , _codeAction=Just codeActionCapability+          , _codeLens=Just (CodeLensClientCapabilities dynamicReg)+          , _documentLink=Just (DocumentLinkClientCapabilities dynamicReg (since 3 15 True))+          , _colorProvider=since 3 6 (DocumentColorClientCapabilities dynamicReg)+          , _rename=Just (RenameClientCapabilities dynamicReg (since 3 12 True) (since 3 16 PrepareSupportDefaultBehavior_Identifier) (since 3 16 True))+          , _publishDiagnostics=Just publishDiagnosticsCapabilities+          , _foldingRange=since 3 10 foldingRangeCapability+          , _selectionRange=since 3 5 (SelectionRangeClientCapabilities dynamicReg)+          , _callHierarchy=since 3 16 (CallHierarchyClientCapabilities dynamicReg)+          , _semanticTokens=since 3 16 semanticTokensCapabilities+          -- TODO+          , _linkedEditingRange=Nothing+          , _moniker=Nothing+          , _typeHierarchy=Nothing+          , _inlineValue=Nothing+          , _inlayHint=Nothing+          , _diagnostic=Nothing+        }++    sync =+      TextDocumentSyncClientCapabilities {+        _dynamicRegistration=dynamicReg+        , _willSave=Just True+        , _willSaveWaitUntil=Just True+        , _didSave=Just True+        }++    completionCapability =+      CompletionClientCapabilities{+        _dynamicRegistration=dynamicReg+        , _completionItem=Just completionItemCapabilities+        , _completionItemKind=since 3 4 (#valueSet .== Just ciKs)+        , _insertTextMode=since 3 17 InsertTextMode_AsIs+        , _contextSupport=since 3 3 True+        , _completionList=since 3 17 (#itemDefaults .== Just [])+        }++    completionItemCapabilities =+      #snippetSupport .== Just True+      .+ #commitCharactersSupport .== Just True+      .+ #documentationFormat .== since 3 3 allMarkups+      .+ #deprecatedSupport .== Just True+      .+ #preselectSupport .== since 3 9 True+      .+ #tagSupport .== since 3 15 (#valueSet .== [])+      .+ #insertReplaceSupport .== since 3 16 True+      .+ #resolveSupport .== since 3 16 (#properties .== ["documentation", "details"])+      .+ #insertTextModeSupport .== since 3 16 (#valueSet .== [])+      .+ #labelDetailsSupport .== since 3 17 True++    ciKs+      | maj >= 3 && min >= 4 = oldCiKs ++ newCiKs+      | otherwise            = oldCiKs++    oldCiKs =   [ CompletionItemKind_Text+                , CompletionItemKind_Method+                , CompletionItemKind_Function+                , CompletionItemKind_Constructor+                , CompletionItemKind_Field+                , CompletionItemKind_Variable+                , CompletionItemKind_Class+                , CompletionItemKind_Interface+                , CompletionItemKind_Module+                , CompletionItemKind_Property+                , CompletionItemKind_Unit+                , CompletionItemKind_Value+                , CompletionItemKind_Enum+                , CompletionItemKind_Keyword+                , CompletionItemKind_Snippet+                , CompletionItemKind_Color+                , CompletionItemKind_File+                , CompletionItemKind_Reference+                ]++    newCiKs =   [ CompletionItemKind_Folder+                , CompletionItemKind_EnumMember+                , CompletionItemKind_Constant+                , CompletionItemKind_Struct+                , CompletionItemKind_Event+                , CompletionItemKind_Operator+                , CompletionItemKind_TypeParameter+                ]++    hoverCapability =+      HoverClientCapabilities {+        _dynamicRegistration=dynamicReg+        , _contentFormat=since 3 3 allMarkups+      }++    codeActionCapability+      = CodeActionClientCapabilities {+          _dynamicRegistration=dynamicReg+          , _codeActionLiteralSupport=since 3 8 (#codeActionKind .== (#valueSet .== Set.toList knownValues))+          , _isPreferredSupport=since 3 15 True+          , _disabledSupport=since 3 16 True+          , _dataSupport=since 3 16 True+          , _resolveSupport=since 3 16 (#properties .== [])+          , _honorsChangeAnnotations=since 3 16 True+        }++    signatureHelpCapability =+      SignatureHelpClientCapabilities {+        _dynamicRegistration=dynamicReg+        , _signatureInformation=Just (#documentationFormat .== Just allMarkups .+ #parameterInformation .== Just (#labelOffsetSupport .== Just True) .+ #activeParameterSupport .== Just True)+        , _contextSupport=since 3 16 True+      }++    documentSymbolCapability =+      DocumentSymbolClientCapabilities {+        _dynamicRegistration=dynamicReg+        -- same as workspace symbol kinds+        , _symbolKind=Just (#valueSet .== Just sKs)+        , _hierarchicalDocumentSymbolSupport=since 3 10 True+        , _tagSupport=since 3 16 (#valueSet .== [SymbolTag_Deprecated])+        , _labelSupport=since 3 16 True+      }++    foldingRangeCapability =+      FoldingRangeClientCapabilities {+        _dynamicRegistration=dynamicReg+        , _rangeLimit=Nothing+        , _lineFoldingOnly=Nothing+        , _foldingRangeKind=since 3 17 (#valueSet .== Just [])+        , _foldingRange=since 3 16 (#collapsedText .== Just True)+      }++    publishDiagnosticsCapabilities =+      PublishDiagnosticsClientCapabilities {+        _relatedInformation=since 3 7 True+        , _tagSupport=since 3 15 (#valueSet .== [ DiagnosticTag_Unnecessary, DiagnosticTag_Deprecated ])+        , _versionSupport=since 3 15 True+        , _codeDescriptionSupport=since 3 16 True+        , _dataSupport=since 3 16 True+      }++    dynamicReg+      | maj >= 3  = Just True+      | otherwise = Nothing+    since :: Int -> Int -> a -> Maybe a+    since x y a+      | maj >= x && min >= y = Just a+      | otherwise            = Nothing++    window =+      WindowClientCapabilities {+        _workDoneProgress=since 3 15 True+        , _showMessage=since 3 16 $ ShowMessageRequestClientCapabilities Nothing+        , _showDocument=since 3 16 $ ShowDocumentClientCapabilities True+      }++    general = GeneralClientCapabilities {+      _staleRequestSupport=since 3 16 (#cancel .== True .+ #retryOnContentModified .== [])+      , _regularExpressions=since 3 16 $ RegularExpressionsClientCapabilities "" Nothing+      , _markdown=since 3 16 $ MarkdownClientCapabilities "" Nothing (Just [])+      -- TODO+      , _positionEncodings=Nothing+      }++    allMarkups = [MarkupKind_PlainText, MarkupKind_Markdown]
+ src/Language/LSP/Protocol/Lens.hs view
@@ -0,0 +1,12 @@++module Language.LSP.Protocol.Lens (+  -- * Generated lens classes+    module Lens+  -- Custom lets classes for Type+  , module TypesLens+  -- Custom lens classes for Message+  , module MessageLens) where++import Language.LSP.Protocol.Internal.Lens as Lens+import Language.LSP.Protocol.Message.Lens as MessageLens+import Language.LSP.Protocol.Types.Lens as TypesLens
+ src/Language/LSP/Protocol/Message.hs view
@@ -0,0 +1,24 @@+module Language.LSP.Protocol.Message (+  -- * Messages+  -- ** LSP protocol message types and metadata+  module Message+  , module LspId+  , module Meta+  -- ** Parsing LSP messages+  , module Parsing+  -- * Methods+  -- ** Main LSP method types and functions+  , module Generated+  -- ** Helpers for working with methods+  , module Method+  -- * LSP registrations+  , module Registration+  ) where++import Language.LSP.Protocol.Internal.Method as Generated+import Language.LSP.Protocol.Message.LspId as LspId+import Language.LSP.Protocol.Message.Meta as Meta+import Language.LSP.Protocol.Message.Method as Method+import Language.LSP.Protocol.Message.Parsing as Parsing+import Language.LSP.Protocol.Message.Registration as Registration+import Language.LSP.Protocol.Message.Types as Message
+ src/Language/LSP/Protocol/Message/Lens.hs view
@@ -0,0 +1,20 @@+{-#LANGUAGE TemplateHaskell #-}+{-# OPTIONS_GHC -Wno-orphans #-}++module Language.LSP.Protocol.Message.Lens where++import Language.LSP.Protocol.Internal.Lens+import Language.LSP.Protocol.Message.Registration+import Language.LSP.Protocol.Message.Types+import           Control.Lens.TH++makeFieldsNoPrefix ''TRegistration+makeFieldsNoPrefix ''TUnregistration+makeFieldsNoPrefix ''RequestMessage+makeFieldsNoPrefix ''ResponseMessage+makeFieldsNoPrefix ''NotificationMessage+makeFieldsNoPrefix ''ResponseError+makeFieldsNoPrefix ''TRequestMessage+makeFieldsNoPrefix ''TResponseMessage+makeFieldsNoPrefix ''TNotificationMessage+makeFieldsNoPrefix ''TResponseError
+ src/Language/LSP/Protocol/Message/LspId.hs view
@@ -0,0 +1,52 @@+{-# LANGUAGE TypeInType #-}+module Language.LSP.Protocol.Message.LspId where++import qualified Data.Aeson                         as A+import           Data.Hashable+import           Data.IxMap+import           Data.Text                          (Text)+import           GHC.Generics++import           Language.LSP.Protocol.Types.Common+import           Language.LSP.Protocol.Internal.Method+import           Language.LSP.Protocol.Message.Meta++-- | Id used for a request, Can be either a String or an Int+data LspId (m :: Method f Request) = IdInt !Int32 | IdString !Text+  deriving stock (Show,Read,Eq,Ord,Generic)++instance A.ToJSON (LspId m) where+  toJSON (IdInt i)    = A.toJSON i+  toJSON (IdString s) = A.toJSON s++instance A.FromJSON (LspId m) where+  parseJSON v@(A.Number _) = IdInt <$> A.parseJSON v+  parseJSON  (A.String  s) = return (IdString s)+  parseJSON _              = fail "LspId"++instance IxOrd LspId where+  type Base LspId = SomeLspId+  toBase = SomeLspId++instance Hashable (LspId m) where+  hashWithSalt n (IdInt i)    = hashWithSalt n i+  hashWithSalt n (IdString t) = hashWithSalt n t++data SomeLspId where+  SomeLspId :: !(LspId m) -> SomeLspId++deriving stock instance Show SomeLspId+instance Eq SomeLspId where+  SomeLspId (IdInt a) == SomeLspId (IdInt b)       = a == b+  SomeLspId (IdString a) == SomeLspId (IdString b) = a == b+  _ == _                                           = False+instance Ord SomeLspId where+  compare (SomeLspId x) (SomeLspId y) = go x y+    where+      go (IdInt    a) (IdInt    b) = a `compare` b+      go (IdString a) (IdString b) = a `compare` b+      go (IdInt    _) (IdString _) = LT+      go (IdString _) (IdInt    _) = GT++instance Hashable SomeLspId where+  hashWithSalt n (SomeLspId lspId) = hashWithSalt n lspId
+ src/Language/LSP/Protocol/Message/Meta.hs view
@@ -0,0 +1,18 @@+module Language.LSP.Protocol.Message.Meta where++-- | Which direction messages are sent in.+data MessageDirection = ServerToClient | ClientToServer+-- | What kind of message is sent.+data MessageKind = Notification | Request++-- | Singleton type for 'MessageDirection'.+data SMessageDirection (f :: MessageDirection) where+  SClientToServer :: SMessageDirection ClientToServer+  SServerToClient :: SMessageDirection ServerToClient+  SBothDirections :: SMessageDirection f++-- | Singleton type for 'MessageKind'.+data SMessageKind (f :: MessageKind) where+  SNotification :: SMessageKind Notification+  SRequest :: SMessageKind Request+  SBothTypes :: SMessageKind f
+ src/Language/LSP/Protocol/Message/Method.hs view
@@ -0,0 +1,158 @@+{-# LANGUAGE ConstraintKinds         #-}+{-# LANGUAGE FlexibleContexts        #-}+{-# LANGUAGE LambdaCase              #-}+{-# LANGUAGE MagicHash               #-}+{-# LANGUAGE QuantifiedConstraints   #-}+{-# LANGUAGE RankNTypes              #-}+{-# LANGUAGE TemplateHaskell         #-}+{-# LANGUAGE TypeInType              #-}+{-# LANGUAGE TypeOperators           #-}+{-# LANGUAGE UndecidableSuperClasses #-}++{-# OPTIONS_GHC -Wno-orphans #-}+module Language.LSP.Protocol.Message.Method where++import           Data.Aeson.Types+import           Data.Function                      (on)+import           Data.GADT.Compare+import           Data.Proxy+import           Data.Type.Equality+import           GHC.Exts                           (Int (..), dataToTag#)+import           GHC.TypeLits                       (KnownSymbol, sameSymbol,+                                                     symbolVal)+import           Language.LSP.Protocol.Internal.Method+import           Language.LSP.Protocol.Message.Meta+import           Language.LSP.Protocol.Utils.Misc+import           Unsafe.Coerce++---------------+-- SomeMethod+---------------++deriving stock instance Show SomeMethod+instance Eq SomeMethod where+  (==) = (==) `on` someMethodToMethodString+instance Ord SomeMethod where+  compare = compare `on` someMethodToMethodString++instance ToJSON SomeMethod where+  toJSON sm = toJSON $ someMethodToMethodString sm++instance FromJSON SomeMethod where+  parseJSON v = do+    s <- parseJSON v+    pure $ methodStringToSomeMethod s++---------------+-- SMethod+---------------++-- This instance is written manually rather than derived to avoid a dependency+-- on 'dependent-sum-template'.+instance GEq SMethod where+  geq x y = case gcompare x y of+    GLT -> Nothing+    GEQ -> Just Refl+    GGT -> Nothing++-- This instance is written manually rather than derived to avoid a dependency+-- on 'dependent-sum-template'.+instance GCompare SMethod where+  gcompare (SMethod_CustomMethod x) (SMethod_CustomMethod y) = case symbolVal x `compare` symbolVal y of+    LT -> GLT+    EQ -> unsafeCoerce GEQ+    GT -> GGT+  -- This is much more compact than matching on every pair of constructors, which+  -- is what we would need to do for GHC to 'see' that this is correct. Nonetheless+  -- it is safe: since there is only one constructor of 'SMethod' for each 'Method',+  -- the argument types can only be equal if the constructor tag is equal.+  gcompare x y = case I# (dataToTag# x) `compare` I# (dataToTag# y) of+    LT -> GLT+    EQ -> unsafeCoerce GEQ+    GT -> GGT++instance Eq (SMethod m) where+  -- This defers to 'GEq', ensuring that this version is compatible.+  (==) = defaultEq++instance Ord (SMethod m) where+  -- This defers to 'GCompare', ensuring that this version is compatible.+  compare = defaultCompare++deriving stock instance Show (SMethod m)++instance ToJSON (SMethod m) where+  toJSON m = toJSON (SomeMethod m)++instance KnownSymbol s => FromJSON (SMethod ('Method_CustomMethod s :: Method f t)) where+  parseJSON v = do+    sm <- parseJSON v+    case sm of+      SomeMethod (SMethod_CustomMethod x) -> case sameSymbol x (Proxy :: Proxy s) of+        Just Refl -> pure $ SMethod_CustomMethod x+        Nothing   -> mempty+      _ -> mempty++-- TODO: generate these with everything else?+-- Generates lots of instances like this in terms of the FromJSON SomeMethod instance+-- instance FromJSON (SMethod Method_X)+makeSingletonFromJSON 'SomeMethod ''SMethod ['SMethod_CustomMethod]++---------------+-- Extras+---------------++-- Some useful type synonyms+type SClientMethod (m :: Method ClientToServer t) = SMethod m+type SServerMethod (m :: Method ServerToClient t) = SMethod m++data SomeClientMethod = forall t (m :: Method ClientToServer t). SomeClientMethod (SMethod m)+deriving stock instance Show SomeClientMethod++data SomeServerMethod = forall t (m :: Method ServerToClient t). SomeServerMethod (SMethod m)+deriving stock instance Show SomeServerMethod++someClientMethod :: SMethod m -> Maybe SomeClientMethod+someClientMethod s = case messageDirection s of+    SClientToServer -> Just $ SomeClientMethod s+    SServerToClient -> Nothing+    -- See Note [Parsing methods that go both ways]+    SBothDirections -> Just $ SomeClientMethod $ unsafeCoerce s++someServerMethod :: SMethod m -> Maybe SomeServerMethod+someServerMethod s = case messageDirection s of+    SServerToClient-> Just $ SomeServerMethod s+    SClientToServer -> Nothing+    -- See Note [Parsing methods that go both ways]+    SBothDirections -> Just $ SomeServerMethod $ unsafeCoerce s++instance FromJSON SomeClientMethod where+  parseJSON v = do+    (SomeMethod sm) <- parseJSON v+    case someClientMethod sm of+      Just scm -> pure scm+      Nothing  -> mempty++instance ToJSON SomeClientMethod where+  toJSON (SomeClientMethod sm) = toJSON $ someMethodToMethodString $ SomeMethod sm++instance FromJSON SomeServerMethod where+  parseJSON v = do+    (SomeMethod sm) <- parseJSON v+    case someServerMethod sm of+      Just scm -> pure scm+      Nothing  -> mempty++instance ToJSON SomeServerMethod where+  toJSON (SomeServerMethod sm) = toJSON $ someMethodToMethodString $ SomeMethod sm++{- Note [Parsing methods that go both ways]++In order to parse a method as a client or server method, we use 'messageDirection'+to get a proof that the message direction is what we say it is. But this just doesn't+work for the both directions case: because we are awkwardly representing "both directions"+as "the type variable is free". So the types don't line up and we use an awful hack.++A better solution might be to move away from using an unconstrained type parameter to+mean "both directions".+-}
+ src/Language/LSP/Protocol/Message/Parsing.hs view
@@ -0,0 +1,361 @@+{-# LANGUAGE ConstraintKinds  #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE LambdaCase       #-}+{-# LANGUAGE RankNTypes       #-}+{-# LANGUAGE TypeInType       #-}++module Language.LSP.Protocol.Message.Parsing where++import           Language.LSP.Protocol.Message.LspId+import           Language.LSP.Protocol.Message.Types+import           Language.LSP.Protocol.Message.Meta+import           Language.LSP.Protocol.Message.Method+import           Language.LSP.Protocol.Internal.Method++import           Data.Aeson+import           Data.Aeson.Types+import           Data.Function                     (on)+import           Data.GADT.Compare+import           Data.Kind+import           Data.Proxy+import           Data.Type.Equality+import           GHC.TypeLits                      (sameSymbol)++-- ---------------------------------------------------------------------+-- Working with arbitrary messages+-- ---------------------------------------------------------------------++data FromServerMessage' a where+  FromServerMess :: forall t (m :: Method ServerToClient t) a. SMethod m -> TMessage m -> FromServerMessage' a+  FromServerRsp  :: forall (m :: Method ClientToServer Request) a. a m -> TResponseMessage m -> FromServerMessage' a++type FromServerMessage = FromServerMessage' SMethod++instance Eq FromServerMessage where+  (==) = (==) `on` toJSON+instance Show FromServerMessage where+  show = show . toJSON++instance ToJSON FromServerMessage where+  toJSON (FromServerMess m p) = serverMethodJSON m (toJSON p)+  toJSON (FromServerRsp m p)  = clientResponseJSON m (toJSON p)++fromServerNot :: forall (m :: Method ServerToClient Notification).+  TMessage m ~ TNotificationMessage m => TNotificationMessage m -> FromServerMessage+fromServerNot m@TNotificationMessage{_method=meth} = FromServerMess meth m++fromServerReq :: forall (m :: Method ServerToClient Request).+  TMessage m ~ TRequestMessage m => TRequestMessage m -> FromServerMessage+fromServerReq m@TRequestMessage{_method=meth} = FromServerMess meth m++data FromClientMessage' a where+  FromClientMess :: forall t (m :: Method ClientToServer t) a . SMethod m -> TMessage m -> FromClientMessage' a+  FromClientRsp  :: forall (m :: Method ServerToClient Request) a . a m -> TResponseMessage m -> FromClientMessage' a++type FromClientMessage = FromClientMessage' SMethod++instance ToJSON FromClientMessage where+  toJSON (FromClientMess m p) = clientMethodJSON m (toJSON p)+  toJSON (FromClientRsp m p)  = serverResponseJSON m (toJSON p)++fromClientNot :: forall (m :: Method ClientToServer Notification).+  TMessage m ~ TNotificationMessage m => TNotificationMessage m -> FromClientMessage+fromClientNot m@TNotificationMessage{_method=meth} = FromClientMess meth m++fromClientReq :: forall (m :: Method ClientToServer Request).+  TMessage m ~ TRequestMessage m => TRequestMessage m -> FromClientMessage+fromClientReq m@TRequestMessage{_method=meth} = FromClientMess meth m++-- ---------------------------------------------------------------------+-- Parsing+-- ---------------------------------------------------------------------++type LookupFunc f a = forall (m :: Method f Request). LspId m -> Maybe (SMethod m, a m)++{-+Message Types we must handle are the following++Request      | jsonrpc | id | method | params?+Response     | jsonrpc | id |        |         | response? | error?+Notification | jsonrpc |    | method | params?+-}++{-# INLINE parseServerMessage #-}+parseServerMessage :: LookupFunc ClientToServer a -> Value -> Parser (FromServerMessage' a)+parseServerMessage lookupId v@(Object o) = do+  methMaybe <- o .:! "method"+  idMaybe <- o .:! "id"+  case methMaybe of+    -- Request or Notification+    Just (SomeServerMethod m) ->+      case splitServerMethod m of+        IsServerNot -> FromServerMess m <$> parseJSON v+        IsServerReq -> FromServerMess m <$> parseJSON v+        IsServerEither | SMethod_CustomMethod (p :: Proxy s') <- m -> do+          case idMaybe of+            -- Request+            Just _ ->+              let m' = (SMethod_CustomMethod p :: SMethod (Method_CustomMethod s' :: Method ServerToClient Request))+              in FromServerMess m' <$> parseJSON v+            Nothing ->+              let m' = (SMethod_CustomMethod p :: SMethod (Method_CustomMethod s' :: Method ServerToClient Notification))+              in FromServerMess m' <$> parseJSON v+    Nothing -> do+      case idMaybe of+        Just i -> do+          case lookupId i of+            Just (m,res) -> clientResponseJSON m $ FromServerRsp res <$> parseJSON v+            Nothing -> fail $ unwords ["Failed in looking up response type of", show v]+        Nothing -> fail $ unwords ["Got unexpected message without method or id"]+parseServerMessage _ v = fail $ unwords ["parseServerMessage expected object, got:",show v]++{-# INLINE parseClientMessage #-}+parseClientMessage :: LookupFunc ServerToClient a -> Value -> Parser (FromClientMessage' a)+parseClientMessage lookupId v@(Object o) = do+  methMaybe <- o .:! "method"+  idMaybe <- o .:! "id"+  case methMaybe of+    -- Request or Notification+    Just (SomeClientMethod m) ->+      case splitClientMethod m of+        IsClientNot -> FromClientMess m <$> parseJSON v+        IsClientReq -> FromClientMess m <$> parseJSON v+        IsClientEither | SMethod_CustomMethod (p :: Proxy s') <- m -> do+          case idMaybe of+            -- Request+            Just _ ->+              let m' = (SMethod_CustomMethod p :: SMethod (Method_CustomMethod s' :: Method ClientToServer Request))+              in FromClientMess m' <$> parseJSON v+            Nothing ->+              let m' = (SMethod_CustomMethod p :: SMethod (Method_CustomMethod s' :: Method ClientToServer Notification))+              in FromClientMess m' <$> parseJSON v+    Nothing -> do+      case idMaybe of+        Just i -> do+          case lookupId i of+            Just (m,res) -> serverResponseJSON m $ FromClientRsp res <$> parseJSON v+            Nothing -> fail $ unwords ["Failed in looking up response type of", show v]+        Nothing -> fail $ unwords ["Got unexpected message without method or id"]+parseClientMessage _ v = fail $ unwords ["parseClientMessage expected object, got:",show v]++-- ---------------------------------------------------------------------+-- Helper Utilities+-- ---------------------------------------------------------------------++{-# INLINE clientResponseJSON #-}+clientResponseJSON :: SClientMethod m -> (HasJSON (TResponseMessage m) => x) -> x+clientResponseJSON m x = case splitClientMethod m of+  IsClientReq    -> x+  IsClientEither -> x++{-# INLINE serverResponseJSON #-}+serverResponseJSON :: SServerMethod m -> (HasJSON (TResponseMessage m) => x) -> x+serverResponseJSON m x = case splitServerMethod m of+  IsServerReq    -> x+  IsServerEither -> x++{-# INLINE clientMethodJSON#-}+clientMethodJSON :: SClientMethod m -> (ToJSON (TClientMessage m) => x) -> x+clientMethodJSON m x =+  case splitClientMethod m of+    IsClientNot    -> x+    IsClientReq    -> x+    IsClientEither -> x++{-# INLINE serverMethodJSON #-}+serverMethodJSON :: SServerMethod m -> (ToJSON (TServerMessage m) => x) -> x+serverMethodJSON m x =+  case splitServerMethod m of+    IsServerNot    -> x+    IsServerReq    -> x+    IsServerEither -> x++type HasJSON a = (ToJSON a,FromJSON a,Eq a)++-- Reify universal properties about Client/Server Messages++type ClientNotOrReq :: forall t . Method ClientToServer t -> Type+data ClientNotOrReq m where+  IsClientNot+    :: ( HasJSON (TClientMessage m)+       , TMessage m ~ TNotificationMessage m)+    => ClientNotOrReq (m :: Method ClientToServer Notification)+  IsClientReq+    :: forall (m :: Method ClientToServer Request).+    ( HasJSON (TClientMessage m)+    , HasJSON (TResponseMessage m)+    , TMessage m ~ TRequestMessage m)+    => ClientNotOrReq m+  IsClientEither+    :: ClientNotOrReq (Method_CustomMethod s)++type ServerNotOrReq :: forall t . Method ServerToClient t -> Type+data ServerNotOrReq m where+  IsServerNot+    :: ( HasJSON (TServerMessage m)+       , TMessage m ~ TNotificationMessage m)+    => ServerNotOrReq (m :: Method ServerToClient Notification)+  IsServerReq+    :: forall (m :: Method ServerToClient Request).+    ( HasJSON (TServerMessage m)+    , HasJSON (TResponseMessage m)+    , TMessage m ~ TRequestMessage m)+    => ServerNotOrReq m+  IsServerEither+    :: ServerNotOrReq (Method_CustomMethod s)++{-# INLINE splitClientMethod #-}+splitClientMethod :: SClientMethod m -> ClientNotOrReq m+splitClientMethod = \case+  SMethod_Initialize                          -> IsClientReq+  SMethod_Initialized                         -> IsClientNot+  SMethod_Shutdown                            -> IsClientReq+  SMethod_Exit                                -> IsClientNot+  SMethod_WorkspaceDidChangeWorkspaceFolders  -> IsClientNot+  SMethod_WorkspaceDidChangeConfiguration     -> IsClientNot+  SMethod_WorkspaceDidChangeWatchedFiles      -> IsClientNot+  SMethod_WorkspaceSymbol                     -> IsClientReq+  SMethod_WorkspaceExecuteCommand             -> IsClientReq+  SMethod_WindowWorkDoneProgressCancel        -> IsClientNot+  SMethod_TextDocumentDidOpen                 -> IsClientNot+  SMethod_TextDocumentDidChange               -> IsClientNot+  SMethod_TextDocumentWillSave                -> IsClientNot+  SMethod_TextDocumentWillSaveWaitUntil       -> IsClientReq+  SMethod_TextDocumentDidSave                 -> IsClientNot+  SMethod_TextDocumentDidClose                -> IsClientNot+  SMethod_TextDocumentCompletion              -> IsClientReq+  SMethod_TextDocumentHover                   -> IsClientReq+  SMethod_TextDocumentSignatureHelp           -> IsClientReq+  SMethod_TextDocumentDeclaration             -> IsClientReq+  SMethod_TextDocumentDefinition              -> IsClientReq+  SMethod_TextDocumentTypeDefinition          -> IsClientReq+  SMethod_TextDocumentImplementation          -> IsClientReq+  SMethod_TextDocumentReferences              -> IsClientReq+  SMethod_TextDocumentDocumentHighlight       -> IsClientReq+  SMethod_TextDocumentDocumentSymbol          -> IsClientReq+  SMethod_TextDocumentCodeAction              -> IsClientReq+  SMethod_TextDocumentCodeLens                -> IsClientReq+  SMethod_TextDocumentDocumentLink            -> IsClientReq+  SMethod_TextDocumentDocumentColor           -> IsClientReq+  SMethod_TextDocumentColorPresentation       -> IsClientReq+  SMethod_TextDocumentFormatting              -> IsClientReq+  SMethod_TextDocumentRangeFormatting         -> IsClientReq+  SMethod_TextDocumentOnTypeFormatting        -> IsClientReq+  SMethod_TextDocumentRename                  -> IsClientReq+  SMethod_TextDocumentPrepareRename           -> IsClientReq+  SMethod_TextDocumentFoldingRange            -> IsClientReq+  SMethod_TextDocumentSelectionRange          -> IsClientReq+  SMethod_TextDocumentPrepareCallHierarchy    -> IsClientReq+  SMethod_TextDocumentLinkedEditingRange      -> IsClientReq+  SMethod_CallHierarchyIncomingCalls          -> IsClientReq+  SMethod_CallHierarchyOutgoingCalls          -> IsClientReq+  SMethod_TextDocumentSemanticTokensFull      -> IsClientReq+  SMethod_TextDocumentSemanticTokensFullDelta -> IsClientReq+  SMethod_TextDocumentSemanticTokensRange     -> IsClientReq+  SMethod_WorkspaceWillCreateFiles            -> IsClientReq+  SMethod_WorkspaceWillDeleteFiles            -> IsClientReq+  SMethod_WorkspaceWillRenameFiles            -> IsClientReq+  SMethod_WorkspaceDidCreateFiles             -> IsClientNot+  SMethod_WorkspaceDidDeleteFiles             -> IsClientNot+  SMethod_WorkspaceDidRenameFiles             -> IsClientNot+  SMethod_TextDocumentMoniker                 -> IsClientReq+  SMethod_TextDocumentPrepareTypeHierarchy    -> IsClientReq+  SMethod_TypeHierarchySubtypes               -> IsClientReq+  SMethod_TypeHierarchySupertypes             -> IsClientReq+  SMethod_TextDocumentInlineValue             -> IsClientReq+  SMethod_TextDocumentInlayHint               -> IsClientReq+  SMethod_TextDocumentDiagnostic              -> IsClientReq+  SMethod_WorkspaceDiagnostic                 -> IsClientReq+  SMethod_CodeLensResolve                     -> IsClientReq+  SMethod_InlayHintResolve                    -> IsClientReq+  SMethod_CodeActionResolve                   -> IsClientReq+  SMethod_DocumentLinkResolve                 -> IsClientReq+  SMethod_CompletionItemResolve               -> IsClientReq+  SMethod_WorkspaceSymbolResolve              -> IsClientReq+  SMethod_NotebookDocumentDidChange           -> IsClientNot+  SMethod_NotebookDocumentDidClose            -> IsClientNot+  SMethod_NotebookDocumentDidOpen             -> IsClientNot+  SMethod_NotebookDocumentDidSave             -> IsClientNot+  SMethod_SetTrace                            -> IsClientNot+  SMethod_Progress                            -> IsClientNot+  SMethod_CancelRequest                       -> IsClientNot+  (SMethod_CustomMethod _)                    -> IsClientEither++{-# INLINE splitServerMethod #-}+splitServerMethod :: SServerMethod m -> ServerNotOrReq m+splitServerMethod = \case+  SMethod_WindowShowMessage              -> IsServerNot+  SMethod_WindowShowMessageRequest       -> IsServerReq+  SMethod_WindowShowDocument             -> IsServerReq+  SMethod_WindowLogMessage               -> IsServerNot+  SMethod_WindowWorkDoneProgressCreate   -> IsServerReq+  SMethod_Progress                       -> IsServerNot+  SMethod_TelemetryEvent                 -> IsServerNot+  SMethod_ClientRegisterCapability       -> IsServerReq+  SMethod_ClientUnregisterCapability     -> IsServerReq+  SMethod_WorkspaceWorkspaceFolders      -> IsServerReq+  SMethod_WorkspaceConfiguration         -> IsServerReq+  SMethod_WorkspaceApplyEdit             -> IsServerReq+  SMethod_TextDocumentPublishDiagnostics -> IsServerNot+  SMethod_LogTrace                       -> IsServerNot+  SMethod_CancelRequest                  -> IsServerNot+  SMethod_WorkspaceCodeLensRefresh       -> IsServerReq+  SMethod_WorkspaceSemanticTokensRefresh -> IsServerReq+  SMethod_WorkspaceInlineValueRefresh         -> IsServerReq+  SMethod_WorkspaceInlayHintRefresh           -> IsServerReq+  SMethod_WorkspaceDiagnosticRefresh          -> IsServerReq+  (SMethod_CustomMethod _)               -> IsServerEither++-- | Given a witness that two custom methods are of the same type, produce a witness that the methods are the same+data CustomEq m1 m2 where+  CustomEq+    :: (m1 ~ (Method_CustomMethod s :: Method f t1), m2 ~ (Method_CustomMethod s :: Method f t2))+    => { runCustomEq :: (t1 ~ t2 => m1 :~~: m2) }+    -> CustomEq m1 m2++runEq :: (t1 ~ t2)+      => (SMethod m1 -> SMethod m2 -> Maybe (Either (CustomEq m1 m2) (m1 :~~: m2)))+      -> SMethod (m1 :: Method f t1)+      -> SMethod (m2 :: Method f t2)+      -> Maybe (m1 :~~: m2)+runEq f m1 m2 = do+  res <- f m1 m2+  pure $ case res of+    Right eq -> eq+    Left ceq -> runCustomEq ceq++-- | Heterogeneous equality on singleton server methods+mEqServer :: SServerMethod m1 -> SServerMethod m2 -> Maybe (Either (CustomEq m1 m2) (m1 :~~: m2))+mEqServer m1 m2 = go (splitServerMethod m1) (splitServerMethod m2)+  where+    go IsServerNot IsServerNot = do+      Refl <- geq m1 m2+      pure $ Right HRefl+    go IsServerReq IsServerReq = do+      Refl <- geq m1 m2+      pure $ Right HRefl+    go IsServerEither IsServerEither+      | SMethod_CustomMethod p1 <- m1+      , SMethod_CustomMethod p2 <- m2+      = case sameSymbol p1 p2 of+          Just Refl -> Just $ Left $ CustomEq HRefl+          _         -> Nothing+    go _ _ = Nothing++-- | Heterogeneous equality on singleton client methods+mEqClient :: SClientMethod m1 -> SClientMethod m2 -> Maybe (Either (CustomEq m1 m2) (m1 :~~: m2))+mEqClient m1 m2 = go (splitClientMethod m1) (splitClientMethod m2)+  where+    go IsClientNot IsClientNot = do+      Refl <- geq m1 m2+      pure $ Right HRefl+    go IsClientReq IsClientReq = do+      Refl <- geq m1 m2+      pure $ Right HRefl+    go IsClientEither IsClientEither+      | SMethod_CustomMethod p1 <- m1+      , SMethod_CustomMethod p2 <- m2+      = case sameSymbol p1 p2 of+          Just Refl -> Just $ Left $ CustomEq HRefl+          _         -> Nothing+    go _ _ = Nothing
+ src/Language/LSP/Protocol/Message/Registration.hs view
@@ -0,0 +1,116 @@+{-# LANGUAGE DeriveAnyClass            #-}+{-# LANGUAGE DeriveGeneric             #-}+{-# LANGUAGE DuplicateRecordFields     #-}+{-# LANGUAGE ExistentialQuantification #-}+{-# LANGUAGE FlexibleContexts          #-}+{-# LANGUAGE FlexibleInstances         #-}+{-# LANGUAGE RankNTypes                #-}+{-# LANGUAGE TemplateHaskell           #-}+{-# LANGUAGE TypeInType                #-}++module Language.LSP.Protocol.Message.Registration where++import           Language.LSP.Protocol.Types+import           Language.LSP.Protocol.Internal.Method+import           Language.LSP.Protocol.Message.Meta+import           Language.LSP.Protocol.Message.Method+import           Language.LSP.Protocol.Utils.Misc++import           Data.Aeson+import           Data.Text                         (Text)+import qualified Data.Text                         as T+import           GHC.Generics++-- | Typed registration type, with correct options.+data TRegistration (m :: Method ClientToServer t) =+  TRegistration+    { -- | The id used to register the request. The id can be used to deregister+      -- the request again.+      _id              :: Text+      -- | The method / capability to register for.+    , _method          :: SClientMethod m+      -- | Options necessary for the registration.+      -- Make this strict to aid the pattern matching exhaustiveness checker+    , _registerOptions :: !(Maybe (RegistrationOptions m))+    }+  deriving stock Generic++deriving stock instance Eq (RegistrationOptions m) => Eq (TRegistration m)+deriving stock instance Show (RegistrationOptions m) => Show (TRegistration m)++-- TODO: can we do this generically somehow?+-- This generates the function+-- regHelper :: SMethod m+--           -> (( Show (RegistrationOptions m)+--               , ToJSON (RegistrationOptions m)+--               , FromJSON ($regOptTcon m)+--              => x)+--           -> x+makeRegHelper ''RegistrationOptions++instance ToJSON (TRegistration m) where+  toJSON x@(TRegistration _ m _) = regHelper m (genericToJSON lspOptions x)++data SomeRegistration = forall t (m :: Method ClientToServer t). SomeRegistration (TRegistration m)++instance ToJSON SomeRegistration where+  toJSON (SomeRegistration r) = toJSON r++instance FromJSON SomeRegistration where+  parseJSON = withObject "Registration" $ \o -> do+    SomeClientMethod m <- o .: "method"+    r <- TRegistration <$> o .: "id" <*> pure m <*> regHelper m (o .: "registerOptions")+    pure (SomeRegistration r)++instance Show SomeRegistration where+  show (SomeRegistration r@(TRegistration _ m _)) = regHelper m (show r)++toUntypedRegistration :: TRegistration m -> Registration+toUntypedRegistration (TRegistration i meth opts) = Registration i (T.pack $ someMethodToMethodString $ SomeMethod meth) (Just $ regHelper meth (toJSON opts))++toSomeRegistration :: Registration -> Maybe SomeRegistration+toSomeRegistration r =+  let v = toJSON r+  in case fromJSON v of+    Success r' -> Just r'+    _          -> Nothing++-- ---------------------------------------------------------------------++-- | Typed unregistration type.+data TUnregistration (m :: Method ClientToServer t) =+  TUnregistration+    { -- | The id used to unregister the request or notification. Usually an id+      -- provided during the register request.+      _id     :: Text+      -- | The method / capability to unregister for.+    , _method :: SMethod m+    } deriving stock Generic++deriving stock instance Eq (TUnregistration m)+deriving stock instance Show (TUnregistration m)++instance ToJSON (TUnregistration m) where+  toJSON x@(TUnregistration _ m) = regHelper m (genericToJSON lspOptions x)++data SomeUnregistration = forall t (m :: Method ClientToServer t). SomeUnregistration (TUnregistration m)++instance ToJSON SomeUnregistration where+  toJSON (SomeUnregistration r) = toJSON r++instance FromJSON SomeUnregistration where+  parseJSON = withObject "Unregistration" $ \o -> do+    SomeClientMethod m <- o .: "method"+    r <- TUnregistration <$> o .: "id" <*> pure m+    pure (SomeUnregistration r)++toUntypedUnregistration :: TUnregistration m -> Unregistration+toUntypedUnregistration (TUnregistration i meth) = Unregistration i (T.pack $ someMethodToMethodString $ SomeMethod meth)++toSomeUnregistration :: Unregistration -> Maybe SomeUnregistration+toSomeUnregistration r =+  let v = toJSON r+  in case fromJSON v of+    Success r' -> Just r'+    _          -> Nothing+
+ src/Language/LSP/Protocol/Message/Types.hs view
@@ -0,0 +1,239 @@+{-# LANGUAGE ConstraintKinds  #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE RankNTypes       #-}+{-# LANGUAGE TemplateHaskell  #-}+{-# LANGUAGE TupleSections    #-}+{-# LANGUAGE TypeInType       #-}++module Language.LSP.Protocol.Message.Types where++import           Language.LSP.Protocol.Types.Common+import           Language.LSP.Protocol.Internal.Method+import           Language.LSP.Protocol.Types+import           Language.LSP.Protocol.Message.LspId+import           Language.LSP.Protocol.Message.Meta+import           Language.LSP.Protocol.Message.Method ()+import           Language.LSP.Protocol.Utils.Misc++import           Data.Aeson                         hiding (Null)+import qualified Data.Aeson                         as J+import           Data.Aeson.TH+import           Data.Kind+import           Data.String                        (IsString (..))+import           Data.Text                          (Text)+import           GHC.Generics+import           GHC.TypeLits                       (KnownSymbol)++-- 'RequestMessage', 'ResponseMessage', 'ResponseError', and 'NotificationMessage'+-- aren't present in the metamodel, although they should be.+-- https://github.com/microsoft/vscode-languageserver-node/issues/1079++-- | Notification message type as defined in the spec.+data NotificationMessage =+  NotificationMessage+    { _jsonrpc :: Text+    , _method  :: Text+    , _params  :: Maybe Value+    } deriving stock (Show, Eq, Generic)++deriveJSON lspOptions ''NotificationMessage++-- This isn't present in the metamodel.+-- | Request message type as defined in the spec.+data RequestMessage = RequestMessage+    { _jsonrpc :: Text+    , _id      :: Int32 |? Text+    , _method  :: Text+    , _params  :: Maybe Value+    } deriving stock (Show, Eq, Generic)++deriveJSON lspOptions ''RequestMessage++-- | Response error type as defined in the spec.+data ResponseError =+  ResponseError+    { _code    :: LSPErrorCodes |? ErrorCodes+    , _message :: Text+    , _xdata   :: Maybe Value+    } deriving stock (Show, Eq, Generic)++{- Note [ErrorCodes and LSPErrorCodes]++Confusingly, the metamodel defines _two_ enums for error codes. One of+these covers JSON RPC errors and one covers LSP-specific errors. We want+to accept either, mostly so we can make use of the pre-specified enum values.++However, _both_ of them are listed as accepting custom values. This means+that `LSPErrorCodes |? ErrorCodes` isn't quite right: when we parse it from+JSON, if we get an error code that isn't a known value of `LSPErrorCodes`, we+will just use the custom value constructor, without trying `ErrorCodes`.++It's hard to find any other good way of representing things properly with what+we've got, so in the end we decided to patch up the JSON parsing with a custom+instance.+-}+deriveToJSON lspOptions ''ResponseError+instance FromJSON ResponseError where+    parseJSON = +      let errorCode = withObject "ResponseError" $ \v -> ResponseError+                        <$> v .: "code"+                        <*> v .: "message"+                        <*> v .:? "data"+      in fmap go . errorCode+      where go :: ResponseError -> ResponseError+            go x@(ResponseError (InL (LSPErrorCodes_Custom n)) _ _) = +              x{_code = InR (fromOpenEnumBaseType n)}+            go x = x++-- | Response message type as defined in the spec.+data ResponseMessage =+  ResponseMessage+    { _jsonrpc :: Text+    , _id      :: Int32 |? Text |? Null+    , _result  :: Maybe Value+    , _error   :: Maybe ResponseError+    } deriving stock (Show, Eq, Generic)++deriveJSON lspOptions ''ResponseMessage++-----+-- | Typed notification message, containing the correct parameter payload.+data TNotificationMessage (m :: Method f Notification) =+  TNotificationMessage+    { _jsonrpc :: Text+    , _method  :: SMethod m+    , _params  :: MessageParams m+    } deriving stock Generic++deriving stock instance Eq   (MessageParams m) => Eq (TNotificationMessage m)+deriving stock instance Show (MessageParams m) => Show (TNotificationMessage m)++instance (FromJSON (MessageParams m), FromJSON (SMethod m)) => FromJSON (TNotificationMessage m) where+  parseJSON = genericParseJSON lspOptions+instance (ToJSON (MessageParams m)) => ToJSON (TNotificationMessage m) where+  toJSON     = genericToJSON lspOptions+  toEncoding = genericToEncoding lspOptions++-- | Typed request message, containing the correct parameter payload.+data TRequestMessage (m :: Method f Request) = TRequestMessage+    { _jsonrpc :: Text+    , _id      :: LspId m+    , _method  :: SMethod m+    , _params  :: MessageParams m+    } deriving stock Generic++deriving stock instance Eq   (MessageParams m) => Eq (TRequestMessage m)+deriving stock instance Show (MessageParams m) => Show (TRequestMessage m)++instance (FromJSON (MessageParams m), FromJSON (SMethod m)) => FromJSON (TRequestMessage m) where+  parseJSON = genericParseJSON lspOptions . addNullField "params"+instance (ToJSON (MessageParams m)) => ToJSON (TRequestMessage m) where+  toJSON     = genericToJSON lspOptions+  toEncoding = genericToEncoding lspOptions++data TResponseError (m :: Method f Request) =+  TResponseError+    { _code    :: LSPErrorCodes |? ErrorCodes+    , _message :: Text+    , _xdata   :: Maybe (ErrorData m)+    } deriving stock Generic++deriving stock instance Eq   (ErrorData m) => Eq (TResponseError m)+deriving stock instance Show (ErrorData m) => Show (TResponseError m)++instance (FromJSON (ErrorData m)) => FromJSON (TResponseError m) where+  parseJSON = +    let errorCode = withObject "ResponseError" $ \v -> TResponseError+                      <$> v .: "code"+                      <*> v .: "message"+                      <*> v .:? "data"+    in fmap go . errorCode+    where go :: TResponseError m -> TResponseError m+          go x@(TResponseError (InL (LSPErrorCodes_Custom n)) _ _) = +            x{_code = InR (fromOpenEnumBaseType n)}+          go x = x+instance (ToJSON (ErrorData m)) => ToJSON (TResponseError m) where+  toJSON     = genericToJSON lspOptions+  toEncoding = genericToEncoding lspOptions++-- TODO: similar functions for the others?+toUntypedResponseError :: (ToJSON (ErrorData m)) => TResponseError m -> ResponseError+toUntypedResponseError (TResponseError c m d) = ResponseError c m (fmap toJSON d)++-- | A typed response message with a correct result payload.+data TResponseMessage (m :: Method f Request) =+  TResponseMessage+    { _jsonrpc :: Text+    , _id      :: Maybe (LspId m)+    -- TODO: use `TResponseError m` for the error type, this will require quite a lot of adaptation downstream+    , _result  :: Either ResponseError (MessageResult m)+    } deriving stock Generic++deriving stock instance (Eq   (MessageResult m), Eq (ErrorData m)) => Eq (TResponseMessage m)+deriving stock instance (Show (MessageResult m), Show (ErrorData m)) => Show (TResponseMessage m)++instance (ToJSON (MessageResult m), ToJSON (ErrorData m)) => ToJSON (TResponseMessage m) where+  toJSON TResponseMessage { _jsonrpc = jsonrpc, _id = lspid, _result = result }+    = object+      [ "jsonrpc" .= jsonrpc+      , "id" .= lspid+      , case result of+        Left  err -> "error" .= err+        Right a   -> "result" .= a+      ]++instance (FromJSON (MessageResult a), FromJSON (ErrorData a)) => FromJSON (TResponseMessage a) where+  parseJSON = withObject "Response" $ \o -> do+    _jsonrpc <- o .: "jsonrpc"+    _id      <- o .: "id"+    -- It is important to use .:! so that "result = null" (without error) gets decoded as Just Null+    _result  <- o .:! "result"+    _error   <- o .:? "error"+    result   <- case (_error, _result) of+      (Just err, Nothing) -> pure $ Left err+      (Nothing, Just res) -> pure $ Right res+      (Just _err, Just _res) -> fail $ "both error and result cannot be present: " ++ show o+      (Nothing, Nothing) -> fail "both error and result cannot be Nothing"+    return $ TResponseMessage _jsonrpc _id result++-- | A typed custom message. A special data type is needed to distinguish between+-- notifications and requests, since a CustomMethod can be both!+data TCustomMessage s f t where+  ReqMess :: TRequestMessage (Method_CustomMethod s :: Method f Request) -> TCustomMessage s f Request+  NotMess :: TNotificationMessage (Method_CustomMethod s :: Method f Notification) -> TCustomMessage s f Notification++deriving stock instance Show (TCustomMessage s f t)++instance ToJSON (TCustomMessage s f t) where+  toJSON (ReqMess a) = toJSON a+  toJSON (NotMess a) = toJSON a++instance KnownSymbol s => FromJSON (TCustomMessage s f Request) where+  parseJSON v = ReqMess <$> parseJSON v+instance KnownSymbol s => FromJSON (TCustomMessage s f Notification) where+  parseJSON v = NotMess <$> parseJSON v+++-- ---------------------------------------------------------------------+-- Helper Type Families+-- ---------------------------------------------------------------------++-- | Map a method to the Request/Notification type with the correct+-- payload.+type TMessage :: forall f t . Method f t -> Type+type family TMessage m where+  TMessage (Method_CustomMethod s :: Method f t) = TCustomMessage s f t+  TMessage (m :: Method f Request) = TRequestMessage m+  TMessage (m :: Method f Notification) = TNotificationMessage m++-- Some helpful type synonyms+type TClientMessage (m :: Method ClientToServer t) = TMessage m+type TServerMessage (m :: Method ServerToClient t) = TMessage m++-- | Replace a missing field in an object with a null field, to simplify parsing+-- This is a hack to allow other types than Maybe to work like Maybe in allowing the field to be missing.+-- See also this issue: https://github.com/haskell/aeson/issues/646+addNullField :: String -> Value -> Value+addNullField s (Object o) = Object $ o <> fromString s .= J.Null+addNullField _ v          = v+
+ src/Language/LSP/Protocol/Types.hs view
@@ -0,0 +1,44 @@+-- The OSPath import sometimes looks unused+{-# OPTIONS_GHC -Wno-unused-imports #-}+module Language.LSP.Protocol.Types (+  -- * Basic types and functions+  module Common+  -- ** URIs+  , module Uri+  -- ** Locations+  , module Locations+  -- ** LSP enumerations+  , module LspEnum+  -- ** Singleton types+  , module Singletons+  -- * Helpers for working with LSP types+  -- ** Edits+  , module Edits+  -- ** Markup+  , module Markup+  -- ** Code actions+  , module CodeAction+  -- ** Progress+  , module Progress+  -- ** Semantic tokens+  , module SemanticTokens+  -- ** WatchKinds+  , module WatchKinds+  -- * Main LSP types and functions+  , module Generated+  ) where++import Language.LSP.Protocol.Internal.Types as Generated+import Language.LSP.Protocol.Types.CodeAction as CodeAction+import Language.LSP.Protocol.Types.Common as Common+import Language.LSP.Protocol.Types.Location as Locations+import Language.LSP.Protocol.Types.LspEnum as LspEnum+import Language.LSP.Protocol.Types.MarkupContent as Markup+import Language.LSP.Protocol.Types.Progress as Progress+import Language.LSP.Protocol.Types.SemanticTokens as SemanticTokens+import Language.LSP.Protocol.Types.Singletons as Singletons+import Language.LSP.Protocol.Types.Uri as Uri+import Language.LSP.Protocol.Types.Uri.OsPath as Uri+import Language.LSP.Protocol.Types.Edit as Edits+import Language.LSP.Protocol.Types.Orphans ()+import Language.LSP.Protocol.Types.WatchKinds as WatchKinds
+ src/Language/LSP/Protocol/Types/CodeAction.hs view
@@ -0,0 +1,10 @@+module Language.LSP.Protocol.Types.CodeAction where++import           Language.LSP.Protocol.Types.LspEnum+import           Language.LSP.Protocol.Internal.Types+import qualified Data.Text as T++-- | Does the first 'CodeActionKind' subsume the other one, hierarchically. Reflexive.+codeActionKindSubsumes :: CodeActionKind -> CodeActionKind -> Bool+-- Simple but ugly implementation: prefix on the string representation+codeActionKindSubsumes parent child = toEnumBaseType parent `T.isPrefixOf` toEnumBaseType child
+ src/Language/LSP/Protocol/Types/Common.hs view
@@ -0,0 +1,174 @@+{-# LANGUAGE CPP                  #-}+{-# LANGUAGE DataKinds                  #-}+{-# LANGUAGE DeriveAnyClass             #-}+{-# LANGUAGE DeriveGeneric              #-}+{-# LANGUAGE DeriveTraversable          #-}+{-# LANGUAGE DerivingStrategies         #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase                 #-}+{-# LANGUAGE TypeOperators              #-}++-- | Common types that aren't in the specification+module Language.LSP.Protocol.Types.Common (+    type (|?) (..)+  , toEither+  , _L+  , _R+  , Int32+  , UInt+  , Null (..)+  , absorbNull+  , nullToMaybe+  , maybeToNull+  , (.=?)+) where++import           Control.DeepSeq+import           Control.Lens+import           Data.Aeson          hiding (Null)+import qualified Data.Aeson          as J+#if MIN_VERSION_aeson(2,0,0)+import qualified Data.Aeson.KeyMap   as KM+#else+import qualified Data.HashMap.Strict   as KM+#endif+import           Data.Hashable+import           Data.Set            as Set+import           Data.String         (fromString)+import           Data.Int            (Int32)+import           Data.Mod.Word+import           GHC.Generics        hiding (UInt)+import           GHC.TypeNats        hiding (Mod)+import           Text.Read           (Read (readPrec))++-- | The "uinteger" type in the LSP spec.+--+-- Unusually, this is a **31**-bit unsigned integer, not a 32-bit one.+newtype UInt = UInt (Mod (2^31))+  deriving newtype (Num, Bounded, Enum, Eq, Ord)+  deriving stock (Generic)+  deriving anyclass (NFData)++instance Hashable UInt where hashWithSalt s (UInt n) = hashWithSalt s (unMod n)++instance Show UInt where+  show (UInt u) = show $ unMod u++instance Read UInt where+  readPrec = fromInteger <$> readPrec++instance Real UInt where+  toRational (UInt u) = toRational $ unMod u++instance Integral UInt where+  quotRem (UInt x) (UInt y) = bimap fromIntegral fromIntegral $ quotRem (unMod x) (unMod y)+  toInteger (UInt u) = toInteger $ unMod u++instance ToJSON UInt where+  toJSON u = toJSON (toInteger u)++instance FromJSON UInt where+  parseJSON v = fromInteger <$> parseJSON v++-- | An alternative type (isomorphic to 'Either'), but which+-- is encoded into JSON without a tag for the alternative.+--+-- This corresponds to @a | b@ types in the LSP specification.+data a |? b = InL a+            | InR b+  deriving stock (Read, Show, Eq, Ord, Generic)+  deriving anyclass (NFData, Hashable)+infixr |?++-- | Prism for the left-hand side of an '(|?)'.+_L :: Prism' (a |? b) a+_L = prism' InL $ \case+  InL a -> Just a+  InR _ -> Nothing++-- | Prism for the right-hand side of an '(|?)'.+_R :: Prism' (a |? b) b+_R = prism' InR $ \case+  InL _ -> Nothing+  InR b -> Just b++toEither :: a |? b -> Either a b+toEither (InL a) = Left a+toEither (InR b) = Right b++instance (ToJSON a, ToJSON b) => ToJSON (a |? b) where+  toJSON (InL x) = toJSON x+  toJSON (InR x) = toJSON x++instance (FromJSON a, ToJSON a, FromJSON b, ToJSON b) => FromJSON (a |? b) where+  -- Truly atrocious and abominable hack. The issue is tha we may have siutations+  -- where some input JSON can parse correctly as both sides of the union, because+  -- we have no tag. What do we do in this situation? It's very unclear, and the+  -- spec is no help. The heuristic we adopt here is that it is better to take+  -- the version with "more fields". How do we work that out? By converting back+  -- to JSON and looking at the object fields.+  --+  -- Possibly we could do better by relying on Generic instances for a and b+  -- in order to work out which has more fields on the Haskell side.+  parseJSON v = do+    let ra :: Result a = fromJSON v+        rb :: Result b = fromJSON v+    case (ra, rb) of+      (Success a, Error _) -> pure $ InL a+      (Error _, Success b) -> pure $ InR b+      (Error e, Error _) -> fail e+      (Success a, Success b) -> case (toJSON a, toJSON b) of+        -- Both sides encode to the same thing, just pick one arbitrarily+        (l, r) | l == r -> pure $ InL a+        (Object oa, Object ob) -> +          let ka = Set.fromList $ KM.keys oa+              kb = Set.fromList $ KM.keys ob+          in if kb `Set.isSubsetOf` ka+          then pure $ InL a+          else if ka `Set.isSubsetOf` kb+          then pure $ InR b+          else fail $ "Could not decide which type of value to produce, left encodes to an object with keys: " ++ show ka ++ "; right has keys " ++ show kb+        (l, r) -> fail $ "Could not decide which type of value to produce, left encodes to: " ++ show l ++ "; right encodes to: " ++ show r++-- We could use 'Proxy' for this, as aeson also serializes it to/from null,+-- but this is more explicit.+-- | A type for that is precisely null and nothing else.+--+-- This is useful since the LSP specification often includes types like @a | null@+-- as distinct from an optional value of type @a@.+data Null = Null+  deriving stock (Eq, Ord, Show, Generic)+  deriving anyclass (NFData, Hashable)++instance ToJSON Null where+  toJSON Null = J.Null+instance FromJSON Null where+  parseJSON J.Null = pure Null+  parseJSON _      = fail "expected 'null'"++absorbNull :: Monoid a => a |? Null -> a+absorbNull (InL a) = a+absorbNull (InR _) = mempty++nullToMaybe :: a |? Null -> Maybe a+nullToMaybe (InL a) = Just a+nullToMaybe (InR _) = Nothing++maybeToNull :: Maybe a -> a |? Null+maybeToNull (Just x) = InL x+maybeToNull Nothing  = InR Null++-- This is equivalent to the instance for 'Maybe s'+instance Semigroup s => Semigroup (s |? Null) where+  InL x <> InL y = InL (x <> y)+  InL x <> InR _ = InL x+  InR _ <> InL x = InL x+  InR _ <> InR y = InR y++  -- We use String so we can use fromString on it to get a key that works+  -- in both aeson-1 and aeson-2+-- | Include a value in an JSON object optionally, omitting it if it is 'Nothing'.+(.=?) :: (J.KeyValue kv, J.ToJSON v) => String -> Maybe v -> [kv]+k .=? v = case v of+  Just v' -> [fromString k J..= v']+  Nothing -> mempty
+ src/Language/LSP/Protocol/Types/Edit.hs view
@@ -0,0 +1,58 @@+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE OverloadedStrings     #-}+{-# LANGUAGE TypeOperators         #-}++module Language.LSP.Protocol.Types.Edit where++import           Data.Text                         (Text)+import qualified Data.Text                         as T++import           Control.Lens                      hiding (index)+import           Language.LSP.Protocol.Types.Common+import           Language.LSP.Protocol.Internal.Types++-- | Convenience alias for the type in the 'WorkspaceEdit._documentChanges' field.+type DocumentChange = TextDocumentEdit |? CreateFile |? RenameFile |? DeleteFile++-- TODO: get rid of this in favour of the more correct things in VFS+-- | Applies a 'TextEdit' to some 'Text'.+--+-- >>> applyTextEdit (TextEdit (Range (Position 0 1) (Position 0 2)) "i") "foo"+-- "fio"+applyTextEdit :: TextEdit -> Text -> Text+applyTextEdit (TextEdit (Range sp ep) newText) oldText =+  let (_, afterEnd) = splitAtPos ep oldText+      (beforeStart, _) = splitAtPos sp oldText+    in mconcat [beforeStart, newText, afterEnd]+  where+    splitAtPos :: Position -> Text -> (Text, Text)+    splitAtPos (Position sl sc) t =+      -- If we are looking for a line beyond the end of the text, this will give us an index+      -- past the end. Fortunately, T.splitAt is fine with this, and just gives us the whole+      -- string and an empty string, which is what we want.+      let index = sc + startLineIndex sl t+        in T.splitAt (fromIntegral index) t++    -- The index of the first character of line 'line'+    startLineIndex :: UInt -> Text -> UInt+    startLineIndex 0 _ = 0+    startLineIndex line t' =+      case T.findIndex (== '\n') t' of+        Just i -> fromIntegral i + 1 + startLineIndex (line - 1) (T.drop (i + 1) t')+        -- i != 0, and there are no newlines, so this is a line beyond the end of the text.+        -- In this case give the "start index" as the end, so we will at least append the text.+        Nothing -> fromIntegral $ T.length t'++-- | 'editTextEdit' @outer@ @inner@ applies @inner@ to the text inside @outer@.+editTextEdit :: TextEdit -> TextEdit -> TextEdit+editTextEdit (TextEdit origRange origText) innerEdit =+  let newText = applyTextEdit innerEdit origText+    in TextEdit origRange newText++-- | Conversion between 'OptionalVersionedTextDocumentIdentifier' and 'VersionedTextDocumentIdentifier'.+_versionedTextDocumentIdentifier :: Prism' OptionalVersionedTextDocumentIdentifier VersionedTextDocumentIdentifier+_versionedTextDocumentIdentifier = prism down up+  where+    down (VersionedTextDocumentIdentifier uri v) = OptionalVersionedTextDocumentIdentifier uri (InL v)+    up (OptionalVersionedTextDocumentIdentifier uri (InL v)) = Right $ VersionedTextDocumentIdentifier uri v+    up i@(OptionalVersionedTextDocumentIdentifier _ (InR _)) = Left i
+ src/Language/LSP/Protocol/Types/Lens.hs view
@@ -0,0 +1,11 @@+{-#LANGUAGE TemplateHaskell #-}+{-# OPTIONS_GHC -Wno-orphans #-}++module Language.LSP.Protocol.Types.Lens where++import Language.LSP.Protocol.Internal.Lens+import Language.LSP.Protocol.Types.SemanticTokens+import           Control.Lens.TH++makeFieldsNoPrefix ''SemanticTokenAbsolute+makeFieldsNoPrefix ''SemanticTokenRelative
+ src/Language/LSP/Protocol/Types/Location.hs view
@@ -0,0 +1,19 @@+-- | Additional and utilities for 'Position' and 'Range'.+module Language.LSP.Protocol.Types.Location where++import           Language.LSP.Protocol.Types.Common+import           Language.LSP.Protocol.Internal.Types.Position+import           Language.LSP.Protocol.Internal.Types.Range++-- | A helper function for creating ranges.+-- prop> mkRange l c l' c' = Range (Position l c) (Position l' c')+mkRange :: UInt -> UInt -> UInt -> UInt -> Range+mkRange l c l' c' = Range (Position l c) (Position l' c')++-- | 'isSubrangeOf' returns true if for every 'Position' in the first 'Range', it's also in the second 'Range'.+isSubrangeOf :: Range -> Range -> Bool+isSubrangeOf smallRange range = _start smallRange >= _start range && _end smallRange <= _end range++-- | 'positionInRange' returns true if the given 'Position' is in the 'Range'.+positionInRange :: Position -> Range -> Bool+positionInRange p (Range sp ep) = sp <= p && p < ep -- Range's end position is exclusive.
+ src/Language/LSP/Protocol/Types/LspEnum.hs view
@@ -0,0 +1,54 @@+{-# LANGUAGE DefaultSignatures #-}+{-# LANGUAGE TypeFamilies      #-}+module Language.LSP.Protocol.Types.LspEnum where++import qualified Data.Aeson  as Aeson+import           Data.Kind+import qualified Data.Set    as Set+import           Data.String (IsString (..))+import qualified Data.Text   as Text++-- | A class for types that represent a LSP enum type.+--+-- This class carries conversion functions to and from the 'base type' of the enum.+-- Not all base type values may have corresponding enum values.+class LspEnum a where+  -- | The base type of the enum.+  type EnumBaseType a :: Type++  -- | The known values of this type, the ones listed in the LSP specification.+  knownValues :: Set.Set a+  knownValues = Set.empty++  -- | Convert an enum value to the base type.+  toEnumBaseType :: a -> EnumBaseType a++  -- | Convert a base type value to an enum value, failing if it does not correspond to+  -- an enum value.+  fromEnumBaseType :: EnumBaseType a -> Maybe a+  default fromEnumBaseType :: (LspOpenEnum a) => EnumBaseType a -> Maybe a+  fromEnumBaseType = Just . fromOpenEnumBaseType++-- | A class for types that represent a LSP open enum type.+--+-- Open enum types allow any base type value to be used as a 'custom' enum value.+class LspEnum a => LspOpenEnum a where+  -- | Convert a base type to an enum value. All base type values can be converted this way.+  fromOpenEnumBaseType :: EnumBaseType a -> a++-- | Newtype for @deriving via@ to get standard JSON and 'IsString' instances in terms of the 'LspEnum'+-- class methods.+newtype AsLspEnum a b = AsLspEnum a++instance (LspEnum a, EnumBaseType a ~ b, Aeson.ToJSON b) => Aeson.ToJSON (AsLspEnum a b) where+  toJSON (AsLspEnum e) = Aeson.toJSON (toEnumBaseType e)++instance (LspEnum a, EnumBaseType a ~ b, Aeson.FromJSON b, Show b) => Aeson.FromJSON (AsLspEnum a b) where+  parseJSON val = do+    v <- Aeson.parseJSON val+    case fromEnumBaseType v of+      Just x  -> pure $ AsLspEnum x+      Nothing -> fail $ "unrecognized enum value " ++ show v++instance (LspOpenEnum a, EnumBaseType a ~ b, b ~ Text.Text) => IsString (AsLspEnum a b) where+  fromString s = AsLspEnum $ fromOpenEnumBaseType (Text.pack s)
+ src/Language/LSP/Protocol/Types/MarkupContent.hs view
@@ -0,0 +1,45 @@+{-# OPTIONS_GHC -Wno-orphans #-}+-- | Additional instances and utilities for 'MarkupContent'.+module Language.LSP.Protocol.Types.MarkupContent where++import           Data.String+import           Data.Text                                       (Text)+import qualified Data.Text                                       as T+import           Language.LSP.Protocol.Internal.Types.MarkupContent+import           Language.LSP.Protocol.Internal.Types.MarkupKind++-- | Create a 'MarkupContent' containing plain text.+mkPlainText :: Text -> MarkupContent+mkPlainText = MarkupContent MarkupKind_PlainText++-- | Create a 'MarkupContent' containing markdown.+mkMarkdown :: Text -> MarkupContent+mkMarkdown = MarkupContent MarkupKind_Markdown++-- | Create a 'MarkupContent' containing a language-annotated code block only.+mkMarkdownCodeBlock :: Text -> Text -> MarkupContent+mkMarkdownCodeBlock lang quote+ = MarkupContent MarkupKind_Markdown ("\n```" <> lang <> "\n" <> quote <> "\n```\n")++-- | Markdown for a section separator in Markdown, being a horizontal line.+sectionSeparator :: Text+sectionSeparator = "* * *\n"++-- | Given some plaintext, convert it into some equivalent markdown text.+-- This is not *quite* the identity function.+plainTextToMarkdown :: Text -> Text+-- Line breaks in markdown paragraphs are ignored unless the line ends with two spaces.+-- In order to respect the line breaks in the original plaintext, we stick two spaces on the end of every line.+plainTextToMarkdown = T.unlines . fmap (<> "  ") . T.lines++instance Semigroup MarkupContent where+  MarkupContent MarkupKind_PlainText s1 <> MarkupContent MarkupKind_PlainText s2 = MarkupContent MarkupKind_PlainText (s1 `mappend` s2)+  MarkupContent MarkupKind_Markdown s1 <> MarkupContent MarkupKind_Markdown s2 = MarkupContent MarkupKind_Markdown  (s1 `mappend` s2)+  MarkupContent MarkupKind_PlainText s1 <> MarkupContent MarkupKind_Markdown s2 = MarkupContent MarkupKind_Markdown  (plainTextToMarkdown s1 `mappend` s2)+  MarkupContent MarkupKind_Markdown s1 <> MarkupContent MarkupKind_PlainText s2 = MarkupContent MarkupKind_Markdown  (s1 `mappend` plainTextToMarkdown s2)++instance Monoid MarkupContent where+  mempty = MarkupContent MarkupKind_PlainText ""++instance IsString MarkupContent where+  fromString = mkPlainText . T.pack
+ src/Language/LSP/Protocol/Types/Orphans.hs view
@@ -0,0 +1,20 @@+{-# OPTIONS_GHC -Wno-orphans #-}+module Language.LSP.Protocol.Types.Orphans where++import           Language.LSP.Protocol.Internal.Types+import           Data.Default+import           Data.Semigroup                ()++instance Semigroup WorkspaceEdit where+  (WorkspaceEdit a b c) <> (WorkspaceEdit a' b' c') = WorkspaceEdit (a <> a') (b <> b') (c <> c')+instance Monoid WorkspaceEdit where+  mempty = WorkspaceEdit Nothing Nothing Nothing++instance Default ClientCapabilities where+    def = ClientCapabilities def def def def def Nothing+instance Default WorkspaceClientCapabilities+instance Default TextDocumentClientCapabilities+instance Default NotebookDocumentClientCapabilities where+instance Default NotebookDocumentSyncClientCapabilities+instance Default WindowClientCapabilities+instance Default GeneralClientCapabilities
+ src/Language/LSP/Protocol/Types/Progress.hs view
@@ -0,0 +1,31 @@+module Language.LSP.Protocol.Types.Progress+  ( _workDoneProgressBegin+  , _workDoneProgressEnd+  , _workDoneProgressReport+  )+  where++import           Control.Lens+import           Data.Aeson++import           Language.LSP.Protocol.Internal.Types.WorkDoneProgressBegin+import           Language.LSP.Protocol.Internal.Types.WorkDoneProgressEnd+import           Language.LSP.Protocol.Internal.Types.WorkDoneProgressReport++-- From lens-aeson+_JSON :: (ToJSON a, FromJSON a) => Prism' Value a+_JSON = prism toJSON $ \x -> case fromJSON x of+    Success y -> Right y;+    _         -> Left x++-- | Prism for extracting the 'WorkDoneProgressBegin' case from the unstructured 'value' field of 'ProgressParams'.+_workDoneProgressBegin :: Prism' Value WorkDoneProgressBegin+_workDoneProgressBegin = _JSON++-- | Prism for extracting the 'WorkDoneProgressEnd' case from the unstructured 'value' field of 'ProgressParams'.+_workDoneProgressEnd :: Prism' Value WorkDoneProgressEnd+_workDoneProgressEnd = _JSON++-- | Prism for extracting the 'WorkDoneProgressReport' case from the unstructured 'value' field of 'ProgressParams'.+_workDoneProgressReport :: Prism' Value WorkDoneProgressReport+_workDoneProgressReport = _JSON
+ src/Language/LSP/Protocol/Types/SemanticTokens.hs view
@@ -0,0 +1,175 @@+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE OverloadedLists       #-}+{-# LANGUAGE OverloadedStrings     #-}+{-# LANGUAGE ScopedTypeVariables   #-}+module Language.LSP.Protocol.Types.SemanticTokens where++import           Data.Text                                                (Text)++import           Control.Monad.Except++import           Language.LSP.Protocol.Types.Common+import           Language.LSP.Protocol.Internal.Types.SemanticTokenModifiers+import           Language.LSP.Protocol.Internal.Types.SemanticTokens+import           Language.LSP.Protocol.Internal.Types.SemanticTokensDelta+import           Language.LSP.Protocol.Internal.Types.SemanticTokensEdit+import           Language.LSP.Protocol.Internal.Types.SemanticTokensLegend+import           Language.LSP.Protocol.Internal.Types.SemanticTokenTypes+import           Language.LSP.Protocol.Types.LspEnum++import qualified Data.Algorithm.Diff                                      as Diff+import qualified Data.Bits                                                as Bits+import qualified Data.DList                                               as DList+import           Data.Foldable                                            hiding+                                                                          (length)+import qualified Data.Map                                                 as Map+import           Data.Maybe                                               (fromMaybe,+                                                                           maybeToList)+import           Data.String++defaultSemanticTokensLegend :: SemanticTokensLegend+defaultSemanticTokensLegend = SemanticTokensLegend+  (fmap toEnumBaseType . toList $ knownValues @SemanticTokenTypes)+  (fmap toEnumBaseType . toList $ knownValues @SemanticTokenModifiers)++----------------------------------------------------------+-- Tools for working with semantic tokens.+----------------------------------------------------------++-- | A single 'semantic token' as described in the LSP specification, using absolute positions.+-- This is the kind of token that is usually easiest for editors to produce.+data SemanticTokenAbsolute = SemanticTokenAbsolute {+  _line           :: UInt,+  _startChar      :: UInt,+  _length         :: UInt,+  _tokenType      :: SemanticTokenTypes,+  _tokenModifiers :: [SemanticTokenModifiers]+} deriving stock (Show, Eq, Ord)+-- Note: we want the Ord instance to sort the tokens textually: this is achieved due to the+-- order of the constructors++-- | A single 'semantic token' as described in the LSP specification, using relative positions.+data SemanticTokenRelative = SemanticTokenRelative {+  _deltaLine      :: UInt,+  _deltaStartChar :: UInt,+  _length         :: UInt,+  _tokenType      :: SemanticTokenTypes,+  _tokenModifiers :: [SemanticTokenModifiers]+} deriving stock (Show, Eq, Ord)+-- Note: we want the Ord instance to sort the tokens textually: this is achieved due to the+-- order of the constructors++-- | Turn a list of absolutely-positioned tokens into a list of relatively-positioned tokens. The tokens are assumed to be in the+-- order that they appear in the document!+relativizeTokens :: [SemanticTokenAbsolute] -> [SemanticTokenRelative]+relativizeTokens xs = DList.toList $ go 0 0 xs mempty+  where+    -- Pass an accumulator to make this tail-recursive+    go :: UInt -> UInt -> [SemanticTokenAbsolute] -> DList.DList SemanticTokenRelative -> DList.DList SemanticTokenRelative+    go _ _ [] acc = acc+    go lastLine lastChar (SemanticTokenAbsolute l c len ty mods:ts) acc =+      let+        lastCharInLine = if l == lastLine then lastChar else 0+        dl = l - lastLine+        dc = c - lastCharInLine+      in go l c ts (DList.snoc acc (SemanticTokenRelative dl dc len ty mods))++-- | Turn a list of relatively-positioned tokens into a list of absolutely-positioned tokens. The tokens are assumed to be in the+-- order that they appear in the document!+absolutizeTokens :: [SemanticTokenRelative] -> [SemanticTokenAbsolute]+absolutizeTokens xs = DList.toList $ go 0 0 xs mempty+  where+    -- Pass an accumulator to make this tail-recursive+    go :: UInt -> UInt -> [SemanticTokenRelative] -> DList.DList SemanticTokenAbsolute -> DList.DList SemanticTokenAbsolute+    go _ _ [] acc = acc+    go lastLine lastChar (SemanticTokenRelative dl dc len ty mods:ts) acc =+      let+        lastCharInLine = if dl == 0 then lastChar else 0+        l = lastLine + dl+        c = lastCharInLine + dc+      in go l c ts (DList.snoc acc (SemanticTokenAbsolute l c len ty mods))++-- | Encode a series of relatively-positioned semantic tokens into an integer array following the given legend.+encodeTokens :: SemanticTokensLegend -> [SemanticTokenRelative] -> Either Text [UInt]+encodeTokens SemanticTokensLegend{_tokenTypes=tts,_tokenModifiers=tms} sts =+  DList.toList . DList.concat <$> traverse encodeToken sts+  where+    -- Note that there's no "fast" version of these (e.g. backed by an IntMap or similar)+    -- in general, due to the possibility  of unknown token types which are only identified by strings.+    tyMap :: Map.Map SemanticTokenTypes UInt+    tyMap = Map.fromList $ zip (fmap fromOpenEnumBaseType tts) [0..]+    modMap :: Map.Map SemanticTokenModifiers Int+    modMap = Map.fromList $ zip (fmap fromOpenEnumBaseType tms) [0..]++    lookupTy :: SemanticTokenTypes -> Either Text UInt+    lookupTy ty = case Map.lookup ty tyMap of+        Just tycode -> pure tycode+        Nothing -> throwError $ "Semantic token type " <> fromString (show ty) <> " did not appear in the legend"+    lookupMod :: SemanticTokenModifiers -> Either Text Int+    lookupMod modifier = case Map.lookup modifier modMap of+        Just modcode -> pure modcode+        Nothing -> throwError $ "Semantic token modifier " <> fromString (show modifier) <> " did not appear in the legend"++    -- Use a DList here for better efficiency when concatenating all these together+    encodeToken :: SemanticTokenRelative -> Either Text (DList.DList UInt)+    encodeToken (SemanticTokenRelative dl dc len ty mods) = do+      tycode <- lookupTy ty+      modcodes <- traverse lookupMod mods+      let combinedModcode :: Int = foldl' Bits.setBit Bits.zeroBits modcodes++      pure [dl, dc, len, tycode, fromIntegral combinedModcode ]++-- This is basically 'SemanticTokensEdit', but slightly easier to work with.+-- | An edit to a buffer of items.+data Edit a = Edit { editStart :: UInt, editDeleteCount :: UInt, editInsertions :: [a] }+  deriving stock (Read, Show, Eq, Ord)++-- | Compute a list of edits that will turn the first list into the second list.+computeEdits :: Eq a => [a] -> [a] -> [Edit a]+computeEdits l r = DList.toList $ go 0 Nothing (Diff.getGroupedDiff l r) mempty+  where+    {-+    Strategy: traverse the list of diffs, keeping the current index and (maybe) an in-progress 'Edit'.+    Whenever we see a 'Diff' that's only one side or the other, we can bundle that in to our in-progress+    'Edit'. We only have to stop if we see a 'Diff' that's on both sides (i.e. unchanged), then we+    dump the 'Edit' into the accumulator.+    We need the index, because 'Edit's need to say where they start.+    -}+    go :: UInt -> Maybe (Edit a) -> [Diff.Diff [a]] -> DList.DList (Edit a) -> DList.DList (Edit a)+    -- No more diffs: append the current edit if there is one and return+    go _ e [] acc = acc <> DList.fromList (maybeToList e)++    -- Items only on the left (i.e. deletions): increment the current index, and record the count of deletions,+    -- starting a new edit if necessary.+    go ix e (Diff.First ds : rest) acc =+      let+        deleteCount = fromIntegral $ Prelude.length ds+        edit = fromMaybe (Edit ix 0 []) e+      in go (ix + deleteCount) (Just (edit{editDeleteCount=editDeleteCount edit + deleteCount})) rest acc+    -- Items only on the right (i.e. insertions): don't increment the current index, and record the insertions,+    -- starting a new edit if necessary.+    go ix e (Diff.Second as : rest) acc =+      let edit = fromMaybe (Edit ix 0 []) e+      in go ix (Just (edit{editInsertions=editInsertions edit <> as})) rest acc++    -- Items on both sides: increment the current index appropriately (since the items appear on the left),+    -- and append the current edit (if there is one) to our list of edits (since we can't continue it with a break).+    go ix e (Diff.Both bs _bs : rest) acc =+      let bothCount = fromIntegral $ Prelude.length bs+      in go (ix + bothCount) Nothing rest (acc <> DList.fromList (maybeToList e))++-- | Convenience method for making a 'SemanticTokens' from a list of 'SemanticTokenAbsolute's. An error may be returned if++-- The resulting 'SemanticTokens' lacks a result ID, which must be set separately if you are using that.+makeSemanticTokens :: SemanticTokensLegend -> [SemanticTokenAbsolute] -> Either Text SemanticTokens+makeSemanticTokens legend sts = do+  encoded <- encodeTokens legend $ relativizeTokens sts+  pure $ SemanticTokens Nothing encoded++-- | Convenience function for making a 'SemanticTokensDelta' from a previous and current 'SemanticTokens'.+-- The resulting 'SemanticTokensDelta' lacks a result ID, which must be set separately if you are using that.+makeSemanticTokensDelta :: SemanticTokens -> SemanticTokens -> SemanticTokensDelta+makeSemanticTokensDelta SemanticTokens{_data_=prevTokens} SemanticTokens{_data_=curTokens} =+  let edits = computeEdits prevTokens curTokens+      stEdits = fmap (\(Edit s ds as) -> SemanticTokensEdit s ds (Just as)) edits+  in SemanticTokensDelta Nothing stEdits
+ src/Language/LSP/Protocol/Types/Singletons.hs view
@@ -0,0 +1,65 @@+module Language.LSP.Protocol.Types.Singletons where++import           Data.Aeson+import           Data.Hashable+import           Data.Proxy+import qualified Data.Text    as T+import           Control.DeepSeq+import           GHC.TypeLits (KnownNat, KnownSymbol, Nat, Symbol, natVal,+                               symbolVal)++-- | A type whose only inhabitant is a single, statically-known string.+--+-- This corresponds to types like @"hello"@ in the LSP specification that+-- are exactly types with a single inhabitant.+data AString (s :: Symbol) where+  AString :: KnownSymbol s => AString s++instance Show (AString s) where+  show AString = symbolVal (Proxy @s)+instance Eq (AString s) where+  _ == _ = True+instance Ord (AString s) where+  compare _ _ = EQ+instance NFData (AString s) where+  rnf a = seq a ()+instance Hashable (AString sym) where+  hashWithSalt s AString = hashWithSalt s (symbolVal (Proxy @sym))++instance ToJSON (AString s) where+  toJSON AString = toJSON (T.pack (symbolVal (Proxy @s)))++instance KnownSymbol s => FromJSON (AString s) where+  parseJSON = withText "string literal type" $ \s -> do+    let sym = symbolVal (Proxy @s)+    if s == T.pack sym+    then pure AString+    else fail $ "wrong string, got: " <> show s <> " expected " <> sym++-- | A type whose only inhabitant is a single, statically-known integer.+--+-- This corresponds to types like @1@ in the LSP specification that+-- are exactly types with a single inhabitant.+data AnInteger (n :: Nat) where+  AnInteger :: KnownNat n => AnInteger n++instance Show (AnInteger n) where+  show AnInteger = show $ natVal (Proxy @n)+instance Eq (AnInteger n) where+  _ == _ = True+instance Ord (AnInteger n) where+  compare _ _ = EQ+instance NFData (AnInteger s) where+  rnf a = seq a ()+instance Hashable (AnInteger i) where+  hashWithSalt s AnInteger = hashWithSalt s (natVal (Proxy @i))++instance ToJSON (AnInteger n) where+  toJSON AnInteger = toJSON (natVal (Proxy @n))++instance KnownNat n => FromJSON (AnInteger n) where+  parseJSON = withScientific "integer literal type" $ \n -> do+    let nat = natVal (Proxy @n)+    if truncate n == nat+    then pure AnInteger+    else fail $ "wrong integer, got: " <> show n <> " expected " <> show nat
+ src/Language/LSP/Protocol/Types/Uri.hs view
@@ -0,0 +1,247 @@+{-# LANGUAGE DeriveGeneric              #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE InstanceSigs               #-}+{-# LANGUAGE OverloadedStrings          #-}+{-# LANGUAGE RankNTypes                 #-}+{-# LANGUAGE RecordWildCards            #-}+{-# LANGUAGE TypeSynonymInstances       #-}++module Language.LSP.Protocol.Types.Uri+  ( Uri(..)+  , uriToFilePath+  , filePathToUri+  , NormalizedUri(..)+  , toNormalizedUri+  , fromNormalizedUri+  , NormalizedFilePath+  , toNormalizedFilePath+  , fromNormalizedFilePath+  , normalizedFilePathToUri+  , uriToNormalizedFilePath+  , emptyNormalizedFilePath+  -- Private functions+  , platformAwareUriToFilePath+  , platformAwareFilePathToUri+  )+  where++import           Control.DeepSeq+import qualified Data.Aeson              as A+import           Data.Binary             (Binary, Get, get, put)+import           Data.Hashable+import           Data.List               (stripPrefix)+import           Data.String             (IsString (fromString))+import           Data.Text               (Text)+import qualified Data.Text               as T+import           GHC.Generics+import           Network.URI             hiding (authority)+import           Safe                    (tailMay)+import qualified System.FilePath         as FP+import qualified System.FilePath.Posix   as FPP+import qualified System.FilePath.Windows as FPW+import qualified System.Info++-- | The @Uri@ type in the LSP specification.+newtype Uri = Uri { getUri :: Text }+  deriving stock (Eq,Ord,Read,Show,Generic)+  deriving newtype (A.FromJSON,A.ToJSON,Hashable,A.ToJSONKey,A.FromJSONKey)++instance NFData Uri++{- | A normalized 'Uri'.++If you want to use a URI as a map key, use this type. It is important to normalize+the percent encoding in the URI since URIs that only differ+when it comes to the percent-encoding should be treated as equivalent.++'NormalizedUri' has a cached hash in order to make it especially fast in a hash map.+-}+data NormalizedUri = NormalizedUri !Int !Text+  deriving stock (Read,Show,Generic, Eq)++-- Slow but compares paths alphabetically as you would expect.+instance Ord NormalizedUri where+  compare (NormalizedUri _ u1) (NormalizedUri _ u2) = compare u1 u2++instance Hashable NormalizedUri where+  hash (NormalizedUri h _) = h+  hashWithSalt salt (NormalizedUri h _) = hashWithSalt salt h++instance NFData NormalizedUri++isUnescapedInUriPath :: SystemOS -> Char -> Bool+isUnescapedInUriPath systemOS c+   | systemOS == windowsOS = isUnreserved c || c `elem` [':', '\\', '/']+   | otherwise = isUnreserved c || c == '/'++normalizeUriEscaping :: String -> String+normalizeUriEscaping uri =+  case stripPrefix (fileScheme ++ "//") uri of+    Just p  -> fileScheme ++ "//" ++ escapeURIPath (unEscapeString p)+    Nothing -> escapeURIString isUnescapedInURI $ unEscapeString uri+  where escapeURIPath = escapeURIString (isUnescapedInUriPath System.Info.os)++toNormalizedUri :: Uri -> NormalizedUri+toNormalizedUri uri = NormalizedUri (hash norm) norm+  where (Uri t) = maybe uri filePathToUri (uriToFilePath uri)+        -- To ensure all `Uri`s have the file path normalized+        norm = T.pack (normalizeUriEscaping (T.unpack t))++fromNormalizedUri :: NormalizedUri -> Uri+fromNormalizedUri (NormalizedUri _ t) = Uri t++fileScheme :: String+fileScheme = "file:"++windowsOS :: String+windowsOS = "mingw32"++type SystemOS = String++uriToFilePath :: Uri -> Maybe FilePath+uriToFilePath = platformAwareUriToFilePath System.Info.os++{-# WARNING platformAwareUriToFilePath "This function is considered private. Use normalizedFilePathToUri instead." #-}+platformAwareUriToFilePath :: String -> Uri -> Maybe FilePath+platformAwareUriToFilePath systemOS (Uri uri) = do+  URI{..} <- parseURI $ T.unpack uri+  if uriScheme == fileScheme+    then return $+      platformAdjustFromUriPath systemOS (uriRegName <$> uriAuthority) $ unEscapeString uriPath+    else Nothing++-- | We pull in the authority because in relative file paths the Uri likes to put everything before the slash+--   into the authority field+platformAdjustFromUriPath :: SystemOS+                          -> Maybe String -- ^ authority+                          -> String -- ^ path+                          -> FilePath+platformAdjustFromUriPath systemOS authority srcPath =+  maybe id (++) authority $+  if systemOS /= windowsOS+  then srcPath+  else case FPP.splitDirectories <$> tailMay srcPath of+      Just (firstSegment:rest) -> -- Drop leading '/' for absolute Windows paths+        let drive = if FPW.isDrive firstSegment+                    then FPW.addTrailingPathSeparator firstSegment+                    else firstSegment+         in FPW.joinDrive drive $ FPW.joinPath rest+      _ -> srcPath++filePathToUri :: FilePath -> Uri+filePathToUri = platformAwareFilePathToUri System.Info.os . FP.normalise++{-# WARNING platformAwareFilePathToUri "This function is considered private. Use normalizedUriToFilePath instead." #-}+platformAwareFilePathToUri :: SystemOS -> FilePath -> Uri+platformAwareFilePathToUri systemOS fp = Uri . T.pack . show $ URI+  { uriScheme = fileScheme+  , uriAuthority = Just $ URIAuth "" "" ""+  , uriPath = platformAdjustToUriPath systemOS fp+  , uriQuery = ""+  , uriFragment = ""+  }++platformAdjustToUriPath :: SystemOS -> FilePath -> String+platformAdjustToUriPath systemOS srcPath+  | systemOS == windowsOS = '/' : escapedPath+  | otherwise = escapedPath+  where+    (splitDirectories, splitDrive)+      | systemOS == windowsOS =+          (FPW.splitDirectories, FPW.splitDrive)+      | otherwise =+          (FPP.splitDirectories, FPP.splitDrive)+    escapedPath =+        case splitDrive srcPath of+            (drv, rest) ->+                convertDrive drv `FPP.joinDrive`+                FPP.joinPath (map (escapeURIString (isUnescapedInUriPath systemOS)) $ splitDirectories rest)+    -- splitDirectories does not remove the path separator after the drive so+    -- we do a final replacement of \ to /+    convertDrive drv+      | systemOS == windowsOS && FPW.hasTrailingPathSeparator drv =+          FPP.addTrailingPathSeparator (init drv)+      | otherwise = drv+++{- Note [Adoption Plan of OsPath]+Currently we store 'Text' in 'NormalizedFilePath'. We may change it to OsPath in the future if+the following steps are executed.++1. In the client codebase, use 'osPathToNormalizedFilePath' and 'normalizedFilePathToOsPath' instead of 'fromNormalizedFilePath'+  and 'toNormalizedFilePath'. For HLS, we could wait until GHC 9.6 becomes the oldest+  GHC we support, then change 'FilePath' to OsPath everywhere in the codebase.+2. Deprecate and remove 'fromNormalizedFilePath' and 'toNormalizedFilePath'.+3. Change 'Text' to OsPath and benchmark it to make sure performance doesn't go down. Don't forget to check Windows,+  as OsPath on Windows uses UTF-16, which may consume more memory.++See [#453](https://github.com/haskell/lsp/pull/453) and [#446](https://github.com/haskell/lsp/pull/446)+for more discussions on this topic.+-}+{-| A file path that is already normalized.++The 'NormalizedUri' is cached to avoided+repeated normalisation when we need to compute them (which is a lot).++This is one of the most performance critical parts of HLS, do not+modify it without profiling.++-}+data NormalizedFilePath = NormalizedFilePath !NormalizedUri {-# UNPACK #-} !Text+    deriving stock (Generic, Eq, Ord)++instance NFData NormalizedFilePath++instance Binary NormalizedFilePath where+  put (NormalizedFilePath _ fp) = put fp+  get = do+    v <- Data.Binary.get :: Get Text+    return (NormalizedFilePath (internalNormalizedFilePathToUri (T.unpack v)) v)++-- | Internal helper that takes a file path that is assumed to+-- already be normalized to a URI. It is up to the caller+-- to ensure normalization.+internalNormalizedFilePathToUri :: FilePath -> NormalizedUri+internalNormalizedFilePathToUri fp = nuri+  where+    uriPath = platformAdjustToUriPath System.Info.os fp+    nuriStr = T.pack $ fileScheme <> "//" <> uriPath+    nuri = NormalizedUri (hash nuriStr) nuriStr++instance Show NormalizedFilePath where+  show (NormalizedFilePath _ fp) = "NormalizedFilePath " ++ show fp++instance Hashable NormalizedFilePath where+  hash (NormalizedFilePath uri _) = hash uri+  hashWithSalt salt (NormalizedFilePath uri _) = hashWithSalt salt uri++instance IsString NormalizedFilePath where+    fromString :: String -> NormalizedFilePath+    fromString = toNormalizedFilePath++toNormalizedFilePath :: FilePath -> NormalizedFilePath+toNormalizedFilePath fp = NormalizedFilePath nuri . T.pack $ nfp+  where+    nfp = FP.normalise fp+    nuri = internalNormalizedFilePathToUri nfp++-- | Extracts 'FilePath' from 'NormalizedFilePath'.+fromNormalizedFilePath :: NormalizedFilePath -> FilePath+fromNormalizedFilePath (NormalizedFilePath _ fp) = T.unpack fp++normalizedFilePathToUri :: NormalizedFilePath -> NormalizedUri+normalizedFilePathToUri (NormalizedFilePath uri _) = uri++uriToNormalizedFilePath :: NormalizedUri -> Maybe NormalizedFilePath+uriToNormalizedFilePath nuri = fmap (NormalizedFilePath nuri . T.pack) mbFilePath+  where mbFilePath = platformAwareUriToFilePath System.Info.os (fromNormalizedUri nuri)++emptyNormalizedUri :: NormalizedUri+emptyNormalizedUri =+    let s = "file://"+    in NormalizedUri (hash s) s++-- | 'NormalizedFilePath' that contains an empty file path+emptyNormalizedFilePath :: NormalizedFilePath+emptyNormalizedFilePath = NormalizedFilePath emptyNormalizedUri ""+
+ src/Language/LSP/Protocol/Types/Uri/OsPath.hs view
@@ -0,0 +1,53 @@+{-# LANGUAGE CPP                 #-}+{-# LANGUAGE ScopedTypeVariables #-}++#if MIN_VERSION_filepath(1,4,100)+#define OS_PATH 1+#endif++module Language.LSP.Protocol.Types.Uri.OsPath+  (+#ifdef OS_PATH+    osPathToNormalizedFilePath+  , normalizedFilePathToOsPath+  , EncodingException+#endif+  ) where++#ifdef OS_PATH++import           Control.Exception      hiding (try)+import           Control.Monad.Catch+import           GHC.IO.Encoding        (getFileSystemEncoding)+import           Language.LSP.Protocol.Types.Uri+import           System.IO+import           System.IO.Unsafe       (unsafePerformIO)+import           System.OsPath+import           System.OsPath.Encoding (EncodingException)++{-|+Constructs 'NormalizedFilePath' from 'OsPath'. Throws 'EncodingException' if the conversion fails.++We store a 'Text' in 'NormalizedFilePath', which is UTF-16 or UTF-8 depending on the verion of text library.+'OsPath' may have a different encoding than 'Text', so this function may fail.+But DO NOTE THAT encoding mismatch doesn't always mean an exception will be thrown.+[Possibly your encoding simply won't throw exception on failure](https://hackage.haskell.org/package/base-4.17.0.0/docs/src/GHC.IO.Encoding.html#initFileSystemEncoding).+Possibly the conversion function can't find any invalid byte sequence, giving a sucessful but wrong result.+-}+osPathToNormalizedFilePath :: MonadThrow m => OsPath -> m NormalizedFilePath+osPathToNormalizedFilePath = fmap toNormalizedFilePath . liftException . decodeWith systemEnc utf16le++{-|+Extracts 'OsPath' from 'NormalizedFilePath'. Throws 'EncodingException' if the conversion fails.+-}+normalizedFilePathToOsPath :: MonadThrow m => NormalizedFilePath -> m OsPath+normalizedFilePathToOsPath = liftException . encodeWith systemEnc utf16le . fromNormalizedFilePath++liftException :: (MonadThrow m, Exception e) => Either e a -> m a+liftException (Right x)  = pure x+liftException (Left err) = throwM err++systemEnc :: TextEncoding+systemEnc = unsafePerformIO getFileSystemEncoding++#endif
+ src/Language/LSP/Protocol/Types/WatchKinds.hs view
@@ -0,0 +1,37 @@+module Language.LSP.Protocol.Types.WatchKinds where++import           Language.LSP.Protocol.Internal.Types (WatchKind(..))+import           Language.LSP.Protocol.Types.LspEnum (toEnumBaseType, fromOpenEnumBaseType)+import           Data.Set (toList, Set)++-- WatchKind is better represented as a Set than as enum. As the lsp spec+-- defines them as an enum, these helper functions help bridge the difference.++-- |Tests whether `WatchKind_Create` is contained in the provided WatchKind enum+containsCreate :: WatchKind -> Bool+containsCreate WatchKind_Create = True+containsCreate (WatchKind_Custom 3) = True+containsCreate (WatchKind_Custom 5) = True+containsCreate (WatchKind_Custom 7) = True+containsCreate _ = False++-- |Tests whether `WatchKind_Change` is contained in the provided WatchKind enum+containsChange :: WatchKind -> Bool+containsChange WatchKind_Change = True+containsChange (WatchKind_Custom 3) = True+containsChange (WatchKind_Custom 6) = True+containsChange (WatchKind_Custom 7) = True+containsChange _ = False++-- |Tests whether `WatchKind_Delete` is contained in the provided WatchKind enum+containsDelete :: WatchKind -> Bool+containsDelete WatchKind_Delete = True+containsDelete (WatchKind_Custom 5) = True+containsDelete (WatchKind_Custom 6) = True+containsDelete (WatchKind_Custom 7) = True+containsDelete _ = False++-- |Combine a set of WatchKind types into a new WatchKind type that accurately+-- represents the set+combineWatchKinds :: Set WatchKind -> WatchKind+combineWatchKinds s = fromOpenEnumBaseType $ sum $ toEnumBaseType <$> toList s
+ src/Language/LSP/Protocol/Utils/Misc.hs view
@@ -0,0 +1,100 @@+{-# LANGUAGE LambdaCase      #-}+{-# LANGUAGE RankNTypes      #-}+{-# LANGUAGE TemplateHaskell #-}+module Language.LSP.Protocol.Utils.Misc+  ( rdrop+  , makeSingletonFromJSON+  , makeRegHelper+  , lspOptions+  , lspOptionsUntagged+  ) where++import           Control.Monad+import           Data.Aeson+import           Data.List+import           Data.Maybe          (mapMaybe)+import           Language.Haskell.TH++-- ---------------------------------------------------------------------++rdrop :: Int -> [a] -> [a]+rdrop cnt = reverse . drop cnt . reverse++-- | Given a wrapper and a singleton GADT, construct FromJSON+-- instances for each constructor return type by invoking the+-- FromJSON instance for the wrapper and unwrapping+makeSingletonFromJSON :: Name -> Name -> [Name] -> Q [Dec]+makeSingletonFromJSON wrap gadt skip = do+  TyConI (DataD _ _ _ _ cons _) <- reify gadt+  concat <$> (sequence $ mapMaybe (makeInst wrap skip) cons)++{-+instance FromJSON (SMethod $method) where+  parseJSON = parseJSON >=> \case+      SomeMethod $singleton-method -> pure $singleton-method+      _ -> mempty+-}+makeInst :: Name -> [Name] -> Con -> Maybe (Q [Dec])+makeInst _ skip (GadtC [sConstructor] _ _) | sConstructor `elem` skip = Nothing+makeInst wrap _ (GadtC [sConstructor] args t) = Just $ do+  ns <- replicateM (length args) (newName "x")+  let wrappedPat = conP wrap [conP sConstructor (map varP ns)]+      unwrappedE = pure $ foldl' AppE (ConE sConstructor) (map VarE ns)+  [d| instance FromJSON $(pure t) where+        parseJSON = parseJSON >=> \case+          $wrappedPat -> pure $unwrappedE+          _           -> mempty+    |]+makeInst wrap skip (ForallC _ _ con) = makeInst wrap skip con -- Cancel and Custom requests+makeInst _ _ _ = Just $ fail "makeInst only defined for GADT constructors"++makeRegHelper :: Name -> DecsQ+makeRegHelper regOptTypeName = do+  Just sMethodTypeName <- lookupTypeName "SMethod"+  Just fromClientName <- lookupValueName "ClientToServer"+  TyConI (DataD _ _ _ _ allCons _) <- reify sMethodTypeName++  let isConsFromClient (GadtC _ _ (AppT _ method)) = isMethodFromClient method+      isConsFromClient _                           = return False+      isMethodFromClient :: Type -> Q Bool+      isMethodFromClient (PromotedT method) = do+        DataConI _ typ _ <- reify method+        case typ of+          AppT (AppT _ (PromotedT n)) _ -> return $ n == fromClientName+          _                             -> return False+      isMethodFromClient _ = fail "Didn't expect this type of Method!"++  cons <- filterM isConsFromClient allCons++  let conNames = mapMaybe (\case { (GadtC [name] _ _) -> Just name; _ -> Nothing; }) cons+      helperName = mkName "regHelper"+      mkClause name = do+        x <- newName "x"+        clause [ conP name [], varP x ]+               (normalB (varE x))+               []+      regOptTcon = conT regOptTypeName+  fun <- funD helperName (map mkClause conNames)++  typSig <- sigD helperName $+    [t| forall m x. $(conT sMethodTypeName) m+        -> (Show ($regOptTcon m) => ToJSON ($regOptTcon m) => FromJSON ($regOptTcon m) => x)+        -> x |]+  return [typSig, fun]++-- | Standard options for use when generating JSON instances+-- NOTE: This needs to be in a separate file because of the TH stage restriction+lspOptions :: Options+lspOptions = defaultOptions { omitNothingFields = True, fieldLabelModifier = modifier }+  where+  modifier :: String -> String+  -- For fields called data and type in the spec, we call them xdata and xtype+  -- in haskell-lsp-types to avoid it clashing with the Haskell keywords. This+  -- fixes up the json derivation+  modifier "_xdata" = "data"+  modifier "_xtype" = "type"+  modifier xs       = drop 1 xs++-- | Standard options for use when generating JSON instances for an untagged union+lspOptionsUntagged :: Options+lspOptionsUntagged = lspOptions { sumEncoding = UntaggedValue }
+ src/Language/LSP/Protocol/Utils/SMethodMap.hs view
@@ -0,0 +1,71 @@+{-# LANGUAGE DataKinds  #-}+{-# LANGUAGE GADTs      #-}+{-# LANGUAGE MagicHash  #-}+{-# LANGUAGE PolyKinds  #-}+{-# LANGUAGE RankNTypes #-}++module Language.LSP.Protocol.Utils.SMethodMap+  ( SMethodMap+  , singleton+  , insert+  , delete+  , member+  , lookup+  , map+  ) where++import           Data.IntMap                        (IntMap)+import qualified Data.IntMap.Strict                 as IntMap+import           Data.Kind                          (Type)+import           Data.Map                           (Map)+import qualified Data.Map.Strict                    as Map+import           GHC.Exts                           (Any, Int (..), dataToTag#)+import           Prelude                            hiding (lookup, map)+import           Unsafe.Coerce                      (unsafeCoerce)++import           GHC.TypeLits                       (symbolVal)+import           Language.LSP.Protocol.Message (Method (..), SMethod (..))++-- This type exists to avoid a dependency on 'dependent-map'. It is less+-- safe (since we use 'unsafeCoerce') but much simpler and hence easier to include.+-- | A specialized alternative to a full dependent map for use with 'SMethod'.+data SMethodMap (v :: Method f t -> Type) =+  -- This works by using an 'IntMap' indexed by constructor tag for the majority+  -- of 'SMethod's, which have no parameters, and hence can only appear once as keys+  -- in the map. We do not attempt to be truly dependent here, and instead exploit+  -- 'usafeCoerce' to go to and from 'v Any'.+  -- The sole exception is 'SCustomMethod', for which we keep a separate map from+  -- its 'Text' parameter+  SMethodMap !(IntMap (v Any)) !(Map String (v Any))++toIx :: SMethod a -> Int+toIx k = I# (dataToTag# k)++singleton :: SMethod a -> v a -> SMethodMap v+singleton (SMethod_CustomMethod t) v = SMethodMap mempty (Map.singleton (symbolVal t) (unsafeCoerce v))+singleton k v = SMethodMap (IntMap.singleton (toIx k) (unsafeCoerce v)) mempty++insert :: SMethod a -> v a -> SMethodMap v -> SMethodMap v+insert (SMethod_CustomMethod t) v (SMethodMap xs ys) = SMethodMap xs (Map.insert (symbolVal t) (unsafeCoerce v) ys)+insert k v (SMethodMap xs ys) = SMethodMap (IntMap.insert (toIx k) (unsafeCoerce v) xs) ys++delete :: SMethod a -> SMethodMap v -> SMethodMap v+delete (SMethod_CustomMethod t) (SMethodMap xs ys) = SMethodMap xs (Map.delete (symbolVal t) ys)+delete k (SMethodMap xs ys) = SMethodMap (IntMap.delete (toIx k) xs) ys++member :: SMethod a -> SMethodMap v -> Bool+member (SMethod_CustomMethod t) (SMethodMap _ ys) = Map.member (symbolVal t) ys+member k (SMethodMap xs _)                        = IntMap.member (toIx k) xs++lookup :: SMethod a -> SMethodMap v -> Maybe (v a)+lookup (SMethod_CustomMethod t) (SMethodMap _ ys) = unsafeCoerce (Map.lookup (symbolVal t) ys)+lookup k (SMethodMap xs _) = unsafeCoerce (IntMap.lookup (toIx k) xs)++map :: (forall a. u a -> v a) -> SMethodMap u -> SMethodMap v+map f (SMethodMap xs ys) = SMethodMap (IntMap.map f xs) (Map.map f ys)++instance Semigroup (SMethodMap v) where+  SMethodMap xs ys <> SMethodMap xs' ys' = SMethodMap (xs <> xs') (ys <> ys')++instance Monoid (SMethodMap v) where+  mempty = SMethodMap mempty mempty
− src/Language/LSP/Types.hs
@@ -1,92 +0,0 @@-module Language.LSP.Types-  ( module Language.LSP.Types.CallHierarchy-  , module Language.LSP.Types.Cancellation-  , module Language.LSP.Types.CodeAction-  , module Language.LSP.Types.CodeLens-  , module Language.LSP.Types.Command-  , module Language.LSP.Types.Common-  , module Language.LSP.Types.Completion-  , module Language.LSP.Types.Configuration-  , module Language.LSP.Types.Declaration-  , module Language.LSP.Types.Definition-  , module Language.LSP.Types.Diagnostic-  , module Language.LSP.Types.DocumentColor-  , module Language.LSP.Types.DocumentFilter-  , module Language.LSP.Types.DocumentHighlight-  , module Language.LSP.Types.DocumentLink-  , module Language.LSP.Types.DocumentSymbol-  , module Language.LSP.Types.FoldingRange-  , module Language.LSP.Types.Formatting-  , module Language.LSP.Types.Hover-  , module Language.LSP.Types.Implementation-  , module Language.LSP.Types.Initialize-  , module Language.LSP.Types.Location-  , module Language.LSP.Types.LspId-  , module Language.LSP.Types.MarkupContent-  , module Language.LSP.Types.Method-  , module Language.LSP.Types.Message-  , module Language.LSP.Types.Parsing-  , module Language.LSP.Types.Progress-  , module Language.LSP.Types.References-  , module Language.LSP.Types.Registration-  , module Language.LSP.Types.Rename-  , module Language.LSP.Types.SignatureHelp-  , module Language.LSP.Types.StaticRegistrationOptions-  , module Language.LSP.Types.SelectionRange-  , module Language.LSP.Types.SemanticTokens-  , module Language.LSP.Types.TextDocument-  , module Language.LSP.Types.TypeDefinition-  , module Language.LSP.Types.Uri-  , module Language.LSP.Types.Uri.OsPath-  , module Language.LSP.Types.WatchedFiles-  , module Language.LSP.Types.Window-  , module Language.LSP.Types.WorkspaceEdit-  , module Language.LSP.Types.WorkspaceFolders-  , module Language.LSP.Types.WorkspaceSymbol-  )-where--import           Language.LSP.Types.CallHierarchy-import           Language.LSP.Types.Cancellation-import           Language.LSP.Types.CodeAction-import           Language.LSP.Types.CodeLens-import           Language.LSP.Types.Command-import           Language.LSP.Types.Common-import           Language.LSP.Types.Completion-import           Language.LSP.Types.Configuration-import           Language.LSP.Types.Declaration-import           Language.LSP.Types.Definition-import           Language.LSP.Types.Diagnostic-import           Language.LSP.Types.DocumentColor-import           Language.LSP.Types.DocumentFilter-import           Language.LSP.Types.DocumentHighlight-import           Language.LSP.Types.DocumentLink-import           Language.LSP.Types.DocumentSymbol-import           Language.LSP.Types.FoldingRange-import           Language.LSP.Types.Formatting-import           Language.LSP.Types.Hover-import           Language.LSP.Types.Implementation-import           Language.LSP.Types.Initialize-import           Language.LSP.Types.Location-import           Language.LSP.Types.LspId-import           Language.LSP.Types.MarkupContent-import           Language.LSP.Types.Message-import           Language.LSP.Types.Method-import           Language.LSP.Types.Parsing-import           Language.LSP.Types.Progress-import           Language.LSP.Types.References-import           Language.LSP.Types.Registration-import           Language.LSP.Types.Rename-import           Language.LSP.Types.SelectionRange-import           Language.LSP.Types.SemanticTokens-import           Language.LSP.Types.SignatureHelp-import           Language.LSP.Types.StaticRegistrationOptions-import           Language.LSP.Types.TextDocument-import           Language.LSP.Types.TypeDefinition-import           Language.LSP.Types.Uri-import           Language.LSP.Types.Uri.OsPath-import           Language.LSP.Types.WatchedFiles-import           Language.LSP.Types.Window-import           Language.LSP.Types.WorkspaceEdit-import           Language.LSP.Types.WorkspaceFolders-import           Language.LSP.Types.WorkspaceSymbol
− src/Language/LSP/Types/CallHierarchy.hs
@@ -1,100 +0,0 @@-{-# LANGUAGE DuplicateRecordFields #-}-{-# LANGUAGE TemplateHaskell #-}--{- | Since LSP 3.16.0 -}-module Language.LSP.Types.CallHierarchy where--import Data.Aeson.TH-import Data.Aeson.Types ( Value )-import Data.Text ( Text )--import Language.LSP.Types.Common-import Language.LSP.Types.DocumentSymbol-import Language.LSP.Types.Location-import Language.LSP.Types.Progress-import Language.LSP.Types.StaticRegistrationOptions-import Language.LSP.Types.TextDocument-import Language.LSP.Types.Uri-import Language.LSP.Types.Utils---data CallHierarchyClientCapabilities =-  CallHierarchyClientCapabilities-    { _dynamicRegistration :: Maybe Bool }-    deriving (Show, Read, Eq)-deriveJSON lspOptions ''CallHierarchyClientCapabilities--makeExtendingDatatype "CallHierarchyOptions" [''WorkDoneProgressOptions] []-deriveJSON lspOptions ''CallHierarchyOptions--makeExtendingDatatype "CallHierarchyRegistrationOptions"-  [ ''TextDocumentRegistrationOptions-  , ''CallHierarchyOptions-  , ''StaticRegistrationOptions-  ]-  []-deriveJSON lspOptions ''CallHierarchyRegistrationOptions--makeExtendingDatatype "CallHierarchyPrepareParams"-  [''TextDocumentPositionParams, ''WorkDoneProgressParams] []-deriveJSON lspOptions ''CallHierarchyPrepareParams--data CallHierarchyItem =-  CallHierarchyItem-    { _name :: Text-    , _kind :: SymbolKind-    , _tags :: Maybe (List SymbolTag)-    -- | More detail for this item, e.g. the signature of a function.-    , _detail :: Maybe Text-    , _uri :: Uri-    , _range :: Range-    -- | The range that should be selected and revealed when this symbol-    -- is being picked, e.g. the name of a function. Must be contained by-    -- the @_range@.-    , _selectionRange :: Range-    -- | A data entry field that is preserved between a call hierarchy-    -- prepare and incoming calls or outgoing calls requests.-    , _xdata :: Maybe Value-    }-    deriving (Show, Read, Eq)-deriveJSON lspOptions ''CallHierarchyItem---- ---------------------------------------makeExtendingDatatype "CallHierarchyIncomingCallsParams"-  [ ''WorkDoneProgressParams-  , ''PartialResultParams-  ]-  [("_item", [t| CallHierarchyItem |])]-deriveJSON lspOptions ''CallHierarchyIncomingCallsParams--data CallHierarchyIncomingCall =-  CallHierarchyIncomingCall-    { -- | The item that makes the call.-      _from :: CallHierarchyItem-    -- | The ranges at which the calls appear. This is relative to the caller-    -- denoted by @_from@.-    , _fromRanges :: List Range-    }-    deriving (Show, Read, Eq)-deriveJSON lspOptions ''CallHierarchyIncomingCall---- ---------------------------------------makeExtendingDatatype "CallHierarchyOutgoingCallsParams"-  [ ''WorkDoneProgressParams-  , ''PartialResultParams-  ]-  [("_item", [t| CallHierarchyItem |])]-deriveJSON lspOptions ''CallHierarchyOutgoingCallsParams--data CallHierarchyOutgoingCall =-  CallHierarchyOutgoingCall-    { -- | The item that is called.-      _to :: CallHierarchyItem-    -- | The range at which this item is called. THis is the range relative to-    -- the caller, e.g the item passed to `callHierarchy/outgoingCalls` request.-    , _fromRanges :: List Range-    }-    deriving (Show, Read, Eq)-deriveJSON lspOptions ''CallHierarchyOutgoingCall
− src/Language/LSP/Types/Cancellation.hs
@@ -1,28 +0,0 @@-{-# LANGUAGE TemplateHaskell       #-}-{-# LANGUAGE GADTs                 #-}-{-# LANGUAGE PolyKinds             #-}-{-# LANGUAGE StandaloneDeriving    #-}-{-# LANGUAGE DuplicateRecordFields #-}-{-# LANGUAGE ExistentialQuantification #-}-module Language.LSP.Types.Cancellation where-  -import Data.Aeson.TH-import Language.LSP.Types.LspId-import Language.LSP.Types.Utils--data CancelParams = forall m.-  CancelParams-    { -- | The request id to cancel.-      _id :: LspId m-    }--deriving instance Read CancelParams-deriving instance Show CancelParams-instance Eq CancelParams where-  (CancelParams a) == CancelParams b =-    case (a,b) of-      (IdInt x, IdInt y) -> x == y-      (IdString x, IdString y) -> x == y-      _ -> False--deriveJSON lspOptions ''CancelParams
− src/Language/LSP/Types/Capabilities.hs
@@ -1,290 +0,0 @@-{-# LANGUAGE OverloadedStrings #-}-module Language.LSP.Types.Capabilities-  (-    module Language.LSP.Types.ClientCapabilities-  , module Language.LSP.Types.ServerCapabilities-  , module Language.LSP.Types.WorkspaceEdit-  , fullCaps-  , LSPVersion(..)-  , capsForVersion-  ) where--import Prelude hiding (min)-import Language.LSP.Types.ClientCapabilities-import Language.LSP.Types.ServerCapabilities-import Language.LSP.Types.WorkspaceEdit-import Language.LSP.Types---- | Capabilities for full conformance to the current (v3.15) LSP specification.-fullCaps :: ClientCapabilities-fullCaps = capsForVersion (LSPVersion maxBound maxBound)---- | A specific version of the LSP specification.-data LSPVersion = LSPVersion Int Int -- ^ Construct a major.minor version---- | Capabilities for full conformance to the LSP specification up until a version.--- Some important milestones:------ * 3.12 textDocument/prepareRename request--- * 3.11 CodeActionOptions provided by the server--- * 3.10 hierarchical document symbols, folding ranges--- * 3.9 completion item preselect--- * 3.8 codeAction literals--- * 3.7 related information in diagnostics--- * 3.6 workspace folders, colors, goto type/implementation--- * 3.4 extended completion item and symbol item kinds--- * 3.0 dynamic registration-capsForVersion :: LSPVersion -> ClientCapabilities-capsForVersion (LSPVersion maj min) = ClientCapabilities (Just w) (Just td) (Just window) (since 3 16 general) Nothing-  where-    w = WorkspaceClientCapabilities-          (Just True)-          (Just (WorkspaceEditClientCapabilities-                  (Just True)-                  (since 3 13 resourceOperations)-                  Nothing-                  (since 3 16 True)-                  (since 3 16 (WorkspaceEditChangeAnnotationClientCapabilities (Just True)))))-          (Just (DidChangeConfigurationClientCapabilities dynamicReg))-          (Just (DidChangeWatchedFilesClientCapabilities dynamicReg))-          (Just symbolCapabilities)-          (Just (ExecuteCommandClientCapabilities dynamicReg))-          (since 3 6 True)-          (since 3 6 True)-          (since 3 16 (SemanticTokensWorkspaceClientCapabilities $ Just True))--    resourceOperations = List-      [ ResourceOperationCreate-      , ResourceOperationDelete-      , ResourceOperationRename-      ]--    symbolCapabilities = WorkspaceSymbolClientCapabilities-      dynamicReg-      (since 3 4 symbolKindCapabilities)-      (since 3 16 symbolTagCapabilities)--    symbolKindCapabilities =-      WorkspaceSymbolKindClientCapabilities (Just sKs)--    symbolTagCapabilities =-      WorkspaceSymbolTagClientCapabilities (Just (List [StDeprecated]))--    sKs-      | maj >= 3 && min >= 4 = List (oldSKs ++ newSKs)-      | otherwise            = List oldSKs--    oldSKs =   [ SkFile-               , SkModule-               , SkNamespace-               , SkPackage-               , SkClass-               , SkMethod-               , SkProperty-               , SkField-               , SkConstructor-               , SkEnum-               , SkInterface-               , SkFunction-               , SkVariable-               , SkConstant-               , SkString-               , SkNumber-               , SkBoolean-               , SkArray-               ]--    newSKs = [ SkObject-             , SkKey-             , SkNull-             , SkEnumMember-             , SkStruct-             , SkEvent-             , SkOperator-             , SkTypeParameter-             ]--    -- Only one token format for now, just list it here-    tfs = List [ TokenFormatRelative ]--    semanticTokensCapabilities = SemanticTokensClientCapabilities-      (Just True)-      (SemanticTokensRequestsClientCapabilities-       (Just $ SemanticTokensRangeBool True)-       (Just (SemanticTokensFullDelta (SemanticTokensDeltaClientCapabilities $ Just True))))-      (List knownSemanticTokenTypes)-      (List knownSemanticTokenModifiers)-      tfs-      (Just True)-      (Just True)--    td = TextDocumentClientCapabilities-          (Just sync)-          (Just completionCapability)-          (Just hoverCapability)-          (Just signatureHelpCapability)-          (Just (ReferencesClientCapabilities dynamicReg))-          (Just (DocumentHighlightClientCapabilities dynamicReg))-          (Just documentSymbolCapability)-          (Just (DocumentFormattingClientCapabilities dynamicReg))-          (Just (DocumentRangeFormattingClientCapabilities dynamicReg))-          (Just (DocumentOnTypeFormattingClientCapabilities dynamicReg))-          (since 3 14 (DeclarationClientCapabilities dynamicReg (Just True)))-          (Just (DefinitionClientCapabilities dynamicReg (since 3 14 True)))-          (since 3 6 (TypeDefinitionClientCapabilities dynamicReg (since 3 14 True)))-          (since 3 6 (ImplementationClientCapabilities dynamicReg (since 3 14 True)))-          (Just codeActionCapability)-          (Just (CodeLensClientCapabilities dynamicReg))-          (Just (DocumentLinkClientCapabilities dynamicReg (since 3 15 True)))-          (since 3 6 (DocumentColorClientCapabilities dynamicReg))-          (Just (RenameClientCapabilities dynamicReg (since 3 12 True) (since 3 16 PsIdentifier) (since 3 16 True)))-          (Just publishDiagnosticsCapabilities)-          (since 3 10 foldingRangeCapability)-          (since 3 5 (SelectionRangeClientCapabilities dynamicReg))-          (since 3 16 (CallHierarchyClientCapabilities dynamicReg))-          (since 3 16 semanticTokensCapabilities)--    sync =-      TextDocumentSyncClientCapabilities-        dynamicReg-        (Just True)-        (Just True)-        (Just True)--    completionCapability =-      CompletionClientCapabilities-        dynamicReg-        (Just completionItemCapabilities)-        (since 3 4 completionItemKindCapabilities)-        (since 3 3 True)--    completionItemCapabilities = CompletionItemClientCapabilities-      (Just True)-      (Just True)-      (since 3 3 (List [MkPlainText, MkMarkdown]))-      (Just True)-      (since 3 9 True)-      (since 3 15 completionItemTagsCapabilities)-      (since 3 16 True)-      (since 3 16 (CompletionItemResolveClientCapabilities (List ["documentation", "details"])))-      (since 3 16 (CompletionItemInsertTextModeClientCapabilities (List [])))--    completionItemKindCapabilities =-      CompletionItemKindClientCapabilities (Just ciKs)--    completionItemTagsCapabilities =-      CompletionItemTagsClientCapabilities (List [ CitDeprecated ])--    ciKs-      | maj >= 3 && min >= 4 = List (oldCiKs ++ newCiKs)-      | otherwise            = List oldCiKs--    oldCiKs =   [ CiText-                , CiMethod-                , CiFunction-                , CiConstructor-                , CiField-                , CiVariable-                , CiClass-                , CiInterface-                , CiModule-                , CiProperty-                , CiUnit-                , CiValue-                , CiEnum-                , CiKeyword-                , CiSnippet-                , CiColor-                , CiFile-                , CiReference-                ]--    newCiKs =   [ CiFolder-                , CiEnumMember-                , CiConstant-                , CiStruct-                , CiEvent-                , CiOperator-                , CiTypeParameter-                ]--    hoverCapability =-      HoverClientCapabilities-        dynamicReg-        (since 3 3 (List [MkPlainText, MkMarkdown]))--    codeActionCapability-      = CodeActionClientCapabilities-          dynamicReg-          (since 3 8 (CodeActionLiteralSupport caKs))-          (since 3 15 True)-          (since 3 16 True)-          (since 3 16 True)-          (since 3 16 (CodeActionResolveClientCapabilities (List [])))-          (since 3 16 True)-    caKs = CodeActionKindClientCapabilities-              (List specCodeActionKinds)--    signatureHelpCapability =-      SignatureHelpClientCapabilities-        dynamicReg-        (Just signatureInformationCapability)-        Nothing--    signatureInformationCapability =-      SignatureHelpSignatureInformation-        (Just (List [MkPlainText, MkMarkdown]))-        (Just signatureParameterCapability)-        (since 3 16 True)--    signatureParameterCapability =-      SignatureHelpParameterInformation (since 3 14 True)--    documentSymbolCapability =-      DocumentSymbolClientCapabilities-        dynamicReg-        (since 3 4 documentSymbolKind)-        (since 3 10 True)-        (since 3 16 documentSymbolTag)-        (since 3 16 True)--    documentSymbolKind =-      DocumentSymbolKindClientCapabilities-        (Just sKs) -- same as workspace symbol kinds--    documentSymbolTag =-      DocumentSymbolTagClientCapabilities (Just (List [StDeprecated]))--    foldingRangeCapability =-      FoldingRangeClientCapabilities-        dynamicReg-        Nothing-        (Just False)--    publishDiagnosticsCapabilities =-      PublishDiagnosticsClientCapabilities-        (since 3 7 True)-        (since 3 15 publishDiagnosticsTagsCapabilities)-        (since 3 15 True)--    publishDiagnosticsTagsCapabilities =-      PublishDiagnosticsTagsClientCapabilities-        (List [ DtUnnecessary, DtDeprecated ])--    dynamicReg-      | maj >= 3  = Just True-      | otherwise = Nothing-    since x y a-      | maj >= x && min >= y = Just a-      | otherwise            = Nothing--    window =-      WindowClientCapabilities-        (since 3 15 True)-        (since 3 16 $ ShowMessageRequestClientCapabilities Nothing)-        (since 3 16 $ ShowDocumentClientCapabilities True)--    general = GeneralClientCapabilities-      (since 3 16 $ StaleRequestClientCapabilities True (List []))-      (since 3 16 $ RegularExpressionsClientCapabilities "" Nothing)-      (since 3 16 $ MarkdownClientCapabilities "" Nothing)
− src/Language/LSP/Types/ClientCapabilities.hs
@@ -1,295 +0,0 @@-{-# LANGUAGE DuplicateRecordFields  #-}-{-# LANGUAGE TemplateHaskell        #-}--module Language.LSP.Types.ClientCapabilities where--import           Data.Aeson.TH-import qualified Data.Aeson as A-import Data.Default-import Data.Text (Text)--import Language.LSP.Types.CallHierarchy-import Language.LSP.Types.CodeAction-import Language.LSP.Types.CodeLens-import Language.LSP.Types.Command-import Language.LSP.Types.Completion-import Language.LSP.Types.Configuration-import Language.LSP.Types.Diagnostic-import Language.LSP.Types.Declaration-import Language.LSP.Types.Definition-import Language.LSP.Types.DocumentColor-import Language.LSP.Types.DocumentHighlight-import Language.LSP.Types.DocumentLink-import Language.LSP.Types.DocumentSymbol-import Language.LSP.Types.FoldingRange-import Language.LSP.Types.Formatting-import Language.LSP.Types.Hover-import Language.LSP.Types.Implementation-import Language.LSP.Types.References-import Language.LSP.Types.Rename-import Language.LSP.Types.SelectionRange-import Language.LSP.Types.SemanticTokens-import Language.LSP.Types.SignatureHelp-import Language.LSP.Types.TextDocument-import Language.LSP.Types.TypeDefinition-import Language.LSP.Types.Utils-import Language.LSP.Types.WatchedFiles-import Language.LSP.Types.WorkspaceEdit-import Language.LSP.Types.WorkspaceSymbol-import Language.LSP.Types.MarkupContent (MarkdownClientCapabilities)-import Language.LSP.Types.Common (List)---data WorkspaceClientCapabilities =-  WorkspaceClientCapabilities-    { -- | The client supports applying batch edits to the workspace by supporting-      -- the request 'workspace/applyEdit'-      _applyEdit :: Maybe Bool--      -- | Capabilities specific to `WorkspaceEdit`s-    , _workspaceEdit :: Maybe WorkspaceEditClientCapabilities--      -- | Capabilities specific to the `workspace/didChangeConfiguration` notification.-    , _didChangeConfiguration :: Maybe DidChangeConfigurationClientCapabilities--       -- | Capabilities specific to the `workspace/didChangeWatchedFiles` notification.-    , _didChangeWatchedFiles :: Maybe DidChangeWatchedFilesClientCapabilities--      -- | Capabilities specific to the `workspace/symbol` request.-    , _symbol :: Maybe WorkspaceSymbolClientCapabilities--      -- | Capabilities specific to the `workspace/executeCommand` request.-    , _executeCommand :: Maybe ExecuteCommandClientCapabilities--      -- | The client has support for workspace folders.-    , _workspaceFolders :: Maybe Bool--      -- | The client supports `workspace/configuration` requests.-    , _configuration :: Maybe Bool--      -- | Capabilities specific to the semantic token requests scoped to the-      -- workspace.-      ---      -- @since 3.16.0-    , _semanticTokens :: Maybe SemanticTokensWorkspaceClientCapabilities-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''WorkspaceClientCapabilities--instance Default WorkspaceClientCapabilities where-  def = WorkspaceClientCapabilities def def def def def def def def def---- ---------------------------------------data TextDocumentClientCapabilities =-  TextDocumentClientCapabilities-    { _synchronization :: Maybe TextDocumentSyncClientCapabilities--      -- | Capabilities specific to the `textDocument/completion`-    , _completion :: Maybe CompletionClientCapabilities--      -- | Capabilities specific to the `textDocument/hover`-    , _hover :: Maybe HoverClientCapabilities--      -- | Capabilities specific to the `textDocument/signatureHelp`-    , _signatureHelp :: Maybe SignatureHelpClientCapabilities--      -- | Capabilities specific to the `textDocument/references`-    , _references :: Maybe ReferencesClientCapabilities--      -- | Capabilities specific to the `textDocument/documentHighlight`-    , _documentHighlight :: Maybe DocumentHighlightClientCapabilities--      -- | Capabilities specific to the `textDocument/documentSymbol`-    , _documentSymbol :: Maybe DocumentSymbolClientCapabilities--      -- | Capabilities specific to the `textDocument/formatting`-    , _formatting :: Maybe DocumentFormattingClientCapabilities--      -- | Capabilities specific to the `textDocument/rangeFormatting`-    , _rangeFormatting :: Maybe DocumentRangeFormattingClientCapabilities--      -- | Capabilities specific to the `textDocument/onTypeFormatting`-    , _onTypeFormatting :: Maybe DocumentOnTypeFormattingClientCapabilities--      -- | Capabilities specific to the `textDocument/declaration` request.-      ---      -- Since LSP 3.14.0-    , _declaration :: Maybe DeclarationClientCapabilities--      -- | Capabilities specific to the `textDocument/definition`-    , _definition :: Maybe DefinitionClientCapabilities--      -- | Capabilities specific to the `textDocument/typeDefinition`-    , _typeDefinition :: Maybe TypeDefinitionClientCapabilities--      -- | Capabilities specific to the `textDocument/implementation`-    , _implementation :: Maybe ImplementationClientCapabilities--      -- | Capabilities specific to the `textDocument/codeAction`-    , _codeAction :: Maybe CodeActionClientCapabilities--      -- | Capabilities specific to the `textDocument/codeLens`-    , _codeLens :: Maybe CodeLensClientCapabilities--      -- | Capabilities specific to the `textDocument/documentLink`-    , _documentLink :: Maybe DocumentLinkClientCapabilities--      -- | Capabilities specific to the `textDocument/documentColor` and the-      -- `textDocument/colorPresentation` request-    , _colorProvider :: Maybe DocumentColorClientCapabilities--      -- | Capabilities specific to the `textDocument/rename`-    , _rename :: Maybe RenameClientCapabilities--      -- | Capabilities specific to `textDocument/publishDiagnostics`-    , _publishDiagnostics :: Maybe PublishDiagnosticsClientCapabilities--      -- | Capabilities specific to the `textDocument/foldingRange` request.-      -- Since LSP 3.10.-      ---      -- @since 0.7.0.0-    , _foldingRange :: Maybe FoldingRangeClientCapabilities--      -- | Capabilities specific to the `textDocument/selectionRange` request.-      -- Since LSP 3.15.0-    , _selectionRange :: Maybe SelectionRangeClientCapabilities--      -- | Call hierarchy specific to the `textDocument/prepareCallHierarchy` request.-      -- Since LSP 3.16.0-    , _callHierarchy :: Maybe CallHierarchyClientCapabilities--    -- | Capabilities specific to the various semantic token requests.-    ---    -- @since 3.16.0-    , _semanticTokens :: Maybe SemanticTokensClientCapabilities-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''TextDocumentClientCapabilities--instance Default TextDocumentClientCapabilities where-  def = TextDocumentClientCapabilities def def def def def def def def-                                       def def def def def def def def-                                       def def def def def def def def---- ------------------------------------------------------------------------- | Capabilities specific to the `MessageActionItem` type.-data MessageActionItemClientCapabilities =-  MessageActionItemClientCapabilities-    {-      -- | Whether the client supports additional attributes which-      -- are preserved and sent back to the server in the-      -- request's response.-      _additionalPropertiesSupport :: Maybe Bool-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''MessageActionItemClientCapabilities---- | Show message request client capabilities-data ShowMessageRequestClientCapabilities =-  ShowMessageRequestClientCapabilities-    { -- | Capabilities specific to the `MessageActionItem` type.-      _messageActionItem :: Maybe MessageActionItemClientCapabilities-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''ShowMessageRequestClientCapabilities---- | Client capabilities for the show document request.------ @since 3.16.0-data ShowDocumentClientCapabilities =-  ShowDocumentClientCapabilities-    { -- | The client has support for the show document request-      _support :: Bool-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''ShowDocumentClientCapabilities---- | Window specific client capabilities.-data WindowClientCapabilities =-  WindowClientCapabilities-    { -- | Whether client supports handling progress notifications.-      ---      -- @since 3.15.0-      _workDoneProgress :: Maybe Bool-      -- | Capabilities specific to the showMessage request-      ---      -- @since 3.16.0-    , _showMessage :: Maybe ShowMessageRequestClientCapabilities-      -- | Capabilities specific to the showDocument request-      ---      -- @since 3.16.0-    , _showDocument :: Maybe ShowDocumentClientCapabilities-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''WindowClientCapabilities--instance Default WindowClientCapabilities where-  def = WindowClientCapabilities def def def---- ------------------------------------------------------------------------- | Client capability that signals how the client--- handles stale requests (e.g. a request--- for which the client will not process the response--- anymore since the information is outdated).--- @since 3.17.0-data StaleRequestClientCapabilities =-  StaleRequestClientCapabilities-    { _cancel :: Bool-    , _retryOnContentModified :: List Text-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''StaleRequestClientCapabilities---- | Client capabilities specific to the used markdown parser.--- @since 3.16.0-data RegularExpressionsClientCapabilities =-  RegularExpressionsClientCapabilities-    { _engine :: Text-    , _version :: Maybe Text-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''RegularExpressionsClientCapabilities---- | General client capabilities.--- @since 3.16.0-data GeneralClientCapabilities =-  GeneralClientCapabilities-    {-      _staleRequestSupport :: Maybe StaleRequestClientCapabilities-      -- | Client capabilities specific to regular expressions.-      -- @since 3.16.0-    , _regularExpressions :: Maybe RegularExpressionsClientCapabilities-      -- | Client capabilities specific to the client's markdown parser.-      -- @since 3.16.0-    , _markdown :: Maybe MarkdownClientCapabilities-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''GeneralClientCapabilities--instance Default GeneralClientCapabilities where-  def = GeneralClientCapabilities def def def---- -----------------------------------------------------------------------data ClientCapabilities =-  ClientCapabilities-    { -- | Workspace specific client capabilities-      _workspace    :: Maybe WorkspaceClientCapabilities-      -- | Text document specific client capabilities-    , _textDocument :: Maybe TextDocumentClientCapabilities-      -- | Window specific client capabilities.-    , _window :: Maybe WindowClientCapabilities-      -- | General client capabilities.-      -- @since 3.16.0-    , _general :: Maybe GeneralClientCapabilities-      -- | Experimental client capabilities.-    , _experimental :: Maybe A.Object-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''ClientCapabilities--instance Default ClientCapabilities where-  def = ClientCapabilities def def def def def
− src/Language/LSP/Types/CodeAction.hs
@@ -1,268 +0,0 @@-{-# LANGUAGE DuplicateRecordFields      #-}-{-# LANGUAGE OverloadedStrings          #-}-{-# LANGUAGE TemplateHaskell            #-}-module Language.LSP.Types.CodeAction where--import           Data.Aeson.TH-import           Data.Aeson.Types-import           Data.Default-import           Data.String-import           Data.Text                      ( Text )-import qualified Data.Text as T-import           Language.LSP.Types.Command-import           Language.LSP.Types.Diagnostic-import           Language.LSP.Types.Common-import           Language.LSP.Types.Location-import           Language.LSP.Types.Progress-import           Language.LSP.Types.TextDocument-import           Language.LSP.Types.Utils-import           Language.LSP.Types.WorkspaceEdit---data CodeActionKind-  = -- | Empty kind.-    CodeActionEmpty-  | -- | Base kind for quickfix actions: @quickfix@.-    CodeActionQuickFix-  | -- | Base kind for refactoring actions: @refactor@.-    CodeActionRefactor-  | -- | Base kind for refactoring extraction actions: @refactor.extract@.-    -- Example extract actions:-    ---    -- - Extract method-    -- - Extract function-    -- - Extract variable-    -- - Extract interface from class-    -- - ...-    CodeActionRefactorExtract-  | -- | Base kind for refactoring inline actions: @refactor.inline@.-    ---    -- Example inline actions:-    ---    -- - Inline function-    -- - Inline variable-    -- - Inline constant-    -- - ...-    CodeActionRefactorInline-  | -- | Base kind for refactoring rewrite actions: @refactor.rewrite@.-    ---    -- Example rewrite actions:-    ---    -- - Convert JavaScript function to class-    -- - Add or remove parameter-    -- - Encapsulate field-    -- - Make method static-    -- - Move method to base class-    -- - ...-    CodeActionRefactorRewrite-  | -- | Base kind for source actions: @source@.-    ---    -- Source code actions apply to the entire file.-    CodeActionSource-  | -- | Base kind for an organize imports source action: @source.organizeImports@.-    CodeActionSourceOrganizeImports-  | CodeActionUnknown Text-  deriving (Read, Show, Eq)--fromHierarchicalString :: Text -> CodeActionKind-fromHierarchicalString t = case t of-  ""                       -> CodeActionEmpty-  "quickfix"               -> CodeActionQuickFix-  "refactor"               -> CodeActionRefactor-  "refactor.extract"       -> CodeActionRefactorExtract-  "refactor.inline"        -> CodeActionRefactorInline-  "refactor.rewrite"       -> CodeActionRefactorRewrite-  "source"                 -> CodeActionSource-  "source.organizeImports" -> CodeActionSourceOrganizeImports-  s                        -> CodeActionUnknown s--toHierarchicalString :: CodeActionKind -> Text-toHierarchicalString k = case k of-  CodeActionEmpty                 -> ""-  CodeActionQuickFix              -> "quickfix"-  CodeActionRefactor              -> "refactor"-  CodeActionRefactorExtract       -> "refactor.extract"-  CodeActionRefactorInline        -> "refactor.inline"-  CodeActionRefactorRewrite       -> "refactor.rewrite"-  CodeActionSource                -> "source"-  CodeActionSourceOrganizeImports -> "source.organizeImports"-  (CodeActionUnknown s)           -> s--instance IsString CodeActionKind where-  fromString = fromHierarchicalString . T.pack--instance ToJSON CodeActionKind where-  toJSON = String . toHierarchicalString--instance FromJSON CodeActionKind where-  parseJSON (String s) = pure $ fromHierarchicalString s-  parseJSON _          = fail "CodeActionKind"---- | Does the first 'CodeActionKind' subsume the other one, hierarchically. Reflexive.-codeActionKindSubsumes :: CodeActionKind -> CodeActionKind -> Bool--- Simple but ugly implementation: prefix on the string representation-codeActionKindSubsumes parent child = toHierarchicalString parent `T.isPrefixOf` toHierarchicalString child---- | The 'CodeActionKind's listed in the LSP spec specifically.-specCodeActionKinds :: [CodeActionKind]-specCodeActionKinds = [-  CodeActionQuickFix-  , CodeActionRefactor-  , CodeActionRefactorExtract-  , CodeActionRefactorInline-  , CodeActionRefactorRewrite-  , CodeActionSource-  , CodeActionSourceOrganizeImports-  ]---- ---------------------------------------data CodeActionKindClientCapabilities =-  CodeActionKindClientCapabilities-   { -- | The code action kind values the client supports. When this-     -- property exists the client also guarantees that it will-     -- handle values outside its set gracefully and falls back-     -- to a default value when unknown.-      _valueSet :: List CodeActionKind-   } deriving (Show, Read, Eq)--deriveJSON lspOptions ''CodeActionKindClientCapabilities--instance Default CodeActionKindClientCapabilities where-  def = CodeActionKindClientCapabilities (List specCodeActionKinds)--data CodeActionLiteralSupport =-  CodeActionLiteralSupport-    { _codeActionKind :: CodeActionKindClientCapabilities -- ^ The code action kind is support with the following value set.-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''CodeActionLiteralSupport--data CodeActionResolveClientCapabilities =-  CodeActionResolveClientCapabilities-    { _properties :: List Text -- ^ The properties that a client can resolve lazily.-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''CodeActionResolveClientCapabilities--data CodeActionClientCapabilities = CodeActionClientCapabilities-  { -- | Whether code action supports dynamic registration.-    _dynamicRegistration :: Maybe Bool,-    -- | The client support code action literals as a valid response-    -- of the `textDocument/codeAction` request.-    -- Since 3.8.0-    _codeActionLiteralSupport :: Maybe CodeActionLiteralSupport,-    -- | Whether code action supports the `isPreferred` property. Since LSP 3.15.0-    _isPreferredSupport :: Maybe Bool,-    -- | Whether code action supports the `disabled` property.-    ---    -- @since 3.16.0-    _disabledSupport :: Maybe Bool,-    -- | Whether code action supports the `data` property which is-    -- preserved between a `textDocument/codeAction` and a-    -- `codeAction/resolve` request.-    ---    -- @since 3.16.0-    _dataSupport :: Maybe Bool,-    -- | Whether the client supports resolving additional code action-    -- properties via a separate `codeAction/resolve` request.-    ---    -- @since 3.16.0-    _resolveSupport :: Maybe CodeActionResolveClientCapabilities,-    -- | Whether the client honors the change annotations in-    -- text edits and resource operations returned via the-    -- `CodeAction#edit` property by for example presenting-    -- the workspace edit in the user interface and asking-    -- for confirmation.-    ---    -- @since 3.16.0-    _honorsChangeAnnotations :: Maybe Bool-  }-  deriving (Show, Read, Eq)--deriveJSON lspOptions ''CodeActionClientCapabilities---- ---------------------------------------makeExtendingDatatype "CodeActionOptions" [''WorkDoneProgressOptions]-  [("_codeActionKinds", [t| Maybe (List CodeActionKind) |]), ("_resolveProvider", [t| Maybe Bool |]) ]-deriveJSON lspOptions ''CodeActionOptions--makeExtendingDatatype "CodeActionRegistrationOptions"-  [ ''TextDocumentRegistrationOptions-  , ''CodeActionOptions-  ] []-deriveJSON lspOptions ''CodeActionRegistrationOptions---- ----------------------------------------- | Contains additional diagnostic information about the context in which a--- code action is run.-data CodeActionContext = CodeActionContext-  { -- | An array of diagnostics known on the client side overlapping the range provided to the-    -- @textDocument/codeAction@ request. They are provided so that the server knows which-    -- errors are currently presented to the user for the given range. There is no guarantee-    -- that these accurately reflect the error state of the resource. The primary parameter-    -- to compute code actions is the provided range.-    _diagnostics :: List Diagnostic-    -- | Requested kind of actions to return.-    ---    -- Actions not of this kind are filtered out by the client before being shown. So servers-    -- can omit computing them.-  , _only :: Maybe (List CodeActionKind)-  }-  deriving (Read, Show, Eq)--deriveJSON lspOptions ''CodeActionContext--makeExtendingDatatype "CodeActionParams"-  [ ''WorkDoneProgressParams-  , ''PartialResultParams-  ]-  [ ("_textDocument", [t|TextDocumentIdentifier|]),-    ("_range", [t|Range|]),-    ("_context", [t|CodeActionContext|])-  ]-deriveJSON lspOptions ''CodeActionParams--newtype Reason = Reason {_reason :: Text}-  deriving (Read, Show, Eq)--deriveJSON lspOptions ''Reason---- | A code action represents a change that can be performed in code, e.g. to fix a problem or--- to refactor code.------ A CodeAction must set either '_edit' and/or a '_command'. If both are supplied,--- the '_edit' is applied first, then the '_command' is executed.-data CodeAction =-  CodeAction-  { -- | A short, human-readable, title for this code action.-    _title :: Text,-    -- | The kind of the code action. Used to filter code actions.-    _kind :: Maybe CodeActionKind,-    -- | The diagnostics that this code action resolves.-    _diagnostics :: Maybe (List Diagnostic),-    -- | Marks this as a preferred action. Preferred actions are used by the `auto fix` command and can be targeted-    -- by keybindings.-    ---    -- A quick fix should be marked preferred if it properly addresses the underlying error.-    -- A refactoring should be marked preferred if it is the most reasonable choice of actions to take.-    ---    -- Since LSP 3.15.0-    _isPreferred :: Maybe Bool,-    _disabled    :: Maybe Reason, -- ^ Marks that the code action cannot currently be applied.-    -- | The workspace edit this code action performs.-    _edit :: Maybe WorkspaceEdit,-    -- | A command this code action executes. If a code action-    -- provides an edit and a command, first the edit is-    -- executed and then the command.-    _command :: Maybe Command,-    -- | A data entry field that is preserved on a code action between-    -- a `textDocument/codeAction` and a `codeAction/resolve` request.-    ---    -- @since 3.16.0-    _xdata :: Maybe Value-  }-  deriving (Read, Show, Eq)-deriveJSON lspOptions ''CodeAction
− src/Language/LSP/Types/CodeLens.hs
@@ -1,64 +0,0 @@-{-# LANGUAGE TemplateHaskell       #-}-{-# LANGUAGE DuplicateRecordFields #-}--module Language.LSP.Types.CodeLens where--import Data.Aeson-import Data.Aeson.TH-import Language.LSP.Types.Command-import Language.LSP.Types.Location-import Language.LSP.Types.Progress-import Language.LSP.Types.TextDocument-import Language.LSP.Types.Utils---- ---------------------------------------data CodeLensClientCapabilities =-  CodeLensClientCapabilities-    { -- | Whether code lens supports dynamic registration.-      _dynamicRegistration :: Maybe Bool-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''CodeLensClientCapabilities---- ---------------------------------------makeExtendingDatatype "CodeLensOptions" [''WorkDoneProgressOptions]-  [ ("_resolveProvider", [t| Maybe Bool |] )]-deriveJSON lspOptions ''CodeLensOptions--makeExtendingDatatype "CodeLensRegistrationOptions" -  [ ''TextDocumentRegistrationOptions-  , ''CodeLensOptions-  ] []-deriveJSON lspOptions ''CodeLensRegistrationOptions---- ---------------------------------------makeExtendingDatatype "CodeLensParams"-  [ ''WorkDoneProgressParams,-    ''PartialResultParams-  ]-  [("_textDocument", [t|TextDocumentIdentifier|])]-deriveJSON lspOptions ''CodeLensParams---- ----------------------------------------- | A code lens represents a command that should be shown along with source--- text, like the number of references, a way to run tests, etc.--- --- A code lens is _unresolved_ when no command is associated to it. For--- performance reasons the creation of a code lens and resolving should be done--- in two stages.-data CodeLens =-  CodeLens-  { -- | The range in which this code lens is valid. Should only span a single line.-    _range   :: Range-  , -- | The command this code lens represents.-    _command :: Maybe Command-  , -- | A data entry field that is preserved on a code lens item between-    -- a code lens and a code lens resolve request.-    _xdata   :: Maybe Value-  } deriving (Read,Show,Eq)--deriveJSON lspOptions ''CodeLens
− src/Language/LSP/Types/Command.hs
@@ -1,51 +0,0 @@-{-# LANGUAGE TemplateHaskell            #-}-{-# LANGUAGE DuplicateRecordFields      #-}--module Language.LSP.Types.Command where--import           Data.Aeson-import           Data.Aeson.TH-import           Data.Text-import           Language.LSP.Types.Common-import           Language.LSP.Types.Progress-import           Language.LSP.Types.Utils---- ---------------------------------------data ExecuteCommandClientCapabilities =-  ExecuteCommandClientCapabilities-    { _dynamicRegistration :: Maybe Bool -- ^Execute command supports dynamic-                                         -- registration.-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''ExecuteCommandClientCapabilities---- ---------------------------------------makeExtendingDatatype "ExecuteCommandOptions" [''WorkDoneProgressOptions]-  [("_commands", [t| List Text |])]-deriveJSON lspOptions ''ExecuteCommandOptions--makeExtendingDatatype "ExecuteCommandRegistrationOptions" [''ExecuteCommandOptions] []-deriveJSON lspOptions ''ExecuteCommandRegistrationOptions---- ---------------------------------------makeExtendingDatatype "ExecuteCommandParams" [''WorkDoneProgressParams]-  [ ("_command", [t| Text |])-  , ("_arguments", [t| Maybe (List Value) |])-  ]-deriveJSON lspOptions ''ExecuteCommandParams--data Command =-  Command-    { -- | Title of the command, like @save@.-      _title     :: Text-    , -- | The identifier of the actual command handler.-      _command   :: Text-    , -- | Arguments that the command handler should be invoked with.-      _arguments :: Maybe (List Value)-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''Command-
− src/Language/LSP/Types/Common.hs
@@ -1,103 +0,0 @@-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE DataKinds                  #-}-{-# LANGUAGE DeriveAnyClass             #-}-{-# LANGUAGE DeriveTraversable          #-}-{-# LANGUAGE DeriveGeneric              #-}-{-# LANGUAGE DerivingStrategies         #-}-{-# LANGUAGE TypeOperators              #-}---- | Common types that aren't in the specification-module Language.LSP.Types.Common (-    type (|?) (..)-  , toEither-  , List (..)-  , Empty (..)-  , Int32-  , UInt ) where--import Control.Applicative-import Control.DeepSeq-import Data.Aeson-import Data.Hashable-import Data.Int (Int32)-import Data.Mod.Word-import Text.Read (Read(readPrec))-import GHC.Generics hiding (UInt)-import GHC.TypeNats hiding (Mod)-import Data.Bifunctor (bimap)---- | The "uinteger" type in the LSP spec.------ Unusually, this is a **31**-bit unsigned integer, not a 32-bit one.-newtype UInt = UInt (Mod (2^31))-  deriving newtype (Num, Bounded, Enum, Eq, Ord)-  deriving stock (Generic)-  deriving anyclass (NFData)--instance Hashable UInt where hashWithSalt s (UInt n) = hashWithSalt s (unMod n)--instance Show UInt where-  show (UInt u) = show $ unMod u--instance Read UInt where-  readPrec = fromInteger <$> readPrec--instance Real UInt where-  toRational (UInt u) = toRational $ unMod u--instance Integral UInt where-  quotRem (UInt x) (UInt y) = bimap fromIntegral fromIntegral $ quotRem (unMod x) (unMod y)-  toInteger (UInt u) = toInteger $ unMod u--instance ToJSON UInt where-  toJSON u = toJSON (toInteger u)--instance FromJSON UInt where-  parseJSON v = fromInteger <$> parseJSON v---- | A terser, isomorphic data type for 'Either', that does not get tagged when--- converting to and from JSON.-data a |? b = InL a-            | InR b-  deriving (Read,Show,Eq,Ord,Generic)-infixr |?--toEither :: a |? b -> Either a b-toEither (InL a) = Left a-toEither (InR b) = Right b--instance (ToJSON a, ToJSON b) => ToJSON (a |? b) where-  toJSON (InL x) = toJSON x-  toJSON (InR x) = toJSON x--instance (FromJSON a, FromJSON b) => FromJSON (a |? b) where-  -- Important: Try to parse the **rightmost** type first, as in the specification-  -- the more complex types tend to appear on the right of the |, i.e.-  -- @colorProvider?: boolean | DocumentColorOptions | DocumentColorRegistrationOptions;@-  parseJSON v = InR <$> parseJSON v <|> InL <$> parseJSON v--instance (NFData a, NFData b) => NFData (a |? b)---- | All LSP types representing a list **must** use this type rather than '[]'.--- In particular this is necessary to change the 'FromJSON' instance to be compatible--- with Elisp (where empty lists show up as 'null')-newtype List a = List [a]-    deriving stock (Traversable,Generic)-    deriving newtype (Show,Read,Eq,Ord,Semigroup,Monoid,Functor,Foldable)--instance NFData a => NFData (List a)--instance (ToJSON a) => ToJSON (List a) where-  toJSON (List ls) = toJSON ls--instance (FromJSON a) => FromJSON (List a) where-  parseJSON Null = return (List [])-  parseJSON v      = List <$> parseJSON v--data Empty = Empty deriving (Eq,Ord,Show)-instance ToJSON Empty where-  toJSON Empty = Null-instance FromJSON Empty where-  parseJSON Null = pure Empty-  parseJSON (Object o) | o == mempty = pure Empty-  parseJSON _ = fail "expected 'null' or '{}'"
− src/Language/LSP/Types/Completion.hs
@@ -1,418 +0,0 @@-{-# LANGUAGE DuplicateRecordFields      #-}-{-# LANGUAGE OverloadedStrings          #-}-{-# LANGUAGE TemplateHaskell            #-}-module Language.LSP.Types.Completion where--import qualified Data.Aeson                    as A-import           Data.Aeson.TH-import           Data.Scientific                ( Scientific )-import           Data.Text                      ( Text )-import           Language.LSP.Types.Command-import           Language.LSP.Types.Common-import           Language.LSP.Types.MarkupContent-import           Language.LSP.Types.Progress-import           Language.LSP.Types.TextDocument-import           Language.LSP.Types.Utils-import           Language.LSP.Types.WorkspaceEdit-import           Language.LSP.Types.Location (Range)--data CompletionItemKind = CiText-                        | CiMethod-                        | CiFunction-                        | CiConstructor-                        | CiField-                        | CiVariable-                        | CiClass-                        | CiInterface-                        | CiModule-                        | CiProperty-                        | CiUnit-                        | CiValue-                        | CiEnum-                        | CiKeyword-                        | CiSnippet-                        | CiColor-                        | CiFile-                        | CiReference-                        | CiFolder-                        | CiEnumMember-                        | CiConstant-                        | CiStruct-                        | CiEvent-                        | CiOperator-                        | CiTypeParameter-         deriving (Read,Show,Eq,Ord)--instance A.ToJSON CompletionItemKind where-  toJSON CiText          = A.Number 1-  toJSON CiMethod        = A.Number 2-  toJSON CiFunction      = A.Number 3-  toJSON CiConstructor   = A.Number 4-  toJSON CiField         = A.Number 5-  toJSON CiVariable      = A.Number 6-  toJSON CiClass         = A.Number 7-  toJSON CiInterface     = A.Number 8-  toJSON CiModule        = A.Number 9-  toJSON CiProperty      = A.Number 10-  toJSON CiUnit          = A.Number 11-  toJSON CiValue         = A.Number 12-  toJSON CiEnum          = A.Number 13-  toJSON CiKeyword       = A.Number 14-  toJSON CiSnippet       = A.Number 15-  toJSON CiColor         = A.Number 16-  toJSON CiFile          = A.Number 17-  toJSON CiReference     = A.Number 18-  toJSON CiFolder        = A.Number 19-  toJSON CiEnumMember    = A.Number 20-  toJSON CiConstant      = A.Number 21-  toJSON CiStruct        = A.Number 22-  toJSON CiEvent         = A.Number 23-  toJSON CiOperator      = A.Number 24-  toJSON CiTypeParameter = A.Number 25--instance A.FromJSON CompletionItemKind where-  parseJSON (A.Number  1) = pure CiText-  parseJSON (A.Number  2) = pure CiMethod-  parseJSON (A.Number  3) = pure CiFunction-  parseJSON (A.Number  4) = pure CiConstructor-  parseJSON (A.Number  5) = pure CiField-  parseJSON (A.Number  6) = pure CiVariable-  parseJSON (A.Number  7) = pure CiClass-  parseJSON (A.Number  8) = pure CiInterface-  parseJSON (A.Number  9) = pure CiModule-  parseJSON (A.Number 10) = pure CiProperty-  parseJSON (A.Number 11) = pure CiUnit-  parseJSON (A.Number 12) = pure CiValue-  parseJSON (A.Number 13) = pure CiEnum-  parseJSON (A.Number 14) = pure CiKeyword-  parseJSON (A.Number 15) = pure CiSnippet-  parseJSON (A.Number 16) = pure CiColor-  parseJSON (A.Number 17) = pure CiFile-  parseJSON (A.Number 18) = pure CiReference-  parseJSON (A.Number 19) = pure CiFolder-  parseJSON (A.Number 20) = pure CiEnumMember-  parseJSON (A.Number 21) = pure CiConstant-  parseJSON (A.Number 22) = pure CiStruct-  parseJSON (A.Number 23) = pure CiEvent-  parseJSON (A.Number 24) = pure CiOperator-  parseJSON (A.Number 25) = pure CiTypeParameter-  parseJSON _             = fail "CompletionItemKind"--data CompletionItemTag-  -- | Render a completion as obsolete, usually using a strike-out.-  = CitDeprecated-  | CitUnknown Scientific-  deriving (Eq, Ord, Show, Read)--instance A.ToJSON CompletionItemTag where-  toJSON CitDeprecated  = A.Number 1-  toJSON (CitUnknown i) = A.Number i--instance A.FromJSON CompletionItemTag where-  parseJSON (A.Number 1) = pure CitDeprecated-  parseJSON _            = fail "CompletionItemTag"--data CompletionItemTagsClientCapabilities =-  CompletionItemTagsClientCapabilities-    { -- | The tag supported by the client.-      _valueSet :: List CompletionItemTag-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''CompletionItemTagsClientCapabilities--data CompletionItemResolveClientCapabilities =-  CompletionItemResolveClientCapabilities-    { -- | The properties that a client can resolve lazily.-      _properties :: List Text-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''CompletionItemResolveClientCapabilities--{-|-How whitespace and indentation is handled during completion-item insertion.--@since 3.16.0--}-data InsertTextMode =-  -- | The insertion or replace strings is taken as it is. If the-  -- value is multi line the lines below the cursor will be-  -- inserted using the indentation defined in the string value.-  -- The client will not apply any kind of adjustments to the-  -- string.-  AsIs-  -- | The editor adjusts leading whitespace of new lines so that-  -- they match the indentation up to the cursor of the line for-  -- which the item is accepted.-  ---  -- Consider a line like this: <2tabs><cursor><3tabs>foo. Accepting a-  -- multi line completion item is indented using 2 tabs and all-  -- following lines inserted will be indented using 2 tabs as well.-  | AdjustIndentation-  deriving (Read,Show,Eq)--instance A.ToJSON InsertTextMode where-  toJSON AsIs              = A.Number 1-  toJSON AdjustIndentation = A.Number 2--instance A.FromJSON InsertTextMode where-  parseJSON (A.Number 1) = pure AsIs-  parseJSON (A.Number 2) = pure AdjustIndentation-  parseJSON _            = fail "InsertTextMode"--data CompletionItemInsertTextModeClientCapabilities =-  CompletionItemInsertTextModeClientCapabilities-    { _valueSet :: List InsertTextMode-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''CompletionItemInsertTextModeClientCapabilities--data CompletionItemClientCapabilities =-  CompletionItemClientCapabilities-    { -- | Client supports snippets as insert text.-      ---      -- A snippet can define tab stops and placeholders with `$1`, `$2` and-      -- `${3:foo}`. `$0` defines the final tab stop, it defaults to the end of-      -- the snippet. Placeholders with equal identifiers are linked, that is-      -- typing in one will update others too.-      _snippetSupport :: Maybe Bool--      -- | Client supports commit characters on a completion item.-    , _commitCharactersSupport :: Maybe Bool--      -- | Client supports the follow content formats for the documentation-      -- property. The order describes the preferred format of the client.-    , _documentationFormat :: Maybe (List MarkupKind)--      -- | Client supports the deprecated property on a completion item.-    , _deprecatedSupport :: Maybe Bool--      -- | Client supports the preselect property on a completion item.-    , _preselectSupport :: Maybe Bool--      -- | Client supports the tag property on a completion item. Clients-      -- supporting tags have to handle unknown tags gracefully. Clients-      -- especially need to preserve unknown tags when sending a-      -- completion item back to the server in a resolve call.-      ---      -- @since 3.15.0-    , _tagSupport :: Maybe CompletionItemTagsClientCapabilities-      -- | Client supports insert replace edit to control different behavior if-      -- completion item is inserted in the text or should replace text.-      ---      -- @since 3.16.0-    , _insertReplaceSupport :: Maybe Bool-      -- | Indicates which properties a client can resolve lazily on a-      -- completion item. Before version 3.16.0 only the predefined properties-      -- `documentation` and `details` could be resolved lazily.-      ---      -- @since 3.16.0-    , _resolveSupport :: Maybe CompletionItemResolveClientCapabilities-      -- | The client supports the `insertTextMode` property on-      -- a completion item to override the whitespace handling mode-      -- as defined by the client (see `insertTextMode`).-      ---      -- @since 3.16.0-    , _insertTextModeSupport :: Maybe CompletionItemInsertTextModeClientCapabilities-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''CompletionItemClientCapabilities--data CompletionItemKindClientCapabilities =-  CompletionItemKindClientCapabilities-    { -- | The completion item kind values the client supports. When this-      -- property exists the client also guarantees that it will-      --  handle values outside its set gracefully and falls back-      --  to a default value when unknown.-      _valueSet :: Maybe (List CompletionItemKind)-    }-  deriving (Show, Read, Eq)--deriveJSON lspOptions ''CompletionItemKindClientCapabilities--data CompletionClientCapabilities =-  CompletionClientCapabilities-    { _dynamicRegistration :: Maybe Bool -- ^ Whether completion supports dynamic-                                         -- registration.-    , _completionItem :: Maybe CompletionItemClientCapabilities-    , _completionItemKind :: Maybe CompletionItemKindClientCapabilities-    , _contextSupport :: Maybe Bool-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''CompletionClientCapabilities---- ---------------------------------------data InsertTextFormat-  = PlainText -- ^The primary text to be inserted is treated as a plain string.-  | Snippet-      -- ^ The primary text to be inserted is treated as a snippet.-      ---      -- A snippet can define tab stops and placeholders with `$1`, `$2`-      -- and `${3:foo}`. `$0` defines the final tab stop, it defaults to-      -- the end of the snippet. Placeholders with equal identifiers are linked,-      -- that is typing in one will update others too.-      ---      -- See also: https://github.com/Microsoft/vscode/blob/master/src/vs/editor/contrib/snippet/common/snippet.md-    deriving (Show, Read, Eq)--instance A.ToJSON InsertTextFormat where-  toJSON PlainText = A.Number 1-  toJSON Snippet   = A.Number 2--instance A.FromJSON InsertTextFormat where-  parseJSON (A.Number  1) = pure PlainText-  parseJSON (A.Number  2) = pure Snippet-  parseJSON _             = fail "InsertTextFormat"--data CompletionDoc = CompletionDocString Text-                   | CompletionDocMarkup MarkupContent-  deriving (Show, Read, Eq)--deriveJSON lspOptionsUntagged ''CompletionDoc--data InsertReplaceEdit =-  InsertReplaceEdit-    { _newText :: Text -- ^ The string to be inserted.-    , _insert  :: Range -- ^ The range if the insert is requested-    , _repalce :: Range -- ^ The range if the replace is requested.-    }-  deriving (Read,Show,Eq)-deriveJSON lspOptions ''InsertReplaceEdit--data CompletionEdit = CompletionEditText TextEdit | CompletionEditInsertReplace InsertReplaceEdit-  deriving (Read,Show,Eq)--deriveJSON lspOptionsUntagged ''CompletionEdit--data CompletionItem =-  CompletionItem-    { _label               :: Text -- ^ The label of this completion item. By default also-                       -- the text that is inserted when selecting this-                       -- completion.-    , _kind                :: Maybe CompletionItemKind-    , _tags                :: Maybe (List CompletionItemTag) -- ^ Tags for this completion item.-    , _detail              :: Maybe Text -- ^ A human-readable string with additional-                              -- information about this item, like type or-                              -- symbol information.-    , _documentation       :: Maybe CompletionDoc -- ^ A human-readable string that represents-                                                  -- a doc-comment.-    , _deprecated          :: Maybe Bool -- ^ Indicates if this item is deprecated.-    , _preselect           :: Maybe Bool-         -- ^ Select this item when showing.-         -- *Note* that only one completion item can be selected and that the-         -- tool / client decides which item that is. The rule is that the *first*-         -- item of those that match best is selected.-    , _sortText            :: Maybe Text -- ^ A string that should be used when filtering-                                -- a set of completion items. When `falsy` the-                                -- label is used.-    , _filterText          :: Maybe Text -- ^ A string that should be used when-                                  -- filtering a set of completion items. When-                                  -- `falsy` the label is used.-    , _insertText          :: Maybe Text -- ^ A string that should be inserted a-                                  -- document when selecting this completion.-                                  -- When `falsy` the label is used.-    , _insertTextFormat    :: Maybe InsertTextFormat-         -- ^ The format of the insert text. The format applies to both the-         -- `insertText` property and the `newText` property of a provided-         -- `textEdit`.-    , _insertTextMode      :: Maybe InsertTextMode-         -- ^ How whitespace and indentation is handled during completion-         -- item insertion. If not provided the client's default value depends on-         -- the @textDocument.completion.insertTextMode@ client capability.-    , _textEdit            :: Maybe CompletionEdit-         -- ^ An edit which is applied to a document when selecting this-         -- completion. When an edit is provided the value of `insertText` is-         -- ignored.-         ---         -- *Note:* The range of the edit must be a single line range and it-         -- must contain the position at which completion has been requested.-    , _additionalTextEdits :: Maybe (List TextEdit)-         -- ^ An optional array of additional text edits that are applied when-         -- selecting this completion. Edits must not overlap with the main edit-         -- nor with themselves.-    , _commitCharacters    :: Maybe (List Text)-         -- ^ An optional set of characters that when pressed while this completion-         -- is active will accept it first and then type that character. *Note*-         -- that all commit characters should have `length=1` and that superfluous-         -- characters will be ignored.-    , _command             :: Maybe Command-        -- ^ An optional command that is executed *after* inserting this-        -- completion. *Note* that additional modifications to the current-        -- document should be described with the additionalTextEdits-property.-    , _xdata               :: Maybe A.Value -- ^ An data entry field that is preserved on a-                              -- completion item between a completion and a-                              -- completion resolve request.-    } deriving (Read,Show,Eq)--deriveJSON lspOptions ''CompletionItem---- | Represents a collection of 'CompletionItem's to be presented in the editor.-data CompletionList =-  CompletionList-    { _isIncomplete :: Bool -- ^ This list it not complete. Further typing-                            -- should result in recomputing this list.-    , _items        :: List CompletionItem -- ^ The completion items.-    } deriving (Read,Show,Eq)--deriveJSON lspOptions ''CompletionList---- | How a completion was triggered-data CompletionTriggerKind = -- | Completion was triggered by typing an identifier (24x7 code-                             -- complete), manual invocation (e.g Ctrl+Space) or via API.-                             CtInvoked-                             -- | Completion was triggered by a trigger character specified by-                             -- the `triggerCharacters` properties of the `CompletionRegistrationOptions`.-                           | CtTriggerCharacter-                             -- | Completion was re-triggered as the current completion list is incomplete.-                           | CtTriggerForIncompleteCompletions-                             -- | An unknown 'CompletionTriggerKind' not yet supported in haskell-lsp.-                           | CtUnknown Scientific-  deriving (Read, Show, Eq)--instance A.ToJSON CompletionTriggerKind where-  toJSON CtInvoked                         = A.Number 1-  toJSON CtTriggerCharacter                = A.Number 2-  toJSON CtTriggerForIncompleteCompletions = A.Number 3-  toJSON (CtUnknown x)                     = A.Number x--instance A.FromJSON CompletionTriggerKind where-  parseJSON (A.Number 1) = pure CtInvoked-  parseJSON (A.Number 2) = pure CtTriggerCharacter-  parseJSON (A.Number 3) = pure CtTriggerForIncompleteCompletions-  parseJSON (A.Number x) = pure (CtUnknown x)-  parseJSON _            = fail "CompletionTriggerKind"--makeExtendingDatatype "CompletionOptions" [''WorkDoneProgressOptions]-  [ ("_triggerCharacters", [t| Maybe [Text] |])-  , ("_allCommitCharacters", [t| Maybe [Text] |])-  , ("_resolveProvider", [t| Maybe Bool|])-  ]-deriveJSON lspOptions ''CompletionOptions--makeExtendingDatatype "CompletionRegistrationOptions"-  [ ''TextDocumentRegistrationOptions-  , ''CompletionOptions-  ]-  []-deriveJSON lspOptions ''CompletionRegistrationOptions--data CompletionContext =-  CompletionContext-    { _triggerKind      :: CompletionTriggerKind -- ^ How the completion was triggered.-    , _triggerCharacter :: Maybe Text-      -- ^ The trigger character (a single character) that has trigger code complete.-      -- Is undefined if `triggerKind !== CompletionTriggerKind.TriggerCharacter`-    }-  deriving (Read, Show, Eq)--deriveJSON lspOptions ''CompletionContext--makeExtendingDatatype "CompletionParams"-  [ ''TextDocumentPositionParams-  , ''WorkDoneProgressParams-  , ''PartialResultParams-  ]-  [ ("_context", [t| Maybe CompletionContext |]) ]-deriveJSON lspOptions ''CompletionParams-
− src/Language/LSP/Types/Configuration.hs
@@ -1,42 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}-module Language.LSP.Types.Configuration where--import Data.Aeson-import Data.Aeson.TH-import Data.Text (Text)-import Language.LSP.Types.Common-import Language.LSP.Types.Utils---- ---------------------------------------data DidChangeConfigurationClientCapabilities =-  DidChangeConfigurationClientCapabilities-    { _dynamicRegistration :: Maybe Bool -- ^Did change configuration-                                         -- notification supports dynamic-                                         -- registration.-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''DidChangeConfigurationClientCapabilities--data DidChangeConfigurationParams =-  DidChangeConfigurationParams-  { _settings :: Value -- ^ The actual changed settings-  } deriving (Show, Read, Eq)--deriveJSON lspOptions ''DidChangeConfigurationParams---- -----------------------------------------------------------------------data ConfigurationItem =-  ConfigurationItem-    { _scopeUri :: Maybe Text -- ^ The scope to get the configuration section for.-    , _section  :: Maybe Text -- ^ The configuration section asked for.-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''ConfigurationItem--data ConfigurationParams =-  ConfigurationParams-    { _items :: List ConfigurationItem-    } deriving (Show, Read, Eq)-deriveJSON lspOptions ''ConfigurationParams
− src/Language/LSP/Types/Declaration.hs
@@ -1,39 +0,0 @@-{-# LANGUAGE DuplicateRecordFields #-}-{-# LANGUAGE TemplateHaskell       #-}--module Language.LSP.Types.Declaration where--import Data.Aeson.TH-import Language.LSP.Types.Progress-import Language.LSP.Types.StaticRegistrationOptions-import Language.LSP.Types.TextDocument-import Language.LSP.Types.Utils--data DeclarationClientCapabilities =-  DeclarationClientCapabilities-  { -- | Whether declaration supports dynamic registration. If this is set to 'true'-    -- the client supports the new 'DeclarationRegistrationOptions' return value-    -- for the corresponding server capability as well.-    _dynamicRegistration :: Maybe Bool-    -- | The client supports additional metadata in the form of declaration links.-  , _linkSupport :: Maybe Bool-  }-  deriving (Read, Show, Eq)-deriveJSON lspOptions ''DeclarationClientCapabilities--makeExtendingDatatype "DeclarationOptions" [''WorkDoneProgressOptions] []-deriveJSON lspOptions ''DeclarationOptions--makeExtendingDatatype "DeclarationRegistrationOptions"-  [ ''DeclarationOptions-  , ''TextDocumentRegistrationOptions-  , ''StaticRegistrationOptions-  ] []-deriveJSON lspOptions ''DeclarationRegistrationOptions--makeExtendingDatatype "DeclarationParams"-  [ ''TextDocumentPositionParams-  , ''WorkDoneProgressParams-  , ''PartialResultParams-  ] []-deriveJSON lspOptions ''DeclarationParams
− src/Language/LSP/Types/Definition.hs
@@ -1,36 +0,0 @@-{-# LANGUAGE DuplicateRecordFields #-}-{-# LANGUAGE TemplateHaskell       #-}--module Language.LSP.Types.Definition where-    -import Data.Aeson.TH-import Language.LSP.Types.Progress-import Language.LSP.Types.TextDocument-import Language.LSP.Types.Utils--data DefinitionClientCapabilities =-  DefinitionClientCapabilities-    { -- | Whether definition supports dynamic registration.-      _dynamicRegistration :: Maybe Bool-      -- | The client supports additional metadata in the form of definition-      -- links.-      -- Since LSP 3.14.0-    , _linkSupport :: Maybe Bool-    } deriving (Show, Read, Eq)-deriveJSON lspOptions ''DefinitionClientCapabilities--makeExtendingDatatype "DefinitionOptions" [''WorkDoneProgressOptions] []-deriveJSON lspOptions ''DefinitionOptions--makeExtendingDatatype "DefinitionRegistrationOptions"-  [ ''TextDocumentRegistrationOptions-  , ''DefinitionOptions-  ] []-deriveJSON lspOptions ''DefinitionRegistrationOptions--makeExtendingDatatype "DefinitionParams"-  [ ''TextDocumentPositionParams-  , ''WorkDoneProgressParams-  , ''PartialResultParams-  ] []-deriveJSON lspOptions ''DefinitionParams
− src/Language/LSP/Types/Diagnostic.hs
@@ -1,139 +0,0 @@-{-# LANGUAGE DuplicateRecordFields      #-}-{-# LANGUAGE TemplateHaskell            #-}-{-# LANGUAGE DeriveGeneric              #-}-{-# LANGUAGE TypeOperators              #-}--module Language.LSP.Types.Diagnostic where--import           Control.DeepSeq-import qualified Data.Aeson                                 as A-import           Data.Aeson.TH-import           Data.Text-import           GHC.Generics hiding (UInt)-import           Language.LSP.Types.Common-import           Language.LSP.Types.Location-import           Language.LSP.Types.Uri-import           Language.LSP.Types.Utils---- -----------------------------------------------------------------------data DiagnosticSeverity-  = DsError   -- ^ Error = 1,-  | DsWarning -- ^ Warning = 2,-  | DsInfo    -- ^ Info = 3,-  | DsHint    -- ^ Hint = 4-  deriving (Eq,Ord,Show,Read, Generic)--instance NFData DiagnosticSeverity--instance A.ToJSON DiagnosticSeverity where-  toJSON DsError   = A.Number 1-  toJSON DsWarning = A.Number 2-  toJSON DsInfo    = A.Number 3-  toJSON DsHint    = A.Number 4--instance A.FromJSON DiagnosticSeverity where-  parseJSON (A.Number 1) = pure DsError-  parseJSON (A.Number 2) = pure DsWarning-  parseJSON (A.Number 3) = pure DsInfo-  parseJSON (A.Number 4) = pure DsHint-  parseJSON _            = fail "DiagnosticSeverity"--data DiagnosticTag-  -- | Unused or unnecessary code.-  ---  -- Clients are allowed to render diagnostics with this tag faded out-  -- instead of having an error squiggle.-  = DtUnnecessary-  -- | Deprecated or obsolete code.-  ---  -- Clients are allowed to rendered diagnostics with this tag strike-  -- through.-  | DtDeprecated-  deriving (Eq, Ord, Show, Read, Generic)--instance NFData DiagnosticTag--instance A.ToJSON DiagnosticTag where-  toJSON DtUnnecessary = A.Number 1-  toJSON DtDeprecated  = A.Number 2--instance A.FromJSON DiagnosticTag where-  parseJSON (A.Number 1) = pure DtUnnecessary-  parseJSON (A.Number 2) = pure DtDeprecated-  parseJSON _            = fail "DiagnosticTag"---- -----------------------------------------------------------------------data DiagnosticRelatedInformation =-  DiagnosticRelatedInformation-    { _location :: Location-    , _message  :: Text-    } deriving (Show, Read, Eq, Ord, Generic)--instance NFData DiagnosticRelatedInformation--deriveJSON lspOptions ''DiagnosticRelatedInformation---- -----------------------------------------------------------------------type DiagnosticSource = Text-data Diagnostic =-  Diagnostic-    { _range              :: Range-    , _severity           :: Maybe DiagnosticSeverity-    , _code               :: Maybe (Int32 |? Text)-    , _source             :: Maybe DiagnosticSource-    , _message            :: Text-    , _tags               :: Maybe (List DiagnosticTag)-    , _relatedInformation :: Maybe (List DiagnosticRelatedInformation)-    } deriving (Show, Read, Eq, Ord, Generic)--instance NFData Diagnostic--deriveJSON lspOptions ''Diagnostic---- ---------------------------------------data PublishDiagnosticsTagsClientCapabilities =-  PublishDiagnosticsTagsClientCapabilities-    { -- | The tags supported by the client.-      _valueSet :: List DiagnosticTag-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''PublishDiagnosticsTagsClientCapabilities--data PublishDiagnosticsClientCapabilities =-  PublishDiagnosticsClientCapabilities-    { -- | Whether the clients accepts diagnostics with related information.-      _relatedInformation :: Maybe Bool-      -- | Client supports the tag property to provide metadata about a-      -- diagnostic.-      ---      -- Clients supporting tags have to handle unknown tags gracefully.-      -- -      -- Since LSP 3.15.0-    , _tagSupport :: Maybe PublishDiagnosticsTagsClientCapabilities-      -- | Whether the client interprets the version property of the-      -- @textDocument/publishDiagnostics@ notification's parameter.-      -- -      -- Since LSP 3.15.0-    , _versionSupport :: Maybe Bool-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''PublishDiagnosticsClientCapabilities--data PublishDiagnosticsParams =-  PublishDiagnosticsParams-    { -- | The URI for which diagnostic information is reported.-      _uri         :: Uri-      -- | Optional the version number of the document the diagnostics are-      -- published for.-      -- -      -- Since LSP 3.15.0-    , _version     :: Maybe UInt-      -- | An array of diagnostic information items.-    , _diagnostics :: List Diagnostic-    } deriving (Read,Show,Eq)--deriveJSON lspOptions ''PublishDiagnosticsParams
− src/Language/LSP/Types/DocumentColor.hs
@@ -1,91 +0,0 @@-{-# LANGUAGE TemplateHaskell       #-}-{-# LANGUAGE DuplicateRecordFields #-}-module Language.LSP.Types.DocumentColor where--import Data.Aeson.TH-import Data.Text (Text)-import Language.LSP.Types.Common-import Language.LSP.Types.Location-import Language.LSP.Types.Progress-import Language.LSP.Types.StaticRegistrationOptions-import Language.LSP.Types.TextDocument-import Language.LSP.Types.Utils-import Language.LSP.Types.WorkspaceEdit--data DocumentColorClientCapabilities =-  DocumentColorClientCapabilities-  { -- | Whether document color supports dynamic registration.-    _dynamicRegistration :: Maybe Bool-  } deriving (Read, Show, Eq)-deriveJSON lspOptions ''DocumentColorClientCapabilities---- ---------------------------------------makeExtendingDatatype "DocumentColorOptions" [''WorkDoneProgressOptions] []-deriveJSON lspOptions ''DocumentColorOptions--makeExtendingDatatype "DocumentColorRegistrationOptions"-  [ ''TextDocumentRegistrationOptions-  , ''StaticRegistrationOptions-  , ''DocumentColorOptions-  ] []-deriveJSON lspOptions ''DocumentColorRegistrationOptions---- ---------------------------------------makeExtendingDatatype "DocumentColorParams"-  [ ''WorkDoneProgressParams-  , ''PartialResultParams-  ]-  [("_textDocument", [t| TextDocumentIdentifier |])]-deriveJSON lspOptions ''DocumentColorParams---- ----------------------------------------- | Represents a color in RGBA space.-data Color =-  Color-    { _red   :: Float -- ^ The red component of this color in the range [0-1].-    , _green :: Float -- ^ The green component of this color in the range [0-1].-    , _blue  :: Float -- ^ The blue component of this color in the range [0-1].-    , _alpha :: Float -- ^ The alpha component of this color in the range [0-1].-    } deriving (Read, Show, Eq)-deriveJSON lspOptions ''Color--data ColorInformation =-  ColorInformation-    { _range :: Range -- ^ The range in the document where this color appears.-    , _color :: Color -- ^ The actual color value for this color range.-    } deriving (Read, Show, Eq)-deriveJSON lspOptions ''ColorInformation---- ---------------------------------------makeExtendingDatatype "ColorPresentationParams"-  [ ''WorkDoneProgressParams-  , ''PartialResultParams-  ]-  [ ("_textDocument", [t| TextDocumentIdentifier |])-  , ("_color", [t| Color |])-  , ("_range", [t| Range |])-  ]-deriveJSON lspOptions ''ColorPresentationParams---- ---------------------------------------data ColorPresentation =-  ColorPresentation-    { -- | The label of this color presentation. It will be shown on the color-      -- picker header. By default this is also the text that is inserted when selecting-      -- this color presentation.-      _label               :: Text-      -- | A 'TextEdit' which is applied to a document when selecting-      -- this presentation for the color.  When `falsy` the '_label'-      -- is used.-    , _textEdit            :: Maybe TextEdit-      -- | An optional array of additional 'TextEdit's that are applied when-      -- selecting this color presentation. Edits must not overlap with the main-      -- '_textEdit' nor with themselves.-    , _additionalTextEdits :: Maybe (List TextEdit)-    } deriving (Read, Show, Eq)-deriveJSON lspOptions ''ColorPresentation
− src/Language/LSP/Types/DocumentFilter.hs
@@ -1,36 +0,0 @@-{-# LANGUAGE TemplateHaskell            #-}-module Language.LSP.Types.DocumentFilter where--import           Data.Aeson.TH-import           Data.Text                      ( Text )-import           Language.LSP.Types.Common-import           Language.LSP.Types.Utils---- -----------------------------------------------------------------------data DocumentFilter =-  DocumentFilter-    { -- | A language id, like `typescript`.-      _language :: Maybe Text-      -- | A Uri scheme, like @file@ or @untitled@.-    , _scheme   :: Maybe Text-    , -- | A glob pattern, like `*.{ts,js}`.-      ---      -- Glob patterns can have the following syntax:-      -- - @*@ to match one or more characters in a path segment-      -- - @?@ to match on one character in a path segment-      -- - @**@ to match any number of path segments, including none-      -- - @{}@ to group conditions (e.g. @**​/*.{ts,js}@ matches all TypeScript and JavaScript files)-      -- - @[]@ to declare a range of characters to match in a path segment (e.g., @example.[0-9]@ to match on @example.0@, @example.1@, …)-      -- - @[!...]@ to negate a range of characters to match in a path segment (e.g., @example.[!0-9]@ to match on @example.a@, @example.b@, but not @example.0@)-      _pattern  :: Maybe Text-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''DocumentFilter--{--A document selector is the combination of one or many document filters.--export type DocumentSelector = DocumentFilter[];--}-type DocumentSelector = List DocumentFilter
− src/Language/LSP/Types/DocumentHighlight.hs
@@ -1,71 +0,0 @@-{-# LANGUAGE DuplicateRecordFields #-}-{-# LANGUAGE TemplateHaskell       #-}-module Language.LSP.Types.DocumentHighlight where--import Data.Aeson-import Data.Aeson.TH-import Language.LSP.Types.Location-import Language.LSP.Types.Progress-import Language.LSP.Types.TextDocument-import Language.LSP.Types.Utils---- ---------------------------------------data DocumentHighlightClientCapabilities =-  DocumentHighlightClientCapabilities-    { -- | Whether document highlight supports dynamic registration.-      _dynamicRegistration :: Maybe Bool-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''DocumentHighlightClientCapabilities--makeExtendingDatatype "DocumentHighlightOptions" [''WorkDoneProgressOptions] []-deriveJSON lspOptions ''DocumentHighlightOptions--makeExtendingDatatype "DocumentHighlightRegistrationOptions"-  [ ''TextDocumentRegistrationOptions-  , ''DocumentHighlightOptions-  ] []-deriveJSON lspOptions ''DocumentHighlightRegistrationOptions--makeExtendingDatatype "DocumentHighlightParams"-  [ ''TextDocumentPositionParams-  , ''WorkDoneProgressParams-  , ''PartialResultParams-  ] []-deriveJSON lspOptions ''DocumentHighlightParams--data DocumentHighlightKind-  = -- | A textual occurrence.-    HkText-  | -- | Read-access of a symbol, like reading a variable.-    HkRead-  | -- | Write-access of a symbol, like writing to a variable.-    HkWrite-  deriving (Read, Show, Eq)--instance ToJSON DocumentHighlightKind where-  toJSON HkText  = Number 1-  toJSON HkRead  = Number 2-  toJSON HkWrite = Number 3--instance FromJSON DocumentHighlightKind where-  parseJSON (Number 1) = pure HkText-  parseJSON (Number 2) = pure HkRead-  parseJSON (Number 3) = pure HkWrite-  parseJSON _          = mempty "DocumentHighlightKind"---- ----------------------------------------- | A document highlight is a range inside a text document which deserves--- special attention. Usually a document highlight is visualized by changing the--- background color of its range.-data DocumentHighlight =-  DocumentHighlight-    { -- | The range this highlight applies to.-      _range :: Range-      -- | The highlight kind, default is 'HkText'.-    , _kind  :: Maybe DocumentHighlightKind-    } deriving (Read,Show,Eq)--deriveJSON lspOptions ''DocumentHighlight
− src/Language/LSP/Types/DocumentLink.hs
@@ -1,71 +0,0 @@-{-# LANGUAGE TemplateHaskell       #-}-{-# LANGUAGE DuplicateRecordFields #-}--module Language.LSP.Types.DocumentLink where--import Data.Aeson-import Data.Aeson.TH-import Language.LSP.Types.Location-import Language.LSP.Types.Progress-import Language.LSP.Types.TextDocument-import Language.LSP.Types.Uri-import Language.LSP.Types.Utils-import Data.Text (Text)--data DocumentLinkClientCapabilities =-  DocumentLinkClientCapabilities-  { -- | Whether document link supports dynamic registration.-    _dynamicRegistration :: Maybe Bool-    -- | Whether the client supports the `tooltip` property on `DocumentLink`.-    ---    -- Since LSP 3.15.0-  , _tooltipSupport :: Maybe Bool-  } deriving (Read, Show, Eq)-deriveJSON lspOptions ''DocumentLinkClientCapabilities---- ---------------------------------------makeExtendingDatatype "DocumentLinkOptions" [''WorkDoneProgressOptions]-  [("_resolveProvider", [t| Maybe Bool |])]-deriveJSON lspOptions ''DocumentLinkOptions--makeExtendingDatatype "DocumentLinkRegistrationOptions"-  [ ''TextDocumentRegistrationOptions-  , ''DocumentLinkOptions-  ] []-deriveJSON lspOptions ''DocumentLinkRegistrationOptions---- ---------------------------------------makeExtendingDatatype "DocumentLinkParams"-  [ ''WorkDoneProgressParams-  , ''PartialResultParams-  ]-  [("_textDocument", [t| TextDocumentIdentifier |])]-deriveJSON lspOptions ''DocumentLinkParams---- ----------------------------------------- | A document link is a range in a text document that links to an internal or--- external resource, like another text document or a web site.-data DocumentLink =-  DocumentLink-  { -- | The range this link applies to.-    _range :: Range-    -- | The uri this link points to. If missing a resolve request is sent-    -- later.-  , _target :: Maybe Uri-    -- | The tooltip text when you hover over this link.-    ---    -- If a tooltip is provided, is will be displayed in a string that includes-    -- instructions on how to trigger the link, such as @{0} (ctrl + click)@.-    -- The specific instructions vary depending on OS, user settings, and-    -- localization.-    ---    -- Since LSP 3.15.0-  , _tooltip :: Maybe Text-    -- | A data entry field that is preserved on a document link between a-    -- DocumentLinkRequest and a DocumentLinkResolveRequest.-  , _xdata :: Maybe Value-  } deriving (Read, Show, Eq)-deriveJSON lspOptions ''DocumentLink
− src/Language/LSP/Types/DocumentSymbol.hs
@@ -1,253 +0,0 @@-{-# LANGUAGE TemplateHaskell            #-}-{-# LANGUAGE DuplicateRecordFields      #-}-module Language.LSP.Types.DocumentSymbol where--import           Data.Aeson-import           Data.Aeson.TH-import           Data.Scientific-import           Data.Text                                      (Text)--import           Language.LSP.Types.TextDocument-import           Language.LSP.Types.Common-import           Language.LSP.Types.Location-import           Language.LSP.Types.Progress-import           Language.LSP.Types.Utils---- -----------------------------------------------------------------------makeExtendingDatatype "DocumentSymbolOptions"-  [''WorkDoneProgressOptions]-  [ ("_label", [t| Maybe Bool |])]-deriveJSON lspOptions ''DocumentSymbolOptions--makeExtendingDatatype "DocumentSymbolRegistrationOptions"-  [ ''TextDocumentRegistrationOptions-  , ''DocumentSymbolOptions-  ] []-deriveJSON lspOptions ''DocumentSymbolRegistrationOptions---- -----------------------------------------------------------------------makeExtendingDatatype "DocumentSymbolParams"-  [ ''WorkDoneProgressParams-  , ''PartialResultParams-  ]-  [ ("_textDocument", [t| TextDocumentIdentifier |])]-deriveJSON lspOptions ''DocumentSymbolParams---- ---------------------------------------data SymbolKind-    = SkFile-    | SkModule-    | SkNamespace-    | SkPackage-    | SkClass-    | SkMethod-    | SkProperty-    | SkField-    | SkConstructor-    | SkEnum-    | SkInterface-    | SkFunction-    | SkVariable-    | SkConstant-    | SkString-    | SkNumber-    | SkBoolean-    | SkArray-    | SkObject-    | SkKey-    | SkNull-    | SkEnumMember-    | SkStruct-    | SkEvent-    | SkOperator-    | SkTypeParameter-    | SkUnknown Scientific-    deriving (Read,Show,Eq)--instance ToJSON SymbolKind where-  toJSON SkFile          = Number 1-  toJSON SkModule        = Number 2-  toJSON SkNamespace     = Number 3-  toJSON SkPackage       = Number 4-  toJSON SkClass         = Number 5-  toJSON SkMethod        = Number 6-  toJSON SkProperty      = Number 7-  toJSON SkField         = Number 8-  toJSON SkConstructor   = Number 9-  toJSON SkEnum          = Number 10-  toJSON SkInterface     = Number 11-  toJSON SkFunction      = Number 12-  toJSON SkVariable      = Number 13-  toJSON SkConstant      = Number 14-  toJSON SkString        = Number 15-  toJSON SkNumber        = Number 16-  toJSON SkBoolean       = Number 17-  toJSON SkArray         = Number 18-  toJSON SkObject        = Number 19-  toJSON SkKey           = Number 20-  toJSON SkNull          = Number 21-  toJSON SkEnumMember    = Number 22-  toJSON SkStruct        = Number 23-  toJSON SkEvent         = Number 24-  toJSON SkOperator      = Number 25-  toJSON SkTypeParameter = Number 26-  toJSON (SkUnknown x)   = Number x--instance FromJSON SymbolKind where-  parseJSON (Number  1) = pure SkFile-  parseJSON (Number  2) = pure SkModule-  parseJSON (Number  3) = pure SkNamespace-  parseJSON (Number  4) = pure SkPackage-  parseJSON (Number  5) = pure SkClass-  parseJSON (Number  6) = pure SkMethod-  parseJSON (Number  7) = pure SkProperty-  parseJSON (Number  8) = pure SkField-  parseJSON (Number  9) = pure SkConstructor-  parseJSON (Number 10) = pure SkEnum-  parseJSON (Number 11) = pure SkInterface-  parseJSON (Number 12) = pure SkFunction-  parseJSON (Number 13) = pure SkVariable-  parseJSON (Number 14) = pure SkConstant-  parseJSON (Number 15) = pure SkString-  parseJSON (Number 16) = pure SkNumber-  parseJSON (Number 17) = pure SkBoolean-  parseJSON (Number 18) = pure SkArray-  parseJSON (Number 19) = pure SkObject-  parseJSON (Number 20) = pure SkKey-  parseJSON (Number 21) = pure SkNull-  parseJSON (Number 22) = pure SkEnumMember-  parseJSON (Number 23) = pure SkStruct-  parseJSON (Number 24) = pure SkEvent-  parseJSON (Number 25) = pure SkOperator-  parseJSON (Number 26) = pure SkTypeParameter-  parseJSON (Number x)  = pure (SkUnknown x)-  parseJSON _           = fail "SymbolKind"--{-|-Symbol tags are extra annotations that tweak the rendering of a symbol.--@since 3.16.0--}-data SymbolTag =-  StDeprecated -- ^ Render a symbol as obsolete, usually using a strike-out.-  | StUnknown Scientific-  deriving (Read, Show, Eq)--instance ToJSON SymbolTag where-  toJSON StDeprecated          = Number 1-  toJSON (StUnknown x)   = Number x--instance FromJSON SymbolTag where-  parseJSON (Number  1) = pure StDeprecated-  parseJSON (Number x)  = pure (StUnknown x)-  parseJSON _           = fail "SymbolTag"-  --- ---------------------------------------data DocumentSymbolKindClientCapabilities =-  DocumentSymbolKindClientCapabilities-    { -- | The symbol kind values the client supports. When this-      --  property exists the client also guarantees that it will-      --  handle values outside its set gracefully and falls back-      --  to a default value when unknown.-      ---      --  If this property is not present the client only supports-      --  the symbol kinds from `File` to `Array` as defined in-      --  the initial version of the protocol.-      _valueSet :: Maybe (List SymbolKind)-    }-  deriving (Show, Read, Eq)--deriveJSON lspOptions ''DocumentSymbolKindClientCapabilities--data DocumentSymbolTagClientCapabilities =-  DocumentSymbolTagClientCapabilities-    { -- | The tags supported by the client.-      _valueSet :: Maybe (List SymbolTag)-    }-  deriving (Show, Read, Eq)--deriveJSON lspOptions ''DocumentSymbolTagClientCapabilities--data DocumentSymbolClientCapabilities =-  DocumentSymbolClientCapabilities-    { -- | Whether document symbol supports dynamic registration.-      _dynamicRegistration :: Maybe Bool-      -- | Specific capabilities for the `SymbolKind`.-    , _symbolKind :: Maybe DocumentSymbolKindClientCapabilities-    , _hierarchicalDocumentSymbolSupport :: Maybe Bool-      -- | The client supports tags on `SymbolInformation`.-      -- Clients supporting tags have to handle unknown tags gracefully.-      ---      -- @since 3.16.0-    , _tagSupport :: Maybe DocumentSymbolTagClientCapabilities-      -- | The client supports an additional label presented in the UI when-      -- registering a document symbol provider.-      ---      -- @since 3.16.0-    , _labelSupport :: Maybe Bool-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''DocumentSymbolClientCapabilities---- ------------------------------------------------------------------------- | Represents programming constructs like variables, classes, interfaces etc.--- that appear in a document. Document symbols can be hierarchical and they--- have two ranges: one that encloses its definition and one that points to its--- most interesting range, e.g. the range of an identifier.-data DocumentSymbol =-  DocumentSymbol-    { _name           :: Text -- ^ The name of this symbol.-    -- | More detail for this symbol, e.g the signature of a function. If not-    -- provided the name is used.-    , _detail         :: Maybe Text-    , _kind           :: SymbolKind -- ^ The kind of this symbol.-    , _tags           :: Maybe (List SymbolTag) -- ^ Tags for this document symbol.-    , _deprecated     :: Maybe Bool -- ^ Indicates if this symbol is deprecated. Deprecated, use tags instead.-    -- | The range enclosing this symbol not including leading/trailing-    -- whitespace but everything else like comments. This information is-    -- typically used to determine if the the clients cursor is inside the symbol-    -- to reveal in the symbol in the UI.-    , _range          :: Range-    -- | The range that should be selected and revealed when this symbol is being-    -- picked, e.g the name of a function. Must be contained by the the '_range'.-    , _selectionRange :: Range-    -- | Children of this symbol, e.g. properties of a class.-    , _children       :: Maybe (List DocumentSymbol)-    } deriving (Read,Show,Eq)--deriveJSON lspOptions ''DocumentSymbol---- ------------------------------------------------------------------------- | Represents information about programming constructs like variables, classes,--- interfaces etc.-data SymbolInformation =-  SymbolInformation-    { _name          :: Text -- ^ The name of this symbol.-    , _kind          :: SymbolKind -- ^ The kind of this symbol.-    , _tags          :: Maybe (List SymbolTag) -- ^ Tags for this symbol.-    , _deprecated    :: Maybe Bool -- ^ Indicates if this symbol is deprecated. Deprecated, use tags instead.-    -- | The location of this symbol. The location's range is used by a tool-    -- to reveal the location in the editor. If the symbol is selected in the-    -- tool the range's start information is used to position the cursor. So-    -- the range usually spans more then the actual symbol's name and does-    -- normally include things like visibility modifiers.-    ---    -- The range doesn't have to denote a node range in the sense of a abstract-    -- syntax tree. It can therefore not be used to re-construct a hierarchy of-    -- the symbols.-    , _location      :: Location-    -- | The name of the symbol containing this symbol. This information is for-    -- user interface purposes (e.g. to render a qualifier in the user interface-    -- if necessary). It can't be used to re-infer a hierarchy for the document-    -- symbols.-    , _containerName :: Maybe Text-    } deriving (Read,Show,Eq)-{-# DEPRECATED _deprecated "Use tags instead" #-}--deriveJSON lspOptions ''SymbolInformation
− src/Language/LSP/Types/FoldingRange.hs
@@ -1,100 +0,0 @@-{-# LANGUAGE OverloadedStrings          #-}-{-# LANGUAGE DuplicateRecordFields      #-}-{-# LANGUAGE TemplateHaskell            #-}-module Language.LSP.Types.FoldingRange where--import qualified Data.Aeson                    as A-import           Data.Aeson.TH-import           Data.Text                    (Text)-import           Language.LSP.Types.Common-import           Language.LSP.Types.Progress-import           Language.LSP.Types.StaticRegistrationOptions-import           Language.LSP.Types.TextDocument-import           Language.LSP.Types.Utils----- ---------------------------------------data FoldingRangeClientCapabilities =-  FoldingRangeClientCapabilities-    { -- | Whether implementation supports dynamic registration for folding range-      -- providers. If this is set to `true` the client supports the new-      -- `(FoldingRangeProviderOptions & TextDocumentRegistrationOptions & StaticRegistrationOptions)`-      -- return value for the corresponding server capability as well.-      _dynamicRegistration :: Maybe Bool-      -- | The maximum number of folding ranges that the client prefers to receive-      -- per document. The value serves as a hint, servers are free to follow the limit.-    , _rangeLimit          :: Maybe UInt-      -- | If set, the client signals that it only supports folding complete lines. If set,-      -- client will ignore specified `startCharacter` and `endCharacter` properties in a-      -- FoldingRange.-    , _lineFoldingOnly     :: Maybe Bool-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''FoldingRangeClientCapabilities--makeExtendingDatatype "FoldingRangeOptions" [''WorkDoneProgressOptions] []-deriveJSON lspOptions ''FoldingRangeOptions--makeExtendingDatatype "FoldingRangeRegistrationOptions"-  [ ''TextDocumentRegistrationOptions-  , ''FoldingRangeOptions-  , ''StaticRegistrationOptions-  ] []-deriveJSON lspOptions ''FoldingRangeRegistrationOptions---makeExtendingDatatype "FoldingRangeParams"-  [ ''WorkDoneProgressParams-  , ''PartialResultParams-  ]-  [("_textDocument", [t| TextDocumentIdentifier |])]-deriveJSON lspOptions ''FoldingRangeParams---- | Enum of known range kinds-data FoldingRangeKind = FoldingRangeComment-                        -- ^ Folding range for a comment-                      | FoldingRangeImports-                        -- ^ Folding range for a imports or includes-                      | FoldingRangeRegion-                        -- ^ Folding range for a region (e.g. #region)-                      | FoldingRangeUnknown Text-                        -- ^ Folding range that haskell-lsp-types does-                        -- not yet support-  deriving (Read, Show, Eq)--instance A.ToJSON FoldingRangeKind where-  toJSON FoldingRangeComment     = A.String "comment"-  toJSON FoldingRangeImports     = A.String "imports"-  toJSON FoldingRangeRegion      = A.String "region"-  toJSON (FoldingRangeUnknown x) = A.String x--instance A.FromJSON FoldingRangeKind where-  parseJSON (A.String "comment") = pure FoldingRangeComment-  parseJSON (A.String "imports") = pure FoldingRangeImports-  parseJSON (A.String "region")  = pure FoldingRangeRegion-  parseJSON (A.String x)         = pure (FoldingRangeUnknown x)-  parseJSON _                    = fail "FoldingRangeKind"---- | Represents a folding range.-data FoldingRange =-  FoldingRange-  { -- | The zero-based line number from where the folded range starts.-    _startLine      :: UInt-    -- | The zero-based character offset from where the folded range-    -- starts. If not defined, defaults to the length of the start line.-  , _startCharacter :: Maybe UInt-    -- | The zero-based line number where the folded range ends.-  , _endLine        :: UInt-    -- | The zero-based character offset before the folded range ends.-    -- If not defined, defaults to the length of the end line.-  , _endCharacter   :: Maybe UInt-    -- | Describes the kind of the folding range such as 'comment' or-    -- 'region'. The kind is used to categorize folding ranges and used-    -- by commands like 'Fold all comments'. See 'FoldingRangeKind' for-    -- an enumeration of standardized kinds.-  , _kind           :: Maybe FoldingRangeKind-  }-  deriving (Read, Show, Eq)--deriveJSON lspOptions ''FoldingRange
− src/Language/LSP/Types/Formatting.hs
@@ -1,114 +0,0 @@-{-# LANGUAGE TemplateHaskell       #-}-{-# LANGUAGE DuplicateRecordFields #-}-module Language.LSP.Types.Formatting where--import Data.Aeson.TH-import Data.Text (Text)-import Language.LSP.Types.Common-import Language.LSP.Types.Location-import Language.LSP.Types.Progress-import Language.LSP.Types.TextDocument-import Language.LSP.Types.Utils--data DocumentFormattingClientCapabilities =-  DocumentFormattingClientCapabilities-    { -- | Whether formatting supports dynamic registration.-      _dynamicRegistration :: Maybe Bool-    } deriving (Show, Read, Eq)-deriveJSON lspOptions ''DocumentFormattingClientCapabilities--makeExtendingDatatype "DocumentFormattingOptions" [''WorkDoneProgressOptions] []-deriveJSON lspOptions ''DocumentFormattingOptions--makeExtendingDatatype "DocumentFormattingRegistrationOptions"-  [ ''TextDocumentRegistrationOptions,-    ''DocumentFormattingOptions-  ]-  []-deriveJSON lspOptions ''DocumentFormattingRegistrationOptions---- | Value-object describing what options formatting should use.-data FormattingOptions = FormattingOptions-  { -- | Size of a tab in spaces.-    _tabSize :: UInt,-    -- | Prefer spaces over tabs-    _insertSpaces :: Bool,-    -- | Trim trailing whitespace on a line.-    ---    -- Since LSP 3.15.0-    _trimTrailingWhitespace :: Maybe Bool,-    -- | Insert a newline character at the end of the file if one does not exist.-    ---    -- Since LSP 3.15.0-    _insertFinalNewline :: Maybe Bool,-    -- | Trim all newlines after the final newline at the end of the file.-    -- -    -- Since LSP 3.15.0-    _trimFinalNewlines :: Maybe Bool-    -- Note: May be more properties-  }-  deriving (Read, Show, Eq)--deriveJSON lspOptions ''FormattingOptions-makeExtendingDatatype "DocumentFormattingParams" [''WorkDoneProgressParams]-  [ ("_textDocument", [t| TextDocumentIdentifier |])-  , ("_options", [t| FormattingOptions |])-  ]-deriveJSON lspOptions ''DocumentFormattingParams---- ---------------------------------------data DocumentRangeFormattingClientCapabilities =-  DocumentRangeFormattingClientCapabilities-    { -- | Whether formatting supports dynamic registration.-      _dynamicRegistration :: Maybe Bool-    } deriving (Show, Read, Eq)-deriveJSON lspOptions ''DocumentRangeFormattingClientCapabilities--makeExtendingDatatype "DocumentRangeFormattingOptions" [''WorkDoneProgressOptions] []-deriveJSON lspOptions ''DocumentRangeFormattingOptions--makeExtendingDatatype "DocumentRangeFormattingRegistrationOptions"-  [ ''TextDocumentRegistrationOptions-  , ''DocumentRangeFormattingOptions-  ]-  []-deriveJSON lspOptions ''DocumentRangeFormattingRegistrationOptions--makeExtendingDatatype "DocumentRangeFormattingParams" [''WorkDoneProgressParams]-  [ ("_textDocument", [t| TextDocumentIdentifier |])-  , ("_range", [t| Range |])-  , ("_options", [t| FormattingOptions |])-  ]-deriveJSON lspOptions ''DocumentRangeFormattingParams---- ---------------------------------------data DocumentOnTypeFormattingClientCapabilities =-  DocumentOnTypeFormattingClientCapabilities-    { -- | Whether formatting supports dynamic registration.-      _dynamicRegistration :: Maybe Bool-    } deriving (Show, Read, Eq)-deriveJSON lspOptions ''DocumentOnTypeFormattingClientCapabilities--data DocumentOnTypeFormattingOptions =-  DocumentOnTypeFormattingOptions-    { -- | A character on which formatting should be triggered, like @}@.-      _firstTriggerCharacter :: Text-    , -- | More trigger characters.-      _moreTriggerCharacter  :: Maybe [Text]-    } deriving (Read,Show,Eq)-deriveJSON lspOptions ''DocumentOnTypeFormattingOptions--makeExtendingDatatype "DocumentOnTypeFormattingRegistrationOptions"-  [ ''TextDocumentRegistrationOptions-  , ''DocumentOnTypeFormattingOptions-  ]-  []-deriveJSON lspOptions ''DocumentOnTypeFormattingRegistrationOptions--makeExtendingDatatype "DocumentOnTypeFormattingParams" [''TextDocumentPositionParams]-  [ ("_ch", [t| Text |])-  , ("_options", [t| FormattingOptions |])-  ]-deriveJSON lspOptions ''DocumentOnTypeFormattingParams
− src/Language/LSP/Types/Hover.hs
@@ -1,84 +0,0 @@-{-# LANGUAGE TemplateHaskell  #-}-{-# LANGUAGE DuplicateRecordFields      #-}-module Language.LSP.Types.Hover where--import           Data.Aeson.TH-import           Data.Text                      ( Text )--import           Language.LSP.Types.Common-import           Language.LSP.Types.Location-import           Language.LSP.Types.MarkupContent-import           Language.LSP.Types.Progress-import           Language.LSP.Types.TextDocument-import           Language.LSP.Types.Utils----- ---------------------------------------data HoverClientCapabilities =-  HoverClientCapabilities-    { _dynamicRegistration :: Maybe Bool-    , _contentFormat :: Maybe (List MarkupKind)-    } deriving (Show, Read, Eq)-deriveJSON lspOptions ''HoverClientCapabilities--makeExtendingDatatype "HoverOptions" [''WorkDoneProgressOptions] []-deriveJSON lspOptions ''HoverOptions--makeExtendingDatatype "HoverRegistrationOptions" [''TextDocumentRegistrationOptions, ''HoverOptions] []-deriveJSON lspOptions ''HoverRegistrationOptions--makeExtendingDatatype "HoverParams" [''TextDocumentPositionParams, ''WorkDoneProgressParams] []-deriveJSON lspOptions ''HoverParams---- ---------------------------------------data LanguageString =-  LanguageString-    { _language :: Text-    , _value    :: Text-    } deriving (Read,Show,Eq)--deriveJSON lspOptions ''LanguageString--{-# DEPRECATED MarkedString, PlainString, CodeString "Use MarkupContent instead, since 3.3.0 (11/24/2017)" #-}-data MarkedString =-    PlainString Text-  | CodeString LanguageString-    deriving (Eq,Read,Show)--deriveJSON lspOptionsUntagged ''MarkedString---- ---------------------------------------data HoverContents =-    HoverContentsMS (List MarkedString)-  | HoverContents   MarkupContent-  deriving (Read,Show,Eq)--deriveJSON lspOptionsUntagged ''HoverContents---- ---------------------------------------instance Semigroup HoverContents where-  HoverContents h1   <> HoverContents         h2   = HoverContents (h1 `mappend` h2)-  HoverContents h1   <> HoverContentsMS (List h2s) = HoverContents (mconcat (h1: (map toMarkupContent h2s)))-  HoverContentsMS (List h1s) <> HoverContents         h2    = HoverContents (mconcat ((map toMarkupContent h1s) ++ [h2]))-  HoverContentsMS (List h1s) <> HoverContentsMS (List h2s) = HoverContentsMS (List (h1s `mappend` h2s))--instance Monoid HoverContents where-  mempty = HoverContentsMS (List [])--toMarkupContent :: MarkedString -> MarkupContent-toMarkupContent (PlainString s) = unmarkedUpContent s-toMarkupContent (CodeString (LanguageString lang s)) = markedUpContent lang s---- ---------------------------------------data Hover =-  Hover-    { _contents :: HoverContents-    , _range    :: Maybe Range-    } deriving (Read,Show,Eq)--deriveJSON lspOptions ''Hover
− src/Language/LSP/Types/Implementation.hs
@@ -1,42 +0,0 @@-{-# LANGUAGE DuplicateRecordFields #-}-{-# LANGUAGE TemplateHaskell #-}--module Language.LSP.Types.Implementation where--import Data.Aeson.TH-import Language.LSP.Types.Progress-import Language.LSP.Types.StaticRegistrationOptions-import Language.LSP.Types.TextDocument-import Language.LSP.Types.Utils--data ImplementationClientCapabilities = ImplementationClientCapabilities-  { -- | Whether implementation supports dynamic registration. If this is set-    -- to 'True'-    -- the client supports the new 'ImplementationRegistrationOptions' return-    -- value for the corresponding server capability as well.-    _dynamicRegistration :: Maybe Bool,-    -- | The client supports additional metadata in the form of definition links.-    ---    -- Since LSP 3.14.0-    _linkSupport :: Maybe Bool-  }-  deriving (Read, Show, Eq)--deriveJSON lspOptions ''ImplementationClientCapabilities--makeExtendingDatatype "ImplementationOptions" [''WorkDoneProgressOptions] []-deriveJSON lspOptions ''ImplementationOptions--makeExtendingDatatype "ImplementationRegistrationOptions"-  [ ''TextDocumentRegistrationOptions-  , ''ImplementationOptions-  , ''StaticRegistrationOptions-  ] []-deriveJSON lspOptions ''ImplementationRegistrationOptions--makeExtendingDatatype "ImplementationParams"-  [ ''TextDocumentPositionParams-  , ''WorkDoneProgressParams-  , ''PartialResultParams-  ] []-deriveJSON lspOptions ''ImplementationParams
− src/Language/LSP/Types/Initialize.hs
@@ -1,96 +0,0 @@-{-# LANGUAGE TemplateHaskell       #-}-{-# LANGUAGE DuplicateRecordFields #-}--module Language.LSP.Types.Initialize where--import Data.Aeson-import Data.Aeson.TH-import Data.Text (Text)-import qualified Data.Text as T-import Language.LSP.Types.ClientCapabilities-import Language.LSP.Types.Common-import Language.LSP.Types.Progress-import Language.LSP.Types.ServerCapabilities-import Language.LSP.Types.Uri-import Language.LSP.Types.Utils-import Language.LSP.Types.WorkspaceFolders--data Trace = TraceOff | TraceMessages | TraceVerbose-           deriving (Show, Read, Eq)--instance ToJSON Trace where-  toJSON TraceOff      = String (T.pack "off")-  toJSON TraceMessages = String (T.pack "messages")-  toJSON TraceVerbose  = String (T.pack "verbose")--instance FromJSON Trace where-  parseJSON (String s) = case T.unpack s of-    "off"      -> return TraceOff-    "messages" -> return TraceMessages-    "verbose"  -> return TraceVerbose-    _          -> fail "Trace"-  parseJSON _          = fail "Trace"--data ClientInfo =-  ClientInfo-  { -- | The name of the client as defined by the client.-    _name    :: Text-    -- | The client's version as defined by the client.-  , _version :: Maybe Text-  } deriving (Show, Read, Eq)-deriveJSON lspOptions ''ClientInfo--makeExtendingDatatype "InitializeParams" [''WorkDoneProgressParams]-  [ ("_processId",             [t| Maybe Int32|])-  , ("_clientInfo",            [t| Maybe ClientInfo |])-  , ("_rootPath",              [t| Maybe Text |])-  , ("_rootUri",               [t| Maybe Uri  |])-  , ("_initializationOptions", [t| Maybe Value |])-  , ("_capabilities",          [t| ClientCapabilities |])-  , ("_trace",                 [t| Maybe Trace |])-  , ("_workspaceFolders",      [t| Maybe (List WorkspaceFolder) |])-  ]--deriveJSON lspOptions ''InitializeParams--data InitializeError =-  InitializeError-    { _retry :: Bool-    } deriving (Read, Show, Eq)--deriveJSON lspOptions ''InitializeError--data ServerInfo =-  ServerInfo-  { -- | The name of the server as defined by the server.-    _name    :: Text-    -- | The server's version as defined by the server.-  , _version :: Maybe Text-  } deriving (Show, Read, Eq)-deriveJSON lspOptions ''ServerInfo--data InitializeResult =-  InitializeResult-  { -- | The capabilities the language server provides.-    _capabilities :: ServerCapabilities-    -- | Information about the server.-    -- Since LSP 3.15.0-  , _serverInfo   :: Maybe ServerInfo-  } deriving (Show, Read, Eq)--deriveJSON lspOptions ''InitializeResult---- -----------------------------------------------------------------------data InitializedParams =-  InitializedParams-  {-  } deriving (Show, Read, Eq)--instance FromJSON InitializedParams where-  parseJSON (Object _) = pure InitializedParams-  parseJSON _          = fail "InitializedParams"--instance ToJSON InitializedParams where-  toJSON InitializedParams = Object mempty-
− src/Language/LSP/Types/Lens.hs
@@ -1,399 +0,0 @@-{-# LANGUAGE TemplateHaskell        #-}-{-# LANGUAGE FlexibleInstances      #-}-{-# LANGUAGE MultiParamTypeClasses  #-}-{-# LANGUAGE FunctionalDependencies #-}-{-# LANGUAGE PolyKinds              #-}-{-# LANGUAGE GADTs                  #-}-{-# LANGUAGE UndecidableInstances   #-}-{-# LANGUAGE RankNTypes             #-}-{-# LANGUAGE FlexibleContexts       #-}-{-# LANGUAGE DataKinds              #-}-{-# LANGUAGE TypeInType             #-}-{-# LANGUAGE ExplicitNamespaces #-}--module Language.LSP.Types.Lens where--import           Language.LSP.Types.CallHierarchy-import           Language.LSP.Types.Cancellation-import           Language.LSP.Types.ClientCapabilities-import           Language.LSP.Types.CodeAction-import           Language.LSP.Types.CodeLens-import           Language.LSP.Types.DocumentColor-import           Language.LSP.Types.Command-import           Language.LSP.Types.Common (type (|?))-import           Language.LSP.Types.Completion-import           Language.LSP.Types.Configuration-import           Language.LSP.Types.Declaration-import           Language.LSP.Types.Definition-import           Language.LSP.Types.Diagnostic-import           Language.LSP.Types.DocumentFilter-import           Language.LSP.Types.DocumentHighlight-import           Language.LSP.Types.DocumentLink-import           Language.LSP.Types.FoldingRange-import           Language.LSP.Types.Formatting-import           Language.LSP.Types.Hover-import           Language.LSP.Types.Implementation-import           Language.LSP.Types.Initialize-import           Language.LSP.Types.Location-import           Language.LSP.Types.MarkupContent-import           Language.LSP.Types.Progress-import           Language.LSP.Types.Registration-import           Language.LSP.Types.References-import           Language.LSP.Types.Rename-import           Language.LSP.Types.SignatureHelp-import           Language.LSP.Types.SelectionRange-import           Language.LSP.Types.ServerCapabilities-import           Language.LSP.Types.StaticRegistrationOptions-import           Language.LSP.Types.DocumentSymbol-import           Language.LSP.Types.TextDocument-import           Language.LSP.Types.TypeDefinition-import           Language.LSP.Types.Window-import           Language.LSP.Types.WatchedFiles-import           Language.LSP.Types.WorkspaceEdit-import           Language.LSP.Types.WorkspaceFolders-import           Language.LSP.Types.WorkspaceSymbol-import           Language.LSP.Types.Message-import           Language.LSP.Types.SemanticTokens-import           Control.Lens.TH---- TODO: This is out of date and very unmaintainable, use TH to call all these!!---- client capabilities-makeFieldsNoPrefix ''MessageActionItemClientCapabilities-makeFieldsNoPrefix ''ShowMessageRequestClientCapabilities-makeFieldsNoPrefix ''ShowDocumentClientCapabilities-makeFieldsNoPrefix ''StaleRequestClientCapabilities-makeFieldsNoPrefix ''RegularExpressionsClientCapabilities-makeFieldsNoPrefix ''GeneralClientCapabilities-makeFieldsNoPrefix ''WorkspaceClientCapabilities-makeFieldsNoPrefix ''WindowClientCapabilities-makeFieldsNoPrefix ''ClientCapabilities---- -----------------------------------------------------------------------makeFieldsNoPrefix ''SaveOptions-makeFieldsNoPrefix ''WorkspaceServerCapabilities-makeFieldsNoPrefix ''WorkspaceFoldersServerCapabilities-makeFieldsNoPrefix ''ServerCapabilities-makeFieldsNoPrefix ''Registration-makeFieldsNoPrefix ''RegistrationParams-makeFieldsNoPrefix ''Unregistration-makeFieldsNoPrefix ''UnregistrationParams-makeFieldsNoPrefix ''ParameterInformation-makeFieldsNoPrefix ''SignatureInformation-makeFieldsNoPrefix ''ApplyWorkspaceEditParams-makeFieldsNoPrefix ''ApplyWorkspaceEditResponseBody---- ------------------------------------------------------------------------- Initialize-makeFieldsNoPrefix ''InitializeParams-makeFieldsNoPrefix ''InitializeError-makeFieldsNoPrefix ''InitializeResult-makeFieldsNoPrefix ''ClientInfo-makeFieldsNoPrefix ''ServerInfo-makeFieldsNoPrefix ''InitializedParams---- Configuration-makeFieldsNoPrefix ''DidChangeConfigurationParams-makeFieldsNoPrefix ''ConfigurationItem-makeFieldsNoPrefix ''ConfigurationParams-makeFieldsNoPrefix ''DidChangeConfigurationClientCapabilities---- Watched files-makeFieldsNoPrefix ''DidChangeWatchedFilesClientCapabilities-makeFieldsNoPrefix ''DidChangeWatchedFilesRegistrationOptions-makeFieldsNoPrefix ''FileSystemWatcher-makeFieldsNoPrefix ''WatchKind-makeFieldsNoPrefix ''FileEvent-makeFieldsNoPrefix ''DidChangeWatchedFilesParams---- Workspace symbols-makeFieldsNoPrefix ''WorkspaceSymbolKindClientCapabilities-makeFieldsNoPrefix ''WorkspaceSymbolClientCapabilities-makeFieldsNoPrefix ''WorkspaceSymbolOptions-makeFieldsNoPrefix ''WorkspaceSymbolRegistrationOptions-makeFieldsNoPrefix ''WorkspaceSymbolParams---- Location-makeFieldsNoPrefix ''Position-makeFieldsNoPrefix ''Range-makeFieldsNoPrefix ''Location-makeFieldsNoPrefix ''LocationLink---- Markup-makeFieldsNoPrefix ''MarkupContent-makeFieldsNoPrefix ''MarkdownClientCapabilities---- Completion-makeFieldsNoPrefix ''CompletionDoc-makeFieldsNoPrefix ''CompletionEdit-makeFieldsNoPrefix ''CompletionItem-makeFieldsNoPrefix ''CompletionContext-makeFieldsNoPrefix ''CompletionList-makeFieldsNoPrefix ''CompletionParams-makeFieldsNoPrefix ''CompletionOptions-makeFieldsNoPrefix ''CompletionRegistrationOptions-makeFieldsNoPrefix ''CompletionItemTagsClientCapabilities-makeFieldsNoPrefix ''CompletionItemResolveClientCapabilities-makeFieldsNoPrefix ''CompletionItemInsertTextModeClientCapabilities-makeFieldsNoPrefix ''CompletionItemClientCapabilities-makeFieldsNoPrefix ''CompletionItemKindClientCapabilities-makeFieldsNoPrefix ''CompletionClientCapabilities-makeFieldsNoPrefix ''InsertReplaceEdit---- Declaration-makeFieldsNoPrefix ''DeclarationClientCapabilities-makeFieldsNoPrefix ''DeclarationOptions-makeFieldsNoPrefix ''DeclarationRegistrationOptions-makeFieldsNoPrefix ''DeclarationParams---- CodeActions-makeFieldsNoPrefix ''CodeActionKindClientCapabilities-makeFieldsNoPrefix ''CodeActionLiteralSupport-makeFieldsNoPrefix ''CodeActionClientCapabilities-makeFieldsNoPrefix ''CodeActionResolveClientCapabilities-makeFieldsNoPrefix ''CodeActionOptions-makeFieldsNoPrefix ''CodeActionRegistrationOptions-makeFieldsNoPrefix ''CodeActionContext-makeFieldsNoPrefix ''CodeActionParams-makeFieldsNoPrefix ''CodeAction---- CodeLens-makeFieldsNoPrefix ''CodeLensClientCapabilities-makeFieldsNoPrefix ''CodeLensOptions-makeFieldsNoPrefix ''CodeLensRegistrationOptions-makeFieldsNoPrefix ''CodeLensParams-makeFieldsNoPrefix ''CodeLens---- DocumentLink-makeFieldsNoPrefix ''DocumentLinkClientCapabilities-makeFieldsNoPrefix ''DocumentLinkOptions-makeFieldsNoPrefix ''DocumentLinkRegistrationOptions-makeFieldsNoPrefix ''DocumentLinkParams-makeFieldsNoPrefix ''DocumentLink---- DocumentColor-makeFieldsNoPrefix ''DocumentColorClientCapabilities-makeFieldsNoPrefix ''DocumentColorOptions-makeFieldsNoPrefix ''DocumentColorRegistrationOptions-makeFieldsNoPrefix ''DocumentColorParams-makeFieldsNoPrefix ''Color-makeFieldsNoPrefix ''ColorInformation---- ColorPresentation-makeFieldsNoPrefix ''ColorPresentationParams-makeFieldsNoPrefix ''ColorPresentation---- Formatting-makeFieldsNoPrefix ''DocumentFormattingClientCapabilities-makeFieldsNoPrefix ''DocumentFormattingOptions-makeFieldsNoPrefix ''DocumentFormattingRegistrationOptions-makeFieldsNoPrefix ''FormattingOptions-makeFieldsNoPrefix ''DocumentFormattingParams---- RangeFormatting-makeFieldsNoPrefix ''DocumentRangeFormattingClientCapabilities-makeFieldsNoPrefix ''DocumentRangeFormattingOptions-makeFieldsNoPrefix ''DocumentRangeFormattingRegistrationOptions-makeFieldsNoPrefix ''DocumentRangeFormattingParams---- OnTypeFormatting-makeFieldsNoPrefix ''DocumentOnTypeFormattingClientCapabilities-makeFieldsNoPrefix ''DocumentOnTypeFormattingOptions-makeFieldsNoPrefix ''DocumentOnTypeFormattingRegistrationOptions-makeFieldsNoPrefix ''DocumentOnTypeFormattingParams---- Rename-makeFieldsNoPrefix ''RenameClientCapabilities-makeFieldsNoPrefix ''RenameOptions-makeFieldsNoPrefix ''RenameRegistrationOptions-makeFieldsNoPrefix ''RenameParams-makeFieldsNoPrefix ''PrepareSupportDefaultBehavior---- PrepareRename-makeFieldsNoPrefix ''PrepareRenameParams-makeFieldsNoPrefix ''RangeWithPlaceholder---- References-makeFieldsNoPrefix ''ReferencesClientCapabilities-makeFieldsNoPrefix ''ReferenceOptions-makeFieldsNoPrefix ''ReferenceRegistrationOptions-makeFieldsNoPrefix ''ReferenceContext-makeFieldsNoPrefix ''ReferenceParams---- FoldingRange-makeFieldsNoPrefix ''FoldingRangeClientCapabilities-makeFieldsNoPrefix ''FoldingRangeOptions-makeFieldsNoPrefix ''FoldingRangeRegistrationOptions-makeFieldsNoPrefix ''FoldingRangeParams-makeFieldsNoPrefix ''FoldingRange---- SelectionRange-makeFieldsNoPrefix ''SelectionRangeClientCapabilities-makeFieldsNoPrefix ''SelectionRangeOptions-makeFieldsNoPrefix ''SelectionRangeRegistrationOptions-makeFieldsNoPrefix ''SelectionRangeParams-makeFieldsNoPrefix ''SelectionRange---- DocumentHighlight-makeFieldsNoPrefix ''DocumentHighlightClientCapabilities-makeFieldsNoPrefix ''DocumentHighlightOptions-makeFieldsNoPrefix ''DocumentHighlightRegistrationOptions-makeFieldsNoPrefix ''DocumentHighlightParams-makeFieldsNoPrefix ''DocumentHighlight---- DocumentSymbol-makeFieldsNoPrefix ''DocumentSymbolKindClientCapabilities-makeFieldsNoPrefix ''DocumentSymbolClientCapabilities-makeFieldsNoPrefix ''DocumentSymbolOptions-makeFieldsNoPrefix ''DocumentSymbolRegistrationOptions-makeFieldsNoPrefix ''DocumentSymbolParams-makeFieldsNoPrefix ''DocumentSymbol-makeFieldsNoPrefix ''SymbolInformation---- DocumentFilter-makeFieldsNoPrefix ''DocumentFilter---- WorkspaceEdit-makeFieldsNoPrefix ''TextEdit-makeFieldsNoPrefix ''ChangeAnnotation-makeFieldsNoPrefix ''AnnotatedTextEdit-makeFieldsNoPrefix ''VersionedTextDocumentIdentifier-makeFieldsNoPrefix ''TextDocumentEdit-makeFieldsNoPrefix ''CreateFileOptions-makeFieldsNoPrefix ''CreateFile-makeFieldsNoPrefix ''RenameFileOptions-makeFieldsNoPrefix ''RenameFile-makeFieldsNoPrefix ''DeleteFileOptions-makeFieldsNoPrefix ''DeleteFile-makeFieldsNoPrefix ''WorkspaceEdit-makeFieldsNoPrefix ''WorkspaceEditClientCapabilities-makeFieldsNoPrefix ''WorkspaceEditChangeAnnotationClientCapabilities---- Workspace Folders-makeFieldsNoPrefix ''WorkspaceFolder-makeFieldsNoPrefix ''WorkspaceFoldersChangeEvent-makeFieldsNoPrefix ''DidChangeWorkspaceFoldersParams---- Message-makeFieldsNoPrefix ''RequestMessage-makeFieldsNoPrefix ''ResponseError-makeFieldsNoPrefix ''ResponseMessage-makeFieldsNoPrefix ''NotificationMessage-makeFieldsNoPrefix ''CancelParams---- TextDocument-makeFieldsNoPrefix ''TextDocumentItem-makeFieldsNoPrefix ''TextDocumentIdentifier-makeFieldsNoPrefix ''TextDocumentPositionParams-makeFieldsNoPrefix ''TextDocumentSyncClientCapabilities-makeFieldsNoPrefix ''TextDocumentClientCapabilities-makeFieldsNoPrefix ''TextDocumentRegistrationOptions-makeFieldsNoPrefix ''TextDocumentSyncOptions-makeFieldsNoPrefix ''DidOpenTextDocumentParams-makeFieldsNoPrefix ''TextDocumentContentChangeEvent-makeFieldsNoPrefix ''DidChangeTextDocumentParams-makeFieldsNoPrefix ''TextDocumentChangeRegistrationOptions-makeFieldsNoPrefix ''WillSaveTextDocumentParams-makeFieldsNoPrefix ''DidSaveTextDocumentParams-makeFieldsNoPrefix ''TextDocumentSaveRegistrationOptions-makeFieldsNoPrefix ''DidCloseTextDocumentParams---- Command-makeFieldsNoPrefix ''Command-makeFieldsNoPrefix ''ExecuteCommandParams-makeFieldsNoPrefix ''ExecuteCommandRegistrationOptions-makeFieldsNoPrefix ''ExecuteCommandClientCapabilities-makeFieldsNoPrefix ''ExecuteCommandOptions---- Diagnostic-makeFieldsNoPrefix ''DiagnosticRelatedInformation-makeFieldsNoPrefix ''Diagnostic-makeFieldsNoPrefix ''PublishDiagnosticsTagsClientCapabilities-makeFieldsNoPrefix ''PublishDiagnosticsClientCapabilities-makeFieldsNoPrefix ''PublishDiagnosticsParams---- Hover-makeFieldsNoPrefix ''HoverClientCapabilities-makeFieldsNoPrefix ''Hover-makeFieldsNoPrefix ''HoverParams-makeFieldsNoPrefix ''HoverOptions-makeFieldsNoPrefix ''HoverRegistrationOptions-makeFieldsNoPrefix ''LanguageString---- Implementation-makeFieldsNoPrefix ''ImplementationClientCapabilities-makeFieldsNoPrefix ''ImplementationOptions-makeFieldsNoPrefix ''ImplementationRegistrationOptions-makeFieldsNoPrefix ''ImplementationParams---- Definition-makeFieldsNoPrefix ''DefinitionOptions-makeFieldsNoPrefix ''DefinitionRegistrationOptions-makeFieldsNoPrefix ''DefinitionParams-makeFieldsNoPrefix ''DefinitionClientCapabilities---- Type Definition-makeFieldsNoPrefix ''TypeDefinitionOptions-makeFieldsNoPrefix ''TypeDefinitionRegistrationOptions-makeFieldsNoPrefix ''TypeDefinitionParams-makeFieldsNoPrefix ''TypeDefinitionClientCapabilities---- Window-makeFieldsNoPrefix ''ShowMessageParams-makeFieldsNoPrefix ''MessageActionItem-makeFieldsNoPrefix ''ShowMessageRequestParams-makeFieldsNoPrefix ''ShowDocumentParams-makeFieldsNoPrefix ''ShowDocumentResult-makeFieldsNoPrefix ''LogMessageParams-makeFieldsNoPrefix ''ProgressParams-makeFieldsNoPrefix ''WorkDoneProgressBeginParams-makeFieldsNoPrefix ''WorkDoneProgressReportParams-makeFieldsNoPrefix ''WorkDoneProgressEndParams-makeFieldsNoPrefix ''WorkDoneProgressCancelParams-makeFieldsNoPrefix ''WorkDoneProgressCreateParams-makeFieldsNoPrefix ''WorkDoneProgressOptions-makeFieldsNoPrefix ''WorkDoneProgressParams-makeFieldsNoPrefix ''PartialResultParams---- Signature Help-makeFieldsNoPrefix ''SignatureHelpSignatureInformation-makeFieldsNoPrefix ''SignatureHelpParameterInformation-makeFieldsNoPrefix ''SignatureHelpParams-makeFieldsNoPrefix ''SignatureHelpClientCapabilities-makeFieldsNoPrefix ''SignatureHelpOptions-makeFieldsNoPrefix ''SignatureHelpRegistrationOptions-makeFieldsNoPrefix ''SignatureHelp---- Static registration-makeFieldsNoPrefix ''StaticRegistrationOptions---- Call hierarchy-makeFieldsNoPrefix ''CallHierarchyClientCapabilities-makeFieldsNoPrefix ''CallHierarchyOptions-makeFieldsNoPrefix ''CallHierarchyRegistrationOptions-makeFieldsNoPrefix ''CallHierarchyPrepareParams-makeFieldsNoPrefix ''CallHierarchyIncomingCallsParams-makeFieldsNoPrefix ''CallHierarchyIncomingCall-makeFieldsNoPrefix ''CallHierarchyOutgoingCallsParams-makeFieldsNoPrefix ''CallHierarchyOutgoingCall-makeFieldsNoPrefix ''CallHierarchyItem---- Semantic tokens-makeFieldsNoPrefix ''SemanticTokensLegend-makeFieldsNoPrefix ''SemanticTokensDeltaClientCapabilities-makeFieldsNoPrefix ''SemanticTokensRequestsClientCapabilities-makeFieldsNoPrefix ''SemanticTokensClientCapabilities-makeFieldsNoPrefix ''SemanticTokensParams-makeFieldsNoPrefix ''SemanticTokensDeltaParams-makeFieldsNoPrefix ''SemanticTokensRangeParams-makeFieldsNoPrefix ''SemanticTokens-makeFieldsNoPrefix ''SemanticTokensPartialResult-makeFieldsNoPrefix ''SemanticTokensEdit-makeFieldsNoPrefix ''SemanticTokensDelta-makeFieldsNoPrefix ''SemanticTokensDeltaPartialResult-makeFieldsNoPrefix ''SemanticTokensWorkspaceClientCapabilities---- Unions-makePrisms ''(|?)
− src/Language/LSP/Types/Location.hs
@@ -1,94 +0,0 @@-{-# LANGUAGE DeriveGeneric   #-}-{-# LANGUAGE TemplateHaskell #-}-module Language.LSP.Types.Location where--import           Control.DeepSeq-import           Data.Aeson.TH-import           Data.Hashable-import           GHC.Generics              hiding (UInt)-import           Language.LSP.Types.Common-import           Language.LSP.Types.Uri-import           Language.LSP.Types.Utils---- ------------------------------------------------------------------------- | A position in a document. Note that the character offsets in a line--- are given in UTF-16 code units, *not* Unicode code points.-data Position =-  Position-    { -- | Line position in a document (zero-based).-      _line      :: UInt-      -- | Character offset on a line in a document (zero-based). Assuming that-      -- the line is represented as a string, the @character@ value represents the-      -- gap between the @character@ and @character + 1@.-    , _character :: UInt-    } deriving (Show, Read, Eq, Ord, Generic)--instance NFData Position-deriveJSON lspOptions ''Position--instance Hashable Position---- -----------------------------------------------------------------------data Range =-  Range-    { _start :: Position -- ^ The range's start position. (inclusive)-    , _end   :: Position -- ^ The range's end position. (exclusive, see: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#range )-    } deriving (Show, Read, Eq, Ord, Generic)--instance NFData Range-deriveJSON lspOptions ''Range--instance Hashable Range---- -----------------------------------------------------------------------data Location =-  Location-    { _uri   :: Uri-    , _range :: Range-    } deriving (Show, Read, Eq, Ord, Generic)--instance NFData Location-deriveJSON lspOptions ''Location--instance Hashable Location---- ------------------------------------------------------------------------- | Represents a link between a source and a target location.-data LocationLink =-  LocationLink-  { -- | Span of the origin of this link.-    -- Used as the underlined span for mouse interaction. Defaults to the word-    -- range at the mouse position.-    _originSelectionRange :: Maybe Range-    -- | The target resource identifier of this link.-  , _targetUri            :: Uri-    -- | The full target range of this link. If the target for example is a-    -- symbol then target range is the range enclosing this symbol not including-    -- leading/trailing whitespace but everything else like comments. This-    -- information is typically used to highlight the range in the editor.-  , _targetRange          :: Range-    -- | The range that should be selected and revealed when this link is being-    -- followed, e.g the name of a function. Must be contained by the the-    -- 'targetRange'. See also @DocumentSymbol._range@-  , _targetSelectionRange :: Range-  } deriving (Read, Show, Eq)-deriveJSON lspOptions ''LocationLink---- ------------------------------------------------------------------------- | A helper function for creating ranges.--- prop> mkRange l c l' c' = Range (Position l c) (Position l' c')-mkRange :: UInt -> UInt -> UInt -> UInt -> Range-mkRange l c l' c' = Range (Position l c) (Position l' c')---- | 'isSubrangeOf' returns true if for every 'Position' in the first 'Range', it's also in the second 'Range'.-isSubrangeOf :: Range -> Range -> Bool-isSubrangeOf smallRange range = _start smallRange >= _start range && _end smallRange <= _end range---- | 'positionInRange' returns true if the given 'Position' is in the 'Range'.-positionInRange :: Position -> Range -> Bool-positionInRange p (Range sp ep) = sp <= p && p < ep -- Range's end position is exclusive.
− src/Language/LSP/Types/LspId.hs
@@ -1,55 +0,0 @@-{-# LANGUAGE DataKinds                  #-}-{-# LANGUAGE StandaloneDeriving         #-}-{-# LANGUAGE GADTs                      #-}-{-# LANGUAGE TypeFamilies               #-}-{-# LANGUAGE TypeInType                 #-}-{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}-module Language.LSP.Types.LspId where--import qualified Data.Aeson                                 as A-import           Data.Hashable-import           Data.Int (Int32)-import           Data.IxMap-import           Data.Text                                  (Text)--import           Language.LSP.Types.Method---- | Id used for a request, Can be either a String or an Int-data LspId (m :: Method f Request) = IdInt !Int32 | IdString !Text-  deriving (Show,Read,Eq,Ord)--instance A.ToJSON (LspId m) where-  toJSON (IdInt i)    = A.toJSON i-  toJSON (IdString s) = A.toJSON s--instance A.FromJSON (LspId m) where-  parseJSON v@(A.Number _) = IdInt <$> A.parseJSON v-  parseJSON  (A.String  s) = return (IdString s)-  parseJSON _              = fail "LspId"--instance IxOrd LspId where-  type Base LspId = SomeLspId-  toBase = SomeLspId--instance Hashable (LspId m) where-  hashWithSalt n (IdInt i) = hashWithSalt n i-  hashWithSalt n (IdString t) = hashWithSalt n t--data SomeLspId where-  SomeLspId :: !(LspId m) -> SomeLspId--deriving instance Show SomeLspId-instance Eq SomeLspId where-  SomeLspId (IdInt a) == SomeLspId (IdInt b) = a == b-  SomeLspId (IdString a) == SomeLspId (IdString b) = a == b-  _ == _ = False-instance Ord SomeLspId where-  compare (SomeLspId x) (SomeLspId y) = go x y-    where-      go (IdInt    a) (IdInt    b) = a `compare` b-      go (IdString a) (IdString b) = a `compare` b-      go (IdInt    _) (IdString _) = LT-      go (IdString _) (IdInt    _) = GT--instance Hashable SomeLspId where-  hashWithSalt n (SomeLspId lspId) = hashWithSalt n lspId
− src/Language/LSP/Types/MarkupContent.hs
@@ -1,111 +0,0 @@-{-# LANGUAGE DuplicateRecordFields      #-}-{-# LANGUAGE OverloadedStrings          #-}-{-# LANGUAGE TemplateHaskell            #-}---- | A MarkupContent literal represents a string value which content can--- be represented in different formats.--- Currently plaintext and markdown are supported formats.--- A MarkupContent is usually used in documentation properties of result--- literals like CompletionItem or SignatureInformation.-module Language.LSP.Types.MarkupContent where--import           Data.Aeson-import           Data.Aeson.TH-import           Data.Text                                      (Text)-import qualified Data.Text as T-import           Language.LSP.Types.Utils---- |  Describes the content type that a client supports in various--- result literals like `Hover`, `ParameterInfo` or `CompletionItem`.-data MarkupKind = MkPlainText -- ^ Plain text is supported as a content format-                | MkMarkdown -- ^ Markdown is supported as a content format-  deriving (Read, Show, Eq)--instance ToJSON MarkupKind where-  toJSON MkPlainText = String "plaintext"-  toJSON MkMarkdown  = String "markdown"--instance FromJSON MarkupKind where-  parseJSON (String "plaintext") = pure MkPlainText-  parseJSON (String "markdown")  = pure MkMarkdown-  parseJSON _                    = fail "MarkupKind"---- | A `MarkupContent` literal represents a string value which content is interpreted base on its--- | kind flag. Currently the protocol supports `plaintext` and `markdown` as markup kinds.--- |--- | If the kind is `markdown` then the value can contain fenced code blocks like in GitHub issues.--- | See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting--- |--- | Here is an example how such a string can be constructed using JavaScript / TypeScript:--- | ```ts--- | let markdown: MarkdownContent = {--- |  kind: MarkupKind.Markdown,--- |	value: [--- |		'# Header',--- |		'Some text',--- |		'```typescript',--- |		'someCode();',--- |		'```'--- |	].join('\n')--- | };--- | ```--- |--- | *Please Note* that clients might sanitize the return markdown. A client could decide to--- | remove HTML from the markdown to avoid script execution.-data MarkupContent =-  MarkupContent-    { _kind  :: MarkupKind -- ^ The type of the Markup-    , _value :: Text -- ^ The content itself-    }-  deriving (Read, Show, Eq)--deriveJSON lspOptions ''MarkupContent---- ------------------------------------------------------------------------- | Create a 'MarkupContent' containing a quoted language string only.-markedUpContent :: Text -> Text -> MarkupContent-markedUpContent lang quote- = MarkupContent MkMarkdown ("\n```" <> lang <> "\n" <> quote <> "\n```\n")---- ------------------------------------------------------------------------- | Create a 'MarkupContent' containing unquoted text-unmarkedUpContent :: Text -> MarkupContent-unmarkedUpContent str = MarkupContent MkPlainText str---- ------------------------------------------------------------------------- | Markdown for a section separator in Markdown, being a horizontal line-sectionSeparator :: Text-sectionSeparator = "* * *\n"---- ------------------------------------------------------------------------- | Given some plaintext, convert it into some equivalent markdown text.--- This is not *quite* the identity function.-plainTextToMarkdown :: Text -> Text--- Line breaks in markdown paragraphs are ignored unless the line ends with two spaces.--- In order to respect the line breaks in the original plaintext, we stick two spaces on the end of every line.-plainTextToMarkdown = T.unlines . fmap (<> "  ") . T.lines--instance Semigroup MarkupContent where-  MarkupContent MkPlainText s1 <> MarkupContent MkPlainText s2 = MarkupContent MkPlainText (s1 `mappend` s2)-  MarkupContent MkMarkdown s1 <> MarkupContent MkMarkdown s2 = MarkupContent MkMarkdown  (s1 `mappend` s2)-  MarkupContent MkPlainText s1 <> MarkupContent MkMarkdown s2 = MarkupContent MkMarkdown  (plainTextToMarkdown s1 `mappend` s2)-  MarkupContent MkMarkdown s1 <> MarkupContent MkPlainText s2 = MarkupContent MkMarkdown  (s1 `mappend` plainTextToMarkdown s2)--instance Monoid MarkupContent where-  mempty = MarkupContent MkPlainText ""---- ------------------------------------------------------------------------- | Client capabilities specific to the used markdown parser.--- @since 3.16.0-data MarkdownClientCapabilities =-  MarkdownClientCapabilities-    { _parser :: Text-    , _version :: Maybe Text-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''MarkdownClientCapabilities
− src/Language/LSP/Types/Message.hs
@@ -1,423 +0,0 @@-{-# LANGUAGE GADTs                      #-}-{-# LANGUAGE TypeOperators              #-}-{-# LANGUAGE UndecidableInstances       #-}-{-# LANGUAGE TypeFamilies               #-}-{-# LANGUAGE RankNTypes                 #-}-{-# LANGUAGE FlexibleContexts           #-}-{-# LANGUAGE DuplicateRecordFields      #-}-{-# LANGUAGE ConstraintKinds            #-}-{-# LANGUAGE TemplateHaskell            #-}-{-# LANGUAGE TypeInType                 #-}-{-# LANGUAGE StandaloneDeriving         #-}-{-# LANGUAGE DeriveGeneric              #-}-{-# LANGUAGE OverloadedStrings          #-}-{-# LANGUAGE FlexibleInstances          #-}-{-# LANGUAGE TupleSections              #-}-{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}--module Language.LSP.Types.Message where--import           Language.LSP.Types.CallHierarchy-import           Language.LSP.Types.Cancellation-import           Language.LSP.Types.CodeAction-import           Language.LSP.Types.CodeLens-import           Language.LSP.Types.Command-import           Language.LSP.Types.Common-import           Language.LSP.Types.Configuration-import           Language.LSP.Types.Completion-import           Language.LSP.Types.Declaration-import           Language.LSP.Types.Definition-import           Language.LSP.Types.Diagnostic-import           Language.LSP.Types.DocumentColor-import           Language.LSP.Types.DocumentHighlight-import           Language.LSP.Types.DocumentLink-import           Language.LSP.Types.DocumentSymbol-import           Language.LSP.Types.FoldingRange-import           Language.LSP.Types.Formatting-import           Language.LSP.Types.Hover-import           Language.LSP.Types.Implementation-import           Language.LSP.Types.Initialize-import           Language.LSP.Types.Location-import           Language.LSP.Types.LspId-import           Language.LSP.Types.Method-import           Language.LSP.Types.Progress-import           Language.LSP.Types.Registration-import           Language.LSP.Types.Rename-import           Language.LSP.Types.References-import           Language.LSP.Types.SelectionRange-import           Language.LSP.Types.SemanticTokens-import           Language.LSP.Types.SignatureHelp-import           Language.LSP.Types.TextDocument-import           Language.LSP.Types.TypeDefinition-import           Language.LSP.Types.Utils-import           Language.LSP.Types.Window-import           Language.LSP.Types.WatchedFiles-import           Language.LSP.Types.WorkspaceEdit-import           Language.LSP.Types.WorkspaceFolders-import           Language.LSP.Types.WorkspaceSymbol--import Data.Kind-import Data.Aeson-import Data.Aeson.TH-import Data.Text (Text)-import Data.Scientific-import Data.String-import GHC.Generics---- ------------------------------------------------------------------------ PARAMS definition--- Map Methods to params/responses--- ------------------------------------------------------------------------- | Map a method to the message payload type-type family MessageParams (m :: Method f t) :: Type where--- Client-  -- General-  MessageParams Initialize                         = InitializeParams-  MessageParams Initialized                        = Maybe InitializedParams-  MessageParams Shutdown                           = Empty-  MessageParams Exit                               = Empty-  -- Workspace-  MessageParams WorkspaceDidChangeWorkspaceFolders = DidChangeWorkspaceFoldersParams-  MessageParams WorkspaceDidChangeConfiguration    = DidChangeConfigurationParams-  MessageParams WorkspaceDidChangeWatchedFiles     = DidChangeWatchedFilesParams-  MessageParams WorkspaceSymbol                    = WorkspaceSymbolParams-  MessageParams WorkspaceExecuteCommand            = ExecuteCommandParams-  -- Sync/Document state-  MessageParams TextDocumentDidOpen                = DidOpenTextDocumentParams-  MessageParams TextDocumentDidChange              = DidChangeTextDocumentParams-  MessageParams TextDocumentWillSave               = WillSaveTextDocumentParams-  MessageParams TextDocumentWillSaveWaitUntil      = WillSaveTextDocumentParams-  MessageParams TextDocumentDidSave                = DidSaveTextDocumentParams-  MessageParams TextDocumentDidClose               = DidCloseTextDocumentParams-  -- Completion-  MessageParams TextDocumentCompletion             = CompletionParams-  MessageParams CompletionItemResolve              = CompletionItem-  -- Language Queries-  MessageParams TextDocumentHover                  = HoverParams-  MessageParams TextDocumentSignatureHelp          = SignatureHelpParams-  MessageParams TextDocumentDeclaration            = DeclarationParams-  MessageParams TextDocumentDefinition             = DefinitionParams-  MessageParams TextDocumentTypeDefinition         = TypeDefinitionParams-  MessageParams TextDocumentImplementation         = ImplementationParams-  MessageParams TextDocumentReferences             = ReferenceParams-  MessageParams TextDocumentDocumentHighlight      = DocumentHighlightParams-  MessageParams TextDocumentDocumentSymbol         = DocumentSymbolParams-  -- Code Action/Lens/Link-  MessageParams TextDocumentCodeAction             = CodeActionParams-  MessageParams TextDocumentCodeLens               = CodeLensParams-  MessageParams CodeLensResolve                    = CodeLens-  MessageParams TextDocumentDocumentLink           = DocumentLinkParams-  MessageParams DocumentLinkResolve                = DocumentLink-  -- Syntax highlighting/coloring-  MessageParams TextDocumentDocumentColor          = DocumentColorParams-  MessageParams TextDocumentColorPresentation      = ColorPresentationParams-  -- Formatting-  MessageParams TextDocumentFormatting             = DocumentFormattingParams-  MessageParams TextDocumentRangeFormatting        = DocumentRangeFormattingParams-  MessageParams TextDocumentOnTypeFormatting       = DocumentOnTypeFormattingParams-  -- Rename-  MessageParams TextDocumentRename                 = RenameParams-  MessageParams TextDocumentPrepareRename          = PrepareRenameParams-  -- Folding Range-  MessageParams TextDocumentFoldingRange           = FoldingRangeParams-  -- Selection Range-  MessageParams TextDocumentSelectionRange         = SelectionRangeParams-  -- Call hierarchy-  MessageParams TextDocumentPrepareCallHierarchy   = CallHierarchyPrepareParams-  MessageParams CallHierarchyIncomingCalls         = CallHierarchyIncomingCallsParams-  MessageParams CallHierarchyOutgoingCalls         = CallHierarchyOutgoingCallsParams-  -- Semantic tokens -  MessageParams TextDocumentSemanticTokens         = Empty-  MessageParams TextDocumentSemanticTokensFull     = SemanticTokensParams-  MessageParams TextDocumentSemanticTokensFullDelta = SemanticTokensDeltaParams-  MessageParams TextDocumentSemanticTokensRange    = SemanticTokensRangeParams -  MessageParams WorkspaceSemanticTokensRefresh     = Empty--- Server-  -- Window-  MessageParams WindowShowMessage                  = ShowMessageParams-  MessageParams WindowShowMessageRequest           = ShowMessageRequestParams-  MessageParams WindowShowDocument                 = ShowDocumentParams-  MessageParams WindowLogMessage                   = LogMessageParams-  -- Progress-  MessageParams WindowWorkDoneProgressCreate       = WorkDoneProgressCreateParams-  MessageParams WindowWorkDoneProgressCancel       = WorkDoneProgressCancelParams-  MessageParams Progress                           = ProgressParams SomeProgressParams-  -- Telemetry-  MessageParams TelemetryEvent                     = Value-  -- Client-  MessageParams ClientRegisterCapability           = RegistrationParams-  MessageParams ClientUnregisterCapability         = UnregistrationParams-  -- Workspace-  MessageParams WorkspaceWorkspaceFolders          = Empty-  MessageParams WorkspaceConfiguration             = ConfigurationParams-  MessageParams WorkspaceApplyEdit                 = ApplyWorkspaceEditParams-  -- Document/Diagnostic-  MessageParams TextDocumentPublishDiagnostics     = PublishDiagnosticsParams-  -- Cancel-  MessageParams CancelRequest                      = CancelParams-  -- Custom-  MessageParams CustomMethod                       = Value---- | Map a request method to the response payload type-type family ResponseResult (m :: Method f Request) :: Type where--- Even though the specification mentions that the result types are--- @x | y | ... | null@, they don't actually need to be wrapped in a Maybe since--- (we think) this is just to account for how the response field is always--- nullable. I.e. if it is null, then the error field is set---- Client-  -- General-  ResponseResult Initialize                    = InitializeResult-  ResponseResult Shutdown                      = Empty-  -- Workspace-  ResponseResult WorkspaceSymbol               = List SymbolInformation-  ResponseResult WorkspaceExecuteCommand       = Value-  -- Sync/Document state-  ResponseResult TextDocumentWillSaveWaitUntil = List TextEdit-  -- Completion-  ResponseResult TextDocumentCompletion        = List CompletionItem |? CompletionList-  ResponseResult CompletionItemResolve         = CompletionItem-  -- Language Queries-  ResponseResult TextDocumentHover             = Maybe Hover-  ResponseResult TextDocumentSignatureHelp     = SignatureHelp-  ResponseResult TextDocumentDeclaration       = Location |? List Location |? List LocationLink-  ResponseResult TextDocumentDefinition        = Location |? List Location |? List LocationLink-  ResponseResult TextDocumentTypeDefinition    = Location |? List Location |? List LocationLink-  ResponseResult TextDocumentImplementation    = Location |? List Location |? List LocationLink-  ResponseResult TextDocumentReferences        = List Location-  ResponseResult TextDocumentDocumentHighlight = List DocumentHighlight-  ResponseResult TextDocumentDocumentSymbol    = List DocumentSymbol |? List SymbolInformation-  -- Code Action/Lens/Link-  ResponseResult TextDocumentCodeAction        = List (Command |? CodeAction)-  ResponseResult TextDocumentCodeLens          = List CodeLens-  ResponseResult CodeLensResolve               = CodeLens-  ResponseResult TextDocumentDocumentLink      = List DocumentLink-  ResponseResult DocumentLinkResolve           = DocumentLink-  -- Syntax highlighting/coloring-  ResponseResult TextDocumentDocumentColor     = List ColorInformation-  ResponseResult TextDocumentColorPresentation = List ColorPresentation-  -- Formatting-  ResponseResult TextDocumentFormatting        = List TextEdit-  ResponseResult TextDocumentRangeFormatting   = List TextEdit-  ResponseResult TextDocumentOnTypeFormatting  = List TextEdit-  -- Rename-  ResponseResult TextDocumentRename            = WorkspaceEdit-  ResponseResult TextDocumentPrepareRename     = Maybe (Range |? RangeWithPlaceholder)-  -- FoldingRange-  ResponseResult TextDocumentFoldingRange      = List FoldingRange-  ResponseResult TextDocumentSelectionRange    = List SelectionRange-  -- Call hierarchy-  ResponseResult TextDocumentPrepareCallHierarchy = Maybe (List CallHierarchyItem)-  ResponseResult CallHierarchyIncomingCalls    = Maybe (List CallHierarchyIncomingCall)-  ResponseResult CallHierarchyOutgoingCalls    = Maybe (List CallHierarchyOutgoingCall)-  -- Semantic tokens -  ResponseResult TextDocumentSemanticTokens          = Empty-  ResponseResult TextDocumentSemanticTokensFull      = Maybe SemanticTokens-  ResponseResult TextDocumentSemanticTokensFullDelta = Maybe (SemanticTokens |? SemanticTokensDelta)-  ResponseResult TextDocumentSemanticTokensRange     = Maybe SemanticTokens -  ResponseResult WorkspaceSemanticTokensRefresh      = Empty-  -- Custom can be either a notification or a message--- Server-  -- Window-  ResponseResult WindowShowMessageRequest      = Maybe MessageActionItem-  ResponseResult WindowShowDocument            = ShowDocumentResult-  ResponseResult WindowWorkDoneProgressCreate  = Empty-  -- Capability-  ResponseResult ClientRegisterCapability      = Empty-  ResponseResult ClientUnregisterCapability    = Empty-  -- Workspace-  ResponseResult WorkspaceWorkspaceFolders     = Maybe (List WorkspaceFolder)-  ResponseResult WorkspaceConfiguration        = List Value-  ResponseResult WorkspaceApplyEdit            = ApplyWorkspaceEditResponseBody--- Custom-  ResponseResult CustomMethod                  = Value----- ----------------------------------------------------------------------{--$ Notifications and Requests--Notification and requests ids starting with '$/' are messages which are protocol-implementation dependent and might not be implementable in all clients or-servers. For example if the server implementation uses a single threaded-synchronous programming language then there is little a server can do to react-to a '$/cancelRequest'. If a server or client receives notifications or requests-starting with '$/' it is free to ignore them if they are unknown.---}--data NotificationMessage (m :: Method f Notification) =-  NotificationMessage-    { _jsonrpc :: Text-    , _method  :: SMethod m-    , _params  :: MessageParams m-    } deriving Generic--deriving instance Eq   (MessageParams m) => Eq (NotificationMessage m)-deriving instance Show (MessageParams m) => Show (NotificationMessage m)--instance (FromJSON (MessageParams m), FromJSON (SMethod m)) => FromJSON (NotificationMessage m) where-  parseJSON = genericParseJSON lspOptions . addNullField "params"-instance (ToJSON (MessageParams m)) => ToJSON (NotificationMessage m) where-  toJSON     = genericToJSON lspOptions-  toEncoding = genericToEncoding lspOptions--data RequestMessage (m :: Method f Request) = RequestMessage-    { _jsonrpc :: Text-    , _id      :: LspId m-    , _method  :: SMethod m-    , _params  :: MessageParams m-    } deriving Generic--deriving instance Eq   (MessageParams m) => Eq (RequestMessage m)-deriving instance (Read (SMethod m), Read (MessageParams m)) => Read (RequestMessage m)-deriving instance Show (MessageParams m) => Show (RequestMessage m)---- | Replace a missing field in an object with a null field, to simplify parsing--- This is a hack to allow other types than Maybe to work like Maybe in allowing the field to be missing.--- See also this issue: https://github.com/haskell/aeson/issues/646-addNullField :: String -> Value -> Value-addNullField s (Object o) = Object $ o <> fromString s .= Null-addNullField _ v = v--instance (FromJSON (MessageParams m), FromJSON (SMethod m)) => FromJSON (RequestMessage m) where-  parseJSON = genericParseJSON lspOptions . addNullField "params"-instance (ToJSON (MessageParams m), FromJSON (SMethod m)) => ToJSON (RequestMessage m) where-  toJSON     = genericToJSON lspOptions-  toEncoding = genericToEncoding lspOptions---- | A custom message data type is needed to distinguish between--- notifications and requests, since a CustomMethod can be both!-data CustomMessage f t where-  ReqMess :: RequestMessage (CustomMethod :: Method f Request) -> CustomMessage f Request-  NotMess :: NotificationMessage (CustomMethod :: Method f Notification) -> CustomMessage f Notification--deriving instance Show (CustomMessage p t)--instance ToJSON (CustomMessage p t) where-  toJSON (ReqMess a) = toJSON a-  toJSON (NotMess a) = toJSON a--instance FromJSON (CustomMessage p Request) where-  parseJSON v = ReqMess <$> parseJSON v-instance FromJSON (CustomMessage p Notification) where-  parseJSON v = NotMess <$> parseJSON v---- ------------------------------------------------------------------------ Response Message--- -----------------------------------------------------------------------data ErrorCode = ParseError-               | InvalidRequest-               | MethodNotFound-               | InvalidParams-               | InternalError-               | ServerErrorStart-               | ServerErrorEnd-               | ServerNotInitialized-               | UnknownErrorCode-               | RequestCancelled-               | ContentModified-               | ServerCancelled-               | RequestFailed-               | ErrorCodeCustom Int32-               -- ^ Note: server error codes are reserved from -32099 to -32000-               deriving (Read,Show,Eq)--instance ToJSON ErrorCode where-  toJSON ParseError           = Number (-32700)-  toJSON InvalidRequest       = Number (-32600)-  toJSON MethodNotFound       = Number (-32601)-  toJSON InvalidParams        = Number (-32602)-  toJSON InternalError        = Number (-32603)-  toJSON ServerErrorStart     = Number (-32099)-  toJSON ServerErrorEnd       = Number (-32000)-  toJSON ServerNotInitialized = Number (-32002)-  toJSON UnknownErrorCode     = Number (-32001)-  toJSON RequestCancelled     = Number (-32800)-  toJSON ContentModified      = Number (-32801)-  toJSON ServerCancelled      = Number (-32802)-  toJSON RequestFailed        = Number (-32803)-  toJSON (ErrorCodeCustom n)  = Number (fromIntegral n)--instance FromJSON ErrorCode where-  parseJSON (Number (-32700)) = pure ParseError-  parseJSON (Number (-32600)) = pure InvalidRequest-  parseJSON (Number (-32601)) = pure MethodNotFound-  parseJSON (Number (-32602)) = pure InvalidParams-  parseJSON (Number (-32603)) = pure InternalError-  parseJSON (Number (-32099)) = pure ServerErrorStart-  parseJSON (Number (-32000)) = pure ServerErrorEnd-  parseJSON (Number (-32002)) = pure ServerNotInitialized-  parseJSON (Number (-32001)) = pure UnknownErrorCode-  parseJSON (Number (-32800)) = pure RequestCancelled-  parseJSON (Number (-32801)) = pure ContentModified-  parseJSON (Number (-32802)) = pure ServerCancelled-  parseJSON (Number (-32803)) = pure RequestFailed-  parseJSON (Number n       ) = case toBoundedInteger n of-    Just i -> pure (ErrorCodeCustom i)-    Nothing -> fail "Couldn't convert ErrorCode to bounded integer."-  parseJSON _                 = fail "Couldn't parse ErrorCode"---- ---------------------------------------data ResponseError =-  ResponseError-    { _code    :: ErrorCode-    , _message :: Text-    , _xdata   :: Maybe Value-    } deriving (Read,Show,Eq)--deriveJSON lspOptions ''ResponseError---- | Either result or error must be Just.-data ResponseMessage (m :: Method f Request) =-  ResponseMessage-    { _jsonrpc :: Text-    , _id      :: Maybe (LspId m)-    , _result  :: Either ResponseError (ResponseResult m)-    } deriving Generic--deriving instance Eq   (ResponseResult m) => Eq (ResponseMessage m)-deriving instance Read (ResponseResult m) => Read (ResponseMessage m)-deriving instance Show (ResponseResult m) => Show (ResponseMessage m)--instance (ToJSON (ResponseResult m)) => ToJSON (ResponseMessage m) where-  toJSON ResponseMessage { _jsonrpc = jsonrpc, _id = lspid, _result = result }-    = object-      [ "jsonrpc" .= jsonrpc-      , "id" .= lspid-      , case result of-        Left  err -> "error" .= err-        Right a   -> "result" .= a-      ]--instance FromJSON (ResponseResult a) => FromJSON (ResponseMessage a) where-  parseJSON = withObject "Response" $ \o -> do-    _jsonrpc <- o .: "jsonrpc"-    _id      <- o .: "id"-    -- It is important to use .:! so that "result = null" (without error) gets decoded as Just Null-    _result  <- o .:! "result"-    _error   <- o .:? "error"-    result   <- case (_error, _result) of-      (Just err, Nothing) -> pure $ Left err-      (Nothing, Just res) -> pure $ Right res-      (Just _err, Just _res) -> fail $ "both error and result cannot be present: " ++ show o-      (Nothing, Nothing) -> fail "both error and result cannot be Nothing"-    return $ ResponseMessage _jsonrpc _id result---- ------------------------------------------------------------------------ Helper Type Families--- ------------------------------------------------------------------------- | Map a method to the Request/Notification type with the correct--- payload-type family Message (m :: Method f t) :: Type where-  Message (CustomMethod :: Method f t) = CustomMessage f t-  Message (m :: Method f Request) = RequestMessage m-  Message (m :: Method f Notification) = NotificationMessage m---- Some helpful type synonyms-type ClientMessage (m :: Method FromClient t) = Message m-type ServerMessage (m :: Method FromServer t) = Message m
− src/Language/LSP/Types/Method.hs
@@ -1,455 +0,0 @@-{-# LANGUAGE OverloadedStrings          #-}-{-# LANGUAGE TemplateHaskell            #-}-{-# LANGUAGE GADTs                      #-}-{-# LANGUAGE MagicHash                  #-}-{-# LANGUAGE TypeFamilies               #-}-{-# LANGUAGE TypeInType                 #-}-{-# LANGUAGE FlexibleInstances          #-}-{-# LANGUAGE StandaloneDeriving         #-}-{-# LANGUAGE ScopedTypeVariables        #-}-{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}-module Language.LSP.Types.Method where--import qualified Data.Aeson                                 as A-import           Data.Aeson.Types-import           Data.Text                                  (Text)-import           Language.LSP.Types.Utils-import           Data.Function (on)-import Control.Applicative-import Data.GADT.Compare-import Data.Type.Equality-import GHC.Exts (Int(..), dataToTag#)-import Unsafe.Coerce---- -----------------------------------------------------------------------data From       = FromServer   | FromClient-data MethodType = Notification | Request--data Method (f :: From) (t :: MethodType) where--- Client Methods-  -- General-  Initialize                         :: Method FromClient Request-  Initialized                        :: Method FromClient Notification-  Shutdown                           :: Method FromClient Request-  Exit                               :: Method FromClient Notification-  -- Workspace-  WorkspaceDidChangeWorkspaceFolders :: Method FromClient Notification-  WorkspaceDidChangeConfiguration    :: Method FromClient Notification-  WorkspaceDidChangeWatchedFiles     :: Method FromClient Notification-  WorkspaceSymbol                    :: Method FromClient Request-  WorkspaceExecuteCommand            :: Method FromClient Request-  -- Document-  TextDocumentDidOpen                :: Method FromClient Notification-  TextDocumentDidChange              :: Method FromClient Notification-  TextDocumentWillSave               :: Method FromClient Notification-  TextDocumentWillSaveWaitUntil      :: Method FromClient Request-  TextDocumentDidSave                :: Method FromClient Notification-  TextDocumentDidClose               :: Method FromClient Notification-  -- Completion-  TextDocumentCompletion             :: Method FromClient Request-  CompletionItemResolve              :: Method FromClient Request-  -- LanguageQueries-  TextDocumentHover                  :: Method FromClient Request-  TextDocumentSignatureHelp          :: Method FromClient Request-  TextDocumentDeclaration            :: Method FromClient Request-  TextDocumentDefinition             :: Method FromClient Request-  TextDocumentTypeDefinition         :: Method FromClient Request-  TextDocumentImplementation         :: Method FromClient Request-  TextDocumentReferences             :: Method FromClient Request-  TextDocumentDocumentHighlight      :: Method FromClient Request-  TextDocumentDocumentSymbol         :: Method FromClient Request-  -- Code Action/Lens/Link-  TextDocumentCodeAction             :: Method FromClient Request-  TextDocumentCodeLens               :: Method FromClient Request-  CodeLensResolve                    :: Method FromClient Request-  TextDocumentDocumentLink           :: Method FromClient Request-  DocumentLinkResolve                :: Method FromClient Request-  -- Syntax highlighting/Coloring-  TextDocumentDocumentColor          :: Method FromClient Request-  TextDocumentColorPresentation      :: Method FromClient Request-  -- Formatting-  TextDocumentFormatting             :: Method FromClient Request-  TextDocumentRangeFormatting        :: Method FromClient Request-  TextDocumentOnTypeFormatting       :: Method FromClient Request-  -- Rename-  TextDocumentRename                 :: Method FromClient Request-  TextDocumentPrepareRename          :: Method FromClient Request-  -- FoldingRange-  TextDocumentFoldingRange           :: Method FromClient Request-  TextDocumentSelectionRange         :: Method FromClient Request-  -- Call hierarchy-  TextDocumentPrepareCallHierarchy   :: Method FromClient Request-  CallHierarchyIncomingCalls         :: Method FromClient Request-  CallHierarchyOutgoingCalls         :: Method FromClient Request-  -- SemanticTokens-  TextDocumentSemanticTokens         :: Method FromClient Request-  TextDocumentSemanticTokensFull     :: Method FromClient Request-  TextDocumentSemanticTokensFullDelta :: Method FromClient Request-  TextDocumentSemanticTokensRange    :: Method FromClient Request---- ServerMethods-  -- Window-  WindowShowMessage                  :: Method FromServer Notification-  WindowShowMessageRequest           :: Method FromServer Request-  WindowShowDocument                 :: Method FromServer Request-  WindowLogMessage                   :: Method FromServer Notification-  WindowWorkDoneProgressCancel       :: Method FromClient Notification-  WindowWorkDoneProgressCreate       :: Method FromServer Request-  -- Progress-  Progress                           :: Method FromServer Notification-  -- Telemetry-  TelemetryEvent                     :: Method FromServer Notification-  -- Client-  ClientRegisterCapability           :: Method FromServer Request-  ClientUnregisterCapability         :: Method FromServer Request-  -- Workspace-  WorkspaceWorkspaceFolders          :: Method FromServer Request-  WorkspaceConfiguration             :: Method FromServer Request-  WorkspaceApplyEdit                 :: Method FromServer Request-  WorkspaceSemanticTokensRefresh     :: Method FromServer Request-  -- Document-  TextDocumentPublishDiagnostics     :: Method FromServer Notification---- Cancelling-  CancelRequest                      :: Method f Notification---- Custom-  -- A custom message type. It is not enforced that this starts with $/.-  CustomMethod                       :: Method f t--data SMethod (m :: Method f t) where-  SInitialize                         :: SMethod Initialize-  SInitialized                        :: SMethod Initialized-  SShutdown                           :: SMethod Shutdown-  SExit                               :: SMethod Exit-  SWorkspaceDidChangeWorkspaceFolders :: SMethod WorkspaceDidChangeWorkspaceFolders-  SWorkspaceDidChangeConfiguration    :: SMethod WorkspaceDidChangeConfiguration-  SWorkspaceDidChangeWatchedFiles     :: SMethod WorkspaceDidChangeWatchedFiles-  SWorkspaceSymbol                    :: SMethod WorkspaceSymbol-  SWorkspaceExecuteCommand            :: SMethod WorkspaceExecuteCommand-  STextDocumentDidOpen                :: SMethod TextDocumentDidOpen-  STextDocumentDidChange              :: SMethod TextDocumentDidChange-  STextDocumentWillSave               :: SMethod TextDocumentWillSave-  STextDocumentWillSaveWaitUntil      :: SMethod TextDocumentWillSaveWaitUntil-  STextDocumentDidSave                :: SMethod TextDocumentDidSave-  STextDocumentDidClose               :: SMethod TextDocumentDidClose-  STextDocumentCompletion             :: SMethod TextDocumentCompletion-  SCompletionItemResolve              :: SMethod CompletionItemResolve-  STextDocumentHover                  :: SMethod TextDocumentHover-  STextDocumentSignatureHelp          :: SMethod TextDocumentSignatureHelp-  STextDocumentDeclaration            :: SMethod TextDocumentDeclaration-  STextDocumentDefinition             :: SMethod TextDocumentDefinition-  STextDocumentTypeDefinition         :: SMethod TextDocumentTypeDefinition-  STextDocumentImplementation         :: SMethod TextDocumentImplementation-  STextDocumentReferences             :: SMethod TextDocumentReferences-  STextDocumentDocumentHighlight      :: SMethod TextDocumentDocumentHighlight-  STextDocumentDocumentSymbol         :: SMethod TextDocumentDocumentSymbol-  STextDocumentCodeAction             :: SMethod TextDocumentCodeAction-  STextDocumentCodeLens               :: SMethod TextDocumentCodeLens-  SCodeLensResolve                    :: SMethod CodeLensResolve-  STextDocumentDocumentLink           :: SMethod TextDocumentDocumentLink-  SDocumentLinkResolve                :: SMethod DocumentLinkResolve-  STextDocumentDocumentColor          :: SMethod TextDocumentDocumentColor-  STextDocumentColorPresentation      :: SMethod TextDocumentColorPresentation-  STextDocumentFormatting             :: SMethod TextDocumentFormatting-  STextDocumentRangeFormatting        :: SMethod TextDocumentRangeFormatting-  STextDocumentOnTypeFormatting       :: SMethod TextDocumentOnTypeFormatting-  STextDocumentRename                 :: SMethod TextDocumentRename-  STextDocumentPrepareRename          :: SMethod TextDocumentPrepareRename-  STextDocumentFoldingRange           :: SMethod TextDocumentFoldingRange-  STextDocumentSelectionRange         :: SMethod TextDocumentSelectionRange-  STextDocumentPrepareCallHierarchy   :: SMethod TextDocumentPrepareCallHierarchy-  SCallHierarchyIncomingCalls         :: SMethod CallHierarchyIncomingCalls-  SCallHierarchyOutgoingCalls         :: SMethod CallHierarchyOutgoingCalls--  STextDocumentSemanticTokens         :: SMethod TextDocumentSemanticTokens-  STextDocumentSemanticTokensFull     :: SMethod TextDocumentSemanticTokensFull-  STextDocumentSemanticTokensFullDelta :: SMethod TextDocumentSemanticTokensFullDelta-  STextDocumentSemanticTokensRange    :: SMethod TextDocumentSemanticTokensRange-  SWorkspaceSemanticTokensRefresh     :: SMethod WorkspaceSemanticTokensRefresh--  SWindowShowMessage                  :: SMethod WindowShowMessage-  SWindowShowMessageRequest           :: SMethod WindowShowMessageRequest-  SWindowShowDocument                 :: SMethod WindowShowDocument-  SWindowLogMessage                   :: SMethod WindowLogMessage-  SWindowWorkDoneProgressCreate       :: SMethod WindowWorkDoneProgressCreate-  SWindowWorkDoneProgressCancel       :: SMethod WindowWorkDoneProgressCancel-  SProgress                           :: SMethod Progress-  STelemetryEvent                     :: SMethod TelemetryEvent-  SClientRegisterCapability           :: SMethod ClientRegisterCapability-  SClientUnregisterCapability         :: SMethod ClientUnregisterCapability-  SWorkspaceWorkspaceFolders          :: SMethod WorkspaceWorkspaceFolders-  SWorkspaceConfiguration             :: SMethod WorkspaceConfiguration-  SWorkspaceApplyEdit                 :: SMethod WorkspaceApplyEdit-  STextDocumentPublishDiagnostics     :: SMethod TextDocumentPublishDiagnostics--  SCancelRequest                      :: SMethod CancelRequest-  SCustomMethod                       :: Text -> SMethod CustomMethod---- This instance is written manually rather than derived to avoid a dependency--- on 'dependent-sum-template'.-instance GEq SMethod where-  geq x y = case gcompare x y of-    GLT -> Nothing-    GEQ -> Just Refl-    GGT -> Nothing---- This instance is written manually rather than derived to avoid a dependency--- on 'dependent-sum-template'.-instance GCompare SMethod where-  gcompare (SCustomMethod x) (SCustomMethod y) = case x `compare` y of-    LT -> GLT-    EQ -> GEQ-    GT -> GGT-  -- This is much more compact than matching on every pair of constructors, which-  -- is what we would need to do for GHC to 'see' that this is correct. Nonetheless-  -- it is safe: since there is only one constructor of 'SMethod' for each 'Method',-  -- the argument types can only be equal if the constructor tag is equal.-  gcompare x y = case I# (dataToTag# x) `compare` I# (dataToTag# y) of-    LT -> GLT-    EQ -> unsafeCoerce GEQ-    GT -> GGT--instance Eq (SMethod m) where-  -- This defers to 'GEq', ensuring that this version is compatible.-  (==) = defaultEq--instance Ord (SMethod m) where-  -- This defers to 'GCompare', ensuring that this version is compatible.-  compare = defaultCompare--deriving instance Show (SMethod m)---- Some useful type synonyms-type SClientMethod (m :: Method FromClient t) = SMethod m-type SServerMethod (m :: Method FromServer t) = SMethod m--data SomeClientMethod = forall t (m :: Method FromClient t). SomeClientMethod (SMethod m)-data SomeServerMethod = forall t (m :: Method FromServer t). SomeServerMethod (SMethod m)--data SomeMethod where-  SomeMethod :: forall m. SMethod m -> SomeMethod--deriving instance Show SomeMethod-instance Eq SomeMethod where-  (==) = (==) `on` toJSON-instance Ord SomeMethod where-  compare = compare `on` (getString . toJSON)-    where-      getString (A.String t) = t-      getString _ = error "ToJSON instance for some method isn't string"-deriving instance Show SomeClientMethod-instance Eq SomeClientMethod where-  (==) = (==) `on` toJSON-instance Ord SomeClientMethod where-  compare = compare `on` (getString . toJSON)-    where-      getString (A.String t) = t-      getString _ = error "ToJSON instance for some method isn't string"-deriving instance Show SomeServerMethod-instance Eq SomeServerMethod where-  (==) = (==) `on` toJSON-instance Ord SomeServerMethod where-  compare = compare `on` (getString . toJSON)-    where-      getString (A.String t) = t-      getString _ = error "ToJSON instance for some method isn't string"---- ------------------------------------------------------------------------ From JSON--- -----------------------------------------------------------------------instance FromJSON SomeMethod where-  parseJSON v = client <|> server-    where-      client = do-        c <- parseJSON v-        case c of-          -- Don't parse the client custom method so that we can still-          -- parse the server methods-          SomeClientMethod (SCustomMethod _) -> mempty-          SomeClientMethod m -> pure $ SomeMethod m-      server = do-        c <- parseJSON v-        case c of-          SomeServerMethod m -> pure $ SomeMethod m--instance FromJSON SomeClientMethod where-    -- General-  parseJSON (A.String "initialize")                          = pure $ SomeClientMethod SInitialize-  parseJSON (A.String "initialized")                         = pure $ SomeClientMethod SInitialized-  parseJSON (A.String "shutdown")                            = pure $ SomeClientMethod SShutdown-  parseJSON (A.String "exit")                                = pure $ SomeClientMethod SExit- -- Workspace-  parseJSON (A.String "workspace/didChangeWorkspaceFolders") = pure $ SomeClientMethod SWorkspaceDidChangeWorkspaceFolders-  parseJSON (A.String "workspace/didChangeConfiguration")    = pure $ SomeClientMethod SWorkspaceDidChangeConfiguration-  parseJSON (A.String "workspace/didChangeWatchedFiles")     = pure $ SomeClientMethod SWorkspaceDidChangeWatchedFiles-  parseJSON (A.String "workspace/symbol")                    = pure $ SomeClientMethod SWorkspaceSymbol-  parseJSON (A.String "workspace/executeCommand")            = pure $ SomeClientMethod SWorkspaceExecuteCommand- -- Document-  parseJSON (A.String "textDocument/didOpen")                = pure $ SomeClientMethod STextDocumentDidOpen-  parseJSON (A.String "textDocument/didChange")              = pure $ SomeClientMethod STextDocumentDidChange-  parseJSON (A.String "textDocument/willSave")               = pure $ SomeClientMethod STextDocumentWillSave-  parseJSON (A.String "textDocument/willSaveWaitUntil")      = pure $ SomeClientMethod STextDocumentWillSaveWaitUntil-  parseJSON (A.String "textDocument/didSave")                = pure $ SomeClientMethod STextDocumentDidSave-  parseJSON (A.String "textDocument/didClose")               = pure $ SomeClientMethod STextDocumentDidClose-  parseJSON (A.String "textDocument/completion")             = pure $ SomeClientMethod STextDocumentCompletion-  parseJSON (A.String "completionItem/resolve")              = pure $ SomeClientMethod SCompletionItemResolve-  parseJSON (A.String "textDocument/hover")                  = pure $ SomeClientMethod STextDocumentHover-  parseJSON (A.String "textDocument/signatureHelp")          = pure $ SomeClientMethod STextDocumentSignatureHelp-  parseJSON (A.String "textDocument/declaration")            = pure $ SomeClientMethod STextDocumentDeclaration-  parseJSON (A.String "textDocument/definition")             = pure $ SomeClientMethod STextDocumentDefinition-  parseJSON (A.String "textDocument/typeDefinition")         = pure $ SomeClientMethod STextDocumentTypeDefinition-  parseJSON (A.String "textDocument/implementation")         = pure $ SomeClientMethod STextDocumentImplementation-  parseJSON (A.String "textDocument/references")             = pure $ SomeClientMethod STextDocumentReferences-  parseJSON (A.String "textDocument/documentHighlight")      = pure $ SomeClientMethod STextDocumentDocumentHighlight-  parseJSON (A.String "textDocument/documentSymbol")         = pure $ SomeClientMethod STextDocumentDocumentSymbol-  parseJSON (A.String "textDocument/codeAction")             = pure $ SomeClientMethod STextDocumentCodeAction-  parseJSON (A.String "textDocument/codeLens")               = pure $ SomeClientMethod STextDocumentCodeLens-  parseJSON (A.String "codeLens/resolve")                    = pure $ SomeClientMethod SCodeLensResolve-  parseJSON (A.String "textDocument/documentLink")           = pure $ SomeClientMethod STextDocumentDocumentLink-  parseJSON (A.String "documentLink/resolve")                = pure $ SomeClientMethod SDocumentLinkResolve-  parseJSON (A.String "textDocument/documentColor")          = pure $ SomeClientMethod STextDocumentDocumentColor-  parseJSON (A.String "textDocument/colorPresentation")      = pure $ SomeClientMethod STextDocumentColorPresentation-  parseJSON (A.String "textDocument/formatting")             = pure $ SomeClientMethod STextDocumentFormatting-  parseJSON (A.String "textDocument/rangeFormatting")        = pure $ SomeClientMethod STextDocumentRangeFormatting-  parseJSON (A.String "textDocument/onTypeFormatting")       = pure $ SomeClientMethod STextDocumentOnTypeFormatting-  parseJSON (A.String "textDocument/rename")                 = pure $ SomeClientMethod STextDocumentRename-  parseJSON (A.String "textDocument/prepareRename")          = pure $ SomeClientMethod STextDocumentPrepareRename-  parseJSON (A.String "textDocument/foldingRange")           = pure $ SomeClientMethod STextDocumentFoldingRange-  parseJSON (A.String "textDocument/selectionRange")         = pure $ SomeClientMethod STextDocumentSelectionRange-  parseJSON (A.String "textDocument/prepareCallHierarchy")   = pure $ SomeClientMethod STextDocumentPrepareCallHierarchy-  parseJSON (A.String "callHierarchy/incomingCalls")         = pure $ SomeClientMethod SCallHierarchyIncomingCalls-  parseJSON (A.String "callHierarchy/outgoingCalls")         = pure $ SomeClientMethod SCallHierarchyOutgoingCalls-  parseJSON (A.String "textDocument/semanticTokens")         = pure $ SomeClientMethod STextDocumentSemanticTokens-  parseJSON (A.String "textDocument/semanticTokens/full")    = pure $ SomeClientMethod STextDocumentSemanticTokensFull-  parseJSON (A.String "textDocument/semanticTokens/full/delta") = pure $ SomeClientMethod STextDocumentSemanticTokensFullDelta-  parseJSON (A.String "textDocument/semanticTokens/range")    = pure $ SomeClientMethod STextDocumentSemanticTokensRange-  parseJSON (A.String "window/workDoneProgress/cancel")      = pure $ SomeClientMethod SWindowWorkDoneProgressCancel--- Cancelling-  parseJSON (A.String "$/cancelRequest")                     = pure $ SomeClientMethod SCancelRequest--- Custom-  parseJSON (A.String m)                                     = pure $ SomeClientMethod (SCustomMethod m)-  parseJSON _                                                = fail "SomeClientMethod"--instance A.FromJSON SomeServerMethod where--- Server-  -- Window-  parseJSON (A.String "window/showMessage")                  = pure $ SomeServerMethod SWindowShowMessage-  parseJSON (A.String "window/showMessageRequest")           = pure $ SomeServerMethod SWindowShowMessageRequest-  parseJSON (A.String "window/showDocument")                 = pure $ SomeServerMethod SWindowShowDocument-  parseJSON (A.String "window/logMessage")                   = pure $ SomeServerMethod SWindowLogMessage-  parseJSON (A.String "window/workDoneProgress/create")      = pure $ SomeServerMethod SWindowWorkDoneProgressCreate-  parseJSON (A.String "$/progress")                          = pure $ SomeServerMethod SProgress-  parseJSON (A.String "telemetry/event")                     = pure $ SomeServerMethod STelemetryEvent-  -- Client-  parseJSON (A.String "client/registerCapability")           = pure $ SomeServerMethod SClientRegisterCapability-  parseJSON (A.String "client/unregisterCapability")         = pure $ SomeServerMethod SClientUnregisterCapability-  -- Workspace-  parseJSON (A.String "workspace/workspaceFolders")          = pure $ SomeServerMethod SWorkspaceWorkspaceFolders-  parseJSON (A.String "workspace/configuration")             = pure $ SomeServerMethod SWorkspaceConfiguration-  parseJSON (A.String "workspace/applyEdit")                 = pure $ SomeServerMethod SWorkspaceApplyEdit-  parseJSON (A.String "workspace/semanticTokens/refresh")    = pure $ SomeServerMethod SWorkspaceSemanticTokensRefresh-  -- Document-  parseJSON (A.String "textDocument/publishDiagnostics")     = pure $ SomeServerMethod STextDocumentPublishDiagnostics---- Cancelling-  parseJSON (A.String "$/cancelRequest")                     = pure $ SomeServerMethod SCancelRequest---- Custom-  parseJSON (A.String m)                                     = pure $ SomeServerMethod (SCustomMethod m)-  parseJSON _                                                = fail "SomeServerMethod"---- instance FromJSON (SMethod m)---- ------------------------------------------------------------------------ TO JSON--- -----------------------------------------------------------------------instance ToJSON SomeMethod where-  toJSON (SomeMethod m) = toJSON m--instance ToJSON SomeClientMethod where-    toJSON (SomeClientMethod m) = toJSON m-instance ToJSON SomeServerMethod where-    toJSON (SomeServerMethod m) = toJSON m--instance A.ToJSON (SMethod m) where--- Client-  -- General-  toJSON SInitialize                         = A.String "initialize"-  toJSON SInitialized                        = A.String "initialized"-  toJSON SShutdown                           = A.String "shutdown"-  toJSON SExit                               = A.String "exit"-  -- Workspace-  toJSON SWorkspaceDidChangeWorkspaceFolders = A.String "workspace/didChangeWorkspaceFolders"-  toJSON SWorkspaceDidChangeConfiguration    = A.String "workspace/didChangeConfiguration"-  toJSON SWorkspaceDidChangeWatchedFiles     = A.String "workspace/didChangeWatchedFiles"-  toJSON SWorkspaceSymbol                    = A.String "workspace/symbol"-  toJSON SWorkspaceExecuteCommand            = A.String "workspace/executeCommand"-  -- Document-  toJSON STextDocumentDidOpen                = A.String "textDocument/didOpen"-  toJSON STextDocumentDidChange              = A.String "textDocument/didChange"-  toJSON STextDocumentWillSave               = A.String "textDocument/willSave"-  toJSON STextDocumentWillSaveWaitUntil      = A.String "textDocument/willSaveWaitUntil"-  toJSON STextDocumentDidSave                = A.String "textDocument/didSave"-  toJSON STextDocumentDidClose               = A.String "textDocument/didClose"-  toJSON STextDocumentCompletion             = A.String "textDocument/completion"-  toJSON SCompletionItemResolve              = A.String "completionItem/resolve"-  toJSON STextDocumentHover                  = A.String "textDocument/hover"-  toJSON STextDocumentSignatureHelp          = A.String "textDocument/signatureHelp"-  toJSON STextDocumentReferences             = A.String "textDocument/references"-  toJSON STextDocumentDocumentHighlight      = A.String "textDocument/documentHighlight"-  toJSON STextDocumentDocumentSymbol         = A.String "textDocument/documentSymbol"-  toJSON STextDocumentDeclaration            = A.String "textDocument/declaration"-  toJSON STextDocumentDefinition             = A.String "textDocument/definition"-  toJSON STextDocumentTypeDefinition         = A.String "textDocument/typeDefinition"-  toJSON STextDocumentImplementation         = A.String "textDocument/implementation"-  toJSON STextDocumentCodeAction             = A.String "textDocument/codeAction"-  toJSON STextDocumentCodeLens               = A.String "textDocument/codeLens"-  toJSON SCodeLensResolve                    = A.String "codeLens/resolve"-  toJSON STextDocumentDocumentColor          = A.String "textDocument/documentColor"-  toJSON STextDocumentColorPresentation      = A.String "textDocument/colorPresentation"-  toJSON STextDocumentFormatting             = A.String "textDocument/formatting"-  toJSON STextDocumentRangeFormatting        = A.String "textDocument/rangeFormatting"-  toJSON STextDocumentOnTypeFormatting       = A.String "textDocument/onTypeFormatting"-  toJSON STextDocumentRename                 = A.String "textDocument/rename"-  toJSON STextDocumentPrepareRename          = A.String "textDocument/prepareRename"-  toJSON STextDocumentFoldingRange           = A.String "textDocument/foldingRange"-  toJSON STextDocumentSelectionRange         = A.String "textDocument/selectionRange"-  toJSON STextDocumentPrepareCallHierarchy   = A.String "textDocument/prepareCallHierarchy"-  toJSON SCallHierarchyIncomingCalls         = A.String "callHierarchy/incomingCalls"-  toJSON SCallHierarchyOutgoingCalls         = A.String "callHierarchy/outgoingCalls"-  toJSON STextDocumentSemanticTokens         = A.String "textDocument/semanticTokens"-  toJSON STextDocumentSemanticTokensFull     = A.String "textDocument/semanticTokens/full"-  toJSON STextDocumentSemanticTokensFullDelta = A.String "textDocument/semanticTokens/full/delta"-  toJSON STextDocumentSemanticTokensRange    = A.String "textDocument/semanticTokens/range"-  toJSON STextDocumentDocumentLink           = A.String "textDocument/documentLink"-  toJSON SDocumentLinkResolve                = A.String "documentLink/resolve"-  toJSON SWindowWorkDoneProgressCancel       = A.String "window/workDoneProgress/cancel"--- Server-  -- Window-  toJSON SWindowShowMessage                  = A.String "window/showMessage"-  toJSON SWindowShowMessageRequest           = A.String "window/showMessageRequest"-  toJSON SWindowShowDocument                 = A.String "window/showDocument"-  toJSON SWindowLogMessage                   = A.String "window/logMessage"-  toJSON SWindowWorkDoneProgressCreate       = A.String "window/workDoneProgress/create"-  toJSON SProgress                           = A.String "$/progress"-  toJSON STelemetryEvent                     = A.String "telemetry/event"-  -- Client-  toJSON SClientRegisterCapability           = A.String "client/registerCapability"-  toJSON SClientUnregisterCapability         = A.String "client/unregisterCapability"-  -- Workspace-  toJSON SWorkspaceWorkspaceFolders          = A.String "workspace/workspaceFolders"-  toJSON SWorkspaceConfiguration             = A.String "workspace/configuration"-  toJSON SWorkspaceApplyEdit                 = A.String "workspace/applyEdit"-  toJSON SWorkspaceSemanticTokensRefresh     = A.String "workspace/semanticTokens/refresh"-  -- Document-  toJSON STextDocumentPublishDiagnostics     = A.String "textDocument/publishDiagnostics"-  -- Cancelling-  toJSON SCancelRequest                      = A.String "$/cancelRequest"--- Custom-  toJSON (SCustomMethod m)                   = A.String m--makeSingletonFromJSON 'SomeMethod ''SMethod
− src/Language/LSP/Types/Parsing.hs
@@ -1,340 +0,0 @@-{-# LANGUAGE GADTs                      #-}-{-# LANGUAGE TypeOperators              #-}-{-# LANGUAGE UndecidableInstances       #-}-{-# LANGUAGE TypeFamilies               #-}-{-# LANGUAGE RankNTypes                 #-}-{-# LANGUAGE FlexibleContexts           #-}-{-# LANGUAGE DuplicateRecordFields      #-}-{-# LANGUAGE ConstraintKinds            #-}-{-# LANGUAGE TypeInType                 #-}-{-# LANGUAGE StandaloneDeriving         #-}-{-# LANGUAGE DeriveGeneric              #-}-{-# LANGUAGE OverloadedStrings          #-}-{-# LANGUAGE FlexibleInstances          #-}-{-# LANGUAGE TupleSections              #-}-{-# LANGUAGE TypeApplications           #-}-{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}-{-# LANGUAGE ScopedTypeVariables #-}--module Language.LSP.Types.Parsing where--import           Language.LSP.Types.LspId-import           Language.LSP.Types.Method-import           Language.LSP.Types.Message--import Data.Aeson-import Data.Aeson.Types-import Data.GADT.Compare-import Data.Type.Equality-import Data.Function (on)---- ------------------------------------------------------------------------ Working with arbitrary messages--- -----------------------------------------------------------------------data FromServerMessage' a where-  FromServerMess :: forall t (m :: Method FromServer t) a. SMethod m -> Message m -> FromServerMessage' a-  FromServerRsp  :: forall (m :: Method FromClient Request) a. a m -> ResponseMessage m -> FromServerMessage' a--type FromServerMessage = FromServerMessage' SMethod--instance Eq FromServerMessage where-  (==) = (==) `on` toJSON-instance Show FromServerMessage where-  show = show . toJSON--instance ToJSON FromServerMessage where-  toJSON (FromServerMess m p) = serverMethodJSON m (toJSON p)-  toJSON (FromServerRsp m p) = clientResponseJSON m (toJSON p)--fromServerNot :: forall (m :: Method FromServer Notification).-  Message m ~ NotificationMessage m => NotificationMessage m -> FromServerMessage-fromServerNot m@NotificationMessage{_method=meth} = FromServerMess meth m--fromServerReq :: forall (m :: Method FromServer Request).-  Message m ~ RequestMessage m => RequestMessage m -> FromServerMessage-fromServerReq m@RequestMessage{_method=meth} = FromServerMess meth m--data FromClientMessage' a where-  FromClientMess :: forall t (m :: Method FromClient t) a. SMethod m -> Message m -> FromClientMessage' a-  FromClientRsp  :: forall (m :: Method FromServer Request) a. a m -> ResponseMessage m -> FromClientMessage' a--type FromClientMessage = FromClientMessage' SMethod--instance ToJSON FromClientMessage where-  toJSON (FromClientMess m p) = clientMethodJSON m (toJSON p)-  toJSON (FromClientRsp m p) = serverResponseJSON m (toJSON p)--fromClientNot :: forall (m :: Method FromClient Notification).-  Message m ~ NotificationMessage m => NotificationMessage m -> FromClientMessage-fromClientNot m@NotificationMessage{_method=meth} = FromClientMess meth m--fromClientReq :: forall (m :: Method FromClient Request).-  Message m ~ RequestMessage m => RequestMessage m -> FromClientMessage-fromClientReq m@RequestMessage{_method=meth} = FromClientMess meth m---- ------------------------------------------------------------------------ Parsing--- -----------------------------------------------------------------------type LookupFunc f a = forall (m :: Method f Request). LspId m -> Maybe (SMethod m, a m)--{--Message Types we must handle are the following--Request      | jsonrpc | id | method | params?-Response     | jsonrpc | id |        |         | response? | error?-Notification | jsonrpc |    | method | params?--}--{-# INLINE parseServerMessage #-}-parseServerMessage :: LookupFunc FromClient a -> Value -> Parser (FromServerMessage' a)-parseServerMessage lookupId v@(Object o) = do-  methMaybe <- o .:! "method"-  idMaybe <- o .:! "id"-  case methMaybe of-    -- Request or Notification-    Just (SomeServerMethod m) ->-      case splitServerMethod m of-        IsServerNot -> FromServerMess m <$> parseJSON v-        IsServerReq -> FromServerMess m <$> parseJSON v-        IsServerEither | SCustomMethod cm <- m -> do-          case idMaybe of-            -- Request-            Just _ ->-              let m' = (SCustomMethod cm :: SMethod (CustomMethod :: Method FromServer Request))-              in FromServerMess m' <$> parseJSON v-            Nothing ->-              let m' = (SCustomMethod cm :: SMethod (CustomMethod :: Method FromServer Notification))-              in FromServerMess m' <$> parseJSON v-    Nothing -> do-      case idMaybe of-        Just i -> do-          case lookupId i of-            Just (m,res) -> clientResponseJSON m $ FromServerRsp res <$> parseJSON v-            Nothing -> fail $ unwords ["Failed in looking up response type of", show v]-        Nothing -> fail $ unwords ["Got unexpected message without method or id"]-parseServerMessage _ v = fail $ unwords ["parseServerMessage expected object, got:",show v]--{-# INLINE parseClientMessage #-}-parseClientMessage :: LookupFunc FromServer a -> Value -> Parser (FromClientMessage' a)-parseClientMessage lookupId v@(Object o) = do-  methMaybe <- o .:! "method"-  idMaybe <- o .:! "id"-  case methMaybe of-    -- Request or Notification-    Just (SomeClientMethod m) ->-      case splitClientMethod m of-        IsClientNot -> FromClientMess m <$> parseJSON v-        IsClientReq -> FromClientMess m <$> parseJSON v-        IsClientEither | SCustomMethod cm <- m -> do-          case idMaybe of-            -- Request-            Just _ ->-              let m' = (SCustomMethod cm :: SMethod (CustomMethod :: Method FromClient Request))-              in FromClientMess m' <$> parseJSON v-            Nothing ->-              let m' = (SCustomMethod cm :: SMethod (CustomMethod :: Method FromClient Notification))-              in FromClientMess m' <$> parseJSON v-    Nothing -> do-      case idMaybe of-        Just i -> do-          case lookupId i of-            Just (m,res) -> serverResponseJSON m $ FromClientRsp res <$> parseJSON v-            Nothing -> fail $ unwords ["Failed in looking up response type of", show v]-        Nothing -> fail $ unwords ["Got unexpected message without method or id"]-parseClientMessage _ v = fail $ unwords ["parseClientMessage expected object, got:",show v]---- ------------------------------------------------------------------------ Helper Utilities--- -----------------------------------------------------------------------{-# INLINE clientResponseJSON #-}-clientResponseJSON :: SClientMethod m -> (HasJSON (ResponseMessage m) => x) -> x-clientResponseJSON m x = case splitClientMethod m of-  IsClientReq -> x-  IsClientEither -> x--{-# INLINE serverResponseJSON #-}-serverResponseJSON :: SServerMethod m -> (HasJSON (ResponseMessage m) => x) -> x-serverResponseJSON m x = case splitServerMethod m of-  IsServerReq -> x-  IsServerEither -> x--{-# INLINE clientMethodJSON#-}-clientMethodJSON :: SClientMethod m -> (ToJSON (ClientMessage m) => x) -> x-clientMethodJSON m x =-  case splitClientMethod m of-    IsClientNot -> x-    IsClientReq -> x-    IsClientEither -> x--{-# INLINE serverMethodJSON #-}-serverMethodJSON :: SServerMethod m -> (ToJSON (ServerMessage m) => x) -> x-serverMethodJSON m x =-  case splitServerMethod m of-    IsServerNot -> x-    IsServerReq -> x-    IsServerEither -> x--type HasJSON a = (ToJSON a,FromJSON a,Eq a)---- Reify universal properties about Client/Server Messages--data ClientNotOrReq (m :: Method FromClient t) where-  IsClientNot-    :: ( HasJSON (ClientMessage m)-       , Message m ~ NotificationMessage m)-    => ClientNotOrReq (m :: Method FromClient Notification)-  IsClientReq-    :: forall (m :: Method FromClient Request).-    ( HasJSON (ClientMessage m)-    , HasJSON (ResponseMessage m)-    , Message m ~ RequestMessage m)-    => ClientNotOrReq m-  IsClientEither-    :: ClientNotOrReq CustomMethod--data ServerNotOrReq (m :: Method FromServer t) where-  IsServerNot-    :: ( HasJSON (ServerMessage m)-       , Message m ~ NotificationMessage m)-    => ServerNotOrReq (m :: Method FromServer Notification)-  IsServerReq-    :: forall (m :: Method FromServer Request).-    ( HasJSON (ServerMessage m)-    , HasJSON (ResponseMessage m)-    , Message m ~ RequestMessage m)-    => ServerNotOrReq m-  IsServerEither-    :: ServerNotOrReq CustomMethod--{-# INLINE splitClientMethod #-}-splitClientMethod :: SClientMethod m -> ClientNotOrReq m-splitClientMethod SInitialize = IsClientReq-splitClientMethod SInitialized = IsClientNot-splitClientMethod SShutdown = IsClientReq-splitClientMethod SExit = IsClientNot-splitClientMethod SWorkspaceDidChangeWorkspaceFolders = IsClientNot-splitClientMethod SWorkspaceDidChangeConfiguration = IsClientNot-splitClientMethod SWorkspaceDidChangeWatchedFiles = IsClientNot-splitClientMethod SWorkspaceSymbol = IsClientReq-splitClientMethod SWorkspaceExecuteCommand = IsClientReq-splitClientMethod SWindowWorkDoneProgressCancel = IsClientNot-splitClientMethod STextDocumentDidOpen = IsClientNot-splitClientMethod STextDocumentDidChange = IsClientNot-splitClientMethod STextDocumentWillSave = IsClientNot-splitClientMethod STextDocumentWillSaveWaitUntil = IsClientReq-splitClientMethod STextDocumentDidSave = IsClientNot-splitClientMethod STextDocumentDidClose = IsClientNot-splitClientMethod STextDocumentCompletion = IsClientReq-splitClientMethod SCompletionItemResolve = IsClientReq-splitClientMethod STextDocumentHover = IsClientReq-splitClientMethod STextDocumentSignatureHelp = IsClientReq-splitClientMethod STextDocumentDeclaration = IsClientReq-splitClientMethod STextDocumentDefinition = IsClientReq-splitClientMethod STextDocumentTypeDefinition = IsClientReq-splitClientMethod STextDocumentImplementation = IsClientReq-splitClientMethod STextDocumentReferences = IsClientReq-splitClientMethod STextDocumentDocumentHighlight = IsClientReq-splitClientMethod STextDocumentDocumentSymbol = IsClientReq-splitClientMethod STextDocumentCodeAction = IsClientReq-splitClientMethod STextDocumentCodeLens = IsClientReq-splitClientMethod SCodeLensResolve = IsClientReq-splitClientMethod STextDocumentDocumentLink = IsClientReq-splitClientMethod SDocumentLinkResolve = IsClientReq-splitClientMethod STextDocumentDocumentColor = IsClientReq-splitClientMethod STextDocumentColorPresentation = IsClientReq-splitClientMethod STextDocumentFormatting = IsClientReq-splitClientMethod STextDocumentRangeFormatting = IsClientReq-splitClientMethod STextDocumentOnTypeFormatting = IsClientReq-splitClientMethod STextDocumentRename = IsClientReq-splitClientMethod STextDocumentPrepareRename = IsClientReq-splitClientMethod STextDocumentFoldingRange = IsClientReq-splitClientMethod STextDocumentSelectionRange = IsClientReq-splitClientMethod STextDocumentPrepareCallHierarchy = IsClientReq-splitClientMethod SCallHierarchyIncomingCalls = IsClientReq-splitClientMethod SCallHierarchyOutgoingCalls = IsClientReq-splitClientMethod STextDocumentSemanticTokens = IsClientReq-splitClientMethod STextDocumentSemanticTokensFull = IsClientReq-splitClientMethod STextDocumentSemanticTokensFullDelta = IsClientReq-splitClientMethod STextDocumentSemanticTokensRange = IsClientReq-splitClientMethod SCancelRequest = IsClientNot-splitClientMethod SCustomMethod{} = IsClientEither--{-# INLINE splitServerMethod #-}-splitServerMethod :: SServerMethod m -> ServerNotOrReq m--- Window-splitServerMethod SWindowShowMessage = IsServerNot-splitServerMethod SWindowShowMessageRequest = IsServerReq-splitServerMethod SWindowShowDocument = IsServerReq-splitServerMethod SWindowLogMessage = IsServerNot-splitServerMethod SWindowWorkDoneProgressCreate = IsServerReq-splitServerMethod SProgress = IsServerNot-splitServerMethod STelemetryEvent = IsServerNot--- Client-splitServerMethod SClientRegisterCapability = IsServerReq-splitServerMethod SClientUnregisterCapability = IsServerReq--- Workspace-splitServerMethod SWorkspaceWorkspaceFolders = IsServerReq-splitServerMethod SWorkspaceConfiguration = IsServerReq-splitServerMethod SWorkspaceApplyEdit = IsServerReq-splitServerMethod SWorkspaceSemanticTokensRefresh = IsServerReq--- Document-splitServerMethod STextDocumentPublishDiagnostics = IsServerNot--- Cancelling-splitServerMethod SCancelRequest = IsServerNot--- Custom-splitServerMethod SCustomMethod{} = IsServerEither---- | Given a witness that two custom methods are of the same type, produce a witness that the methods are the same-data CustomEq m1 m2 where-  CustomEq-    :: (m1 ~ (CustomMethod :: Method f t1), m2 ~ (CustomMethod :: Method f t2))-    => { runCustomEq :: (t1 ~ t2 => m1 :~~: m2) }-    -> CustomEq m1 m2--runEq :: (t1 ~ t2)-      => (SMethod m1 -> SMethod m2 -> Maybe (Either (CustomEq m1 m2) (m1 :~~: m2)))-      -> SMethod (m1 :: Method f t1)-      -> SMethod (m2 :: Method f t2)-      -> Maybe (m1 :~~: m2)-runEq f m1 m2 = do-  res <- f m1 m2-  pure $ case res of-    Right eq -> eq-    Left ceq -> runCustomEq ceq---- | Heterogeneous equality on singleton server methods-mEqServer :: SServerMethod m1 -> SServerMethod m2 -> Maybe (Either (CustomEq m1 m2) (m1 :~~: m2))-mEqServer m1 m2 = go (splitServerMethod m1) (splitServerMethod m2)-  where-    go IsServerNot IsServerNot = do-      Refl <- geq m1 m2-      pure $ Right HRefl-    go IsServerReq IsServerReq = do-      Refl <- geq m1 m2-      pure $ Right HRefl-    go IsServerEither IsServerEither-      | SCustomMethod c1 <- m1-      , SCustomMethod c2 <- m2-      , c1 == c2-      = Just $ Left $ CustomEq HRefl-    go _ _ = Nothing---- | Heterogeneous equality on singleton client methods-mEqClient :: SClientMethod m1 -> SClientMethod m2 -> Maybe (Either (CustomEq m1 m2) (m1 :~~: m2))-mEqClient m1 m2 = go (splitClientMethod m1) (splitClientMethod m2)-  where-    go IsClientNot IsClientNot = do-      Refl <- geq m1 m2-      pure $ Right HRefl-    go IsClientReq IsClientReq = do-      Refl <- geq m1 m2-      pure $ Right HRefl-    go IsClientEither IsClientEither-      | SCustomMethod c1 <- m1-      , SCustomMethod c2 <- m2-      , c1 == c2-      = Just $ Left $ CustomEq HRefl-    go _ _ = Nothing
− src/Language/LSP/Types/Progress.hs
@@ -1,214 +0,0 @@-{-# LANGUAGE TemplateHaskell            #-}-{-# LANGUAGE DuplicateRecordFields      #-}-{-# LANGUAGE DeriveFunctor              #-}-{-# LANGUAGE RecordWildCards            #-}-{-# LANGUAGE OverloadedStrings          #-}--module Language.LSP.Types.Progress where--import           Control.Monad (unless)-import qualified Data.Aeson as A-import           Data.Aeson.TH-import           Data.Maybe (catMaybes)-import           Data.Text (Text)-import           Language.LSP.Types.Common-import           Language.LSP.Types.Utils---- | A token used to report progress back or return partial results for a--- specific request.--- @since 0.17.0.0-data ProgressToken-    = ProgressNumericToken Int32-    | ProgressTextToken Text-    deriving (Show, Read, Eq, Ord)--deriveJSON lspOptionsUntagged ''ProgressToken---- | Parameters for a $/progress notification.-data ProgressParams t =-    ProgressParams {-      _token :: ProgressToken-    , _value :: t-    } deriving (Show, Read, Eq, Functor)--deriveJSON lspOptions ''ProgressParams---- | Parameters for 'WorkDoneProgressBeginNotification'.------ @since 0.10.0.0-data WorkDoneProgressBeginParams =-  WorkDoneProgressBeginParams {-  -- | Mandatory title of the progress operation.-  -- Used to briefly inform about the kind of operation being-  -- performed. Examples: "Indexing" or "Linking dependencies".-   _title :: Text-  -- | Controls if a cancel button should show to allow the user to cancel the-  -- long running operation. Clients that don't support cancellation are allowed-  -- to ignore the setting.-  , _cancellable :: Maybe Bool-  -- | Optional, more detailed associated progress-  -- message. Contains complementary information to the-  -- '_title'. Examples: "3/25 files",-  -- "project/src/module2", "node_modules/some_dep". If-  -- unset, the previous progress message (if any) is-  -- still valid.-  , _message :: Maybe Text-  -- | Optional progress percentage to display (value 100 is considered 100%).-  -- If not provided infinite progress is assumed and clients are allowed-  -- to ignore the '_percentage' value in subsequent in report notifications.-  ---  -- The value should be steadily rising. Clients are free to ignore values-  -- that are not following this rule.-  , _percentage :: Maybe UInt-  } deriving (Show, Read, Eq)--instance A.ToJSON WorkDoneProgressBeginParams where-    toJSON WorkDoneProgressBeginParams{..} =-        A.object $ catMaybes-            [ Just $ "kind" A..= ("begin" :: Text)-            , Just $ "title" A..= _title-            , ("cancellable" A..=) <$> _cancellable-            , ("message" A..=) <$> _message-            , ("percentage" A..=) <$> _percentage-            ]--instance A.FromJSON WorkDoneProgressBeginParams where-    parseJSON = A.withObject "WorkDoneProgressBegin" $ \o -> do-        kind <- o A..: "kind"-        unless (kind == ("begin" :: Text)) $ fail $ "Expected kind \"begin\" but got " ++ show kind-        _title <- o A..: "title"-        _cancellable <- o A..:? "cancellable"-        _message <- o A..:? "message"-        _percentage <- o A..:? "percentage"-        pure WorkDoneProgressBeginParams{..}---- The $/progress begin notification is sent from the server to the--- client to ask the client to start progress.------ @since 0.10.0.0---- | Parameters for 'WorkDoneProgressReportNotification'------ @since 0.10.0.0-data WorkDoneProgressReportParams =-  WorkDoneProgressReportParams {-    _cancellable :: Maybe Bool-  -- | Optional, more detailed associated progress-  -- message. Contains complementary information to the-  -- '_title'. Examples: "3/25 files",-  -- "project/src/module2", "node_modules/some_dep". If-  -- unset, the previous progress message (if any) is-  -- still valid.-  , _message :: Maybe Text-  -- | Optional progress percentage to display (value 100 is considered 100%).-  -- If infinite progress was indicated in the start notification client-  -- are allowed to ignore the value. In addition the value should be steadily-  -- rising. Clients are free to ignore values that are not following this rule.-  , _percentage :: Maybe UInt-  } deriving (Show, Read, Eq)--instance A.ToJSON WorkDoneProgressReportParams where-  toJSON WorkDoneProgressReportParams{..} =-    A.object $ catMaybes-      [ Just $ "kind" A..= ("report" :: Text)-      , ("cancellable" A..=) <$> _cancellable-      , ("message" A..=) <$> _message-      , ("percentage" A..=) <$> _percentage-      ]--instance A.FromJSON WorkDoneProgressReportParams where-  parseJSON = A.withObject "WorkDoneProgressReport" $ \o -> do-    kind <- o A..: "kind"-    unless (kind == ("report" :: Text)) $ fail $ "Expected kind \"report\" but got " ++ show kind-    _cancellable <- o A..:? "cancellable"-    _message <- o A..:? "message"-    _percentage <- o A..:? "percentage"-    pure WorkDoneProgressReportParams{..}---- The workdone $/progress report notification is sent from the server to the--- client to report progress for a previously started progress.------ @since 0.10.0.0---- | Parameters for 'WorkDoneProgressEndNotification'.------ @since 0.10.0.0-data WorkDoneProgressEndParams =-  WorkDoneProgressEndParams {-    _message   :: Maybe Text-  } deriving (Show, Read, Eq)--instance A.ToJSON WorkDoneProgressEndParams where-  toJSON WorkDoneProgressEndParams{..} =-    A.object $ catMaybes-      [ Just $ "kind" A..= ("end" :: Text)-      , ("message" A..=) <$> _message-      ]--instance A.FromJSON WorkDoneProgressEndParams where-  parseJSON = A.withObject "WorkDoneProgressEnd" $ \o -> do-    kind <- o A..: "kind"-    unless (kind == ("end" :: Text)) $ fail $ "Expected kind \"end\" but got " ++ show kind-    _message <- o A..:? "message"-    pure WorkDoneProgressEndParams{..}----  The $/progress end notification is sent from the server to the--- client to stop a previously started progress.------ @since 0.10.0.0---- | Parameters for 'WorkDoneProgressCancelNotification'.------ @since 0.10.0.0-data WorkDoneProgressCancelParams =-  WorkDoneProgressCancelParams {-  -- | A unique identifier to associate multiple progress-  -- notifications with the same progress.-    _token   :: ProgressToken-  } deriving (Show, Read, Eq)--deriveJSON lspOptions ''WorkDoneProgressCancelParams---- The window/workDoneProgress/cancel notification is sent from the client to the server--- to inform the server that the user has pressed the cancel button on the progress UX.--- A server receiving a cancel request must still close a progress using the done notification.------ @since 0.10.0.0--data WorkDoneProgressCreateParams =-      WorkDoneProgressCreateParams {-      _token :: ProgressToken-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''WorkDoneProgressCreateParams--data WorkDoneProgressOptions =-  WorkDoneProgressOptions-    { _workDoneProgress :: Maybe Bool-    }-  deriving (Read, Show, Eq)--deriveJSON lspOptions ''WorkDoneProgressOptions--data WorkDoneProgressParams =-  WorkDoneProgressParams-    { -- | An optional token that a server can use to report work done progress-      _workDoneToken :: Maybe ProgressToken-    } deriving (Read,Show,Eq)-deriveJSON lspOptions ''WorkDoneProgressParams--data SomeProgressParams-  = Begin WorkDoneProgressBeginParams-  | Report WorkDoneProgressReportParams-  | End WorkDoneProgressEndParams-  deriving Eq--deriveJSON lspOptionsUntagged ''SomeProgressParams--data PartialResultParams =-  PartialResultParams-    { -- | An optional token that a server can use to report partial results-      --  (e.g. streaming) to the client.-      _partialResultToken :: Maybe ProgressToken-    } deriving (Read,Show,Eq)-deriveJSON lspOptions ''PartialResultParams
− src/Language/LSP/Types/References.hs
@@ -1,43 +0,0 @@-{-# LANGUAGE TemplateHaskell       #-}-{-# LANGUAGE DuplicateRecordFields #-}--- | Find References Request--- https://microsoft.github.io/language-server-protocol/specifications/specification-3-15/#textDocument_references-module Language.LSP.Types.References where--import Data.Aeson.TH--import Language.LSP.Types.TextDocument-import Language.LSP.Types.Progress-import Language.LSP.Types.Utils--data ReferencesClientCapabilities =-  ReferencesClientCapabilities-    { -- | Whether references supports dynamic registration.-      _dynamicRegistration :: Maybe Bool-    } deriving (Show, Read, Eq)-deriveJSON lspOptions ''ReferencesClientCapabilities--makeExtendingDatatype "ReferenceOptions" [''WorkDoneProgressOptions] []-deriveJSON lspOptions ''ReferenceOptions--makeExtendingDatatype "ReferenceRegistrationOptions"-  [ ''TextDocumentRegistrationOptions-  , ''ReferenceOptions-  ]-  []-deriveJSON lspOptions ''ReferenceRegistrationOptions--data ReferenceContext =-  ReferenceContext-    { -- | Include the declaration of the current symbol.-      _includeDeclaration :: Bool-    } deriving (Read,Show,Eq)-deriveJSON lspOptions ''ReferenceContext--makeExtendingDatatype "ReferenceParams"-  [ ''TextDocumentPositionParams-  , ''WorkDoneProgressParams-  , ''PartialResultParams-  ]-  [("_context", [t| ReferenceContext |])]-deriveJSON lspOptions ''ReferenceParams
− src/Language/LSP/Types/Registration.hs
@@ -1,179 +0,0 @@-{-# LANGUAGE GADTs #-}-{-# LANGUAGE TypeApplications #-}-{-# LANGUAGE TypeFamilyDependencies #-}-{-# LANGUAGE ExistentialQuantification #-}-{-# LANGUAGE TypeFamilies #-}-{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE UndecidableInstances #-}-{-# LANGUAGE RankNTypes #-}-{-# LANGUAGE TypeInType #-}-{-# LANGUAGE TypeOperators #-}-{-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE StandaloneDeriving #-}-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE DeriveAnyClass #-}-{-# LANGUAGE ScopedTypeVariables #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE DuplicateRecordFields #-}--{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}-{-# OPTIONS_GHC -Werror=incomplete-patterns #-}--module Language.LSP.Types.Registration where--import           Data.Aeson-import           Data.Aeson.TH-import           Data.Text (Text)-import           Data.Function (on)-import           Data.Kind-import           Data.Void (Void)-import           GHC.Generics-import           Language.LSP.Types.CallHierarchy-import           Language.LSP.Types.CodeAction-import           Language.LSP.Types.CodeLens-import           Language.LSP.Types.Command-import           Language.LSP.Types.Common-import           Language.LSP.Types.Completion-import           Language.LSP.Types.Declaration-import           Language.LSP.Types.Definition-import           Language.LSP.Types.DocumentColor-import           Language.LSP.Types.DocumentHighlight-import           Language.LSP.Types.DocumentLink-import           Language.LSP.Types.DocumentSymbol-import           Language.LSP.Types.FoldingRange-import           Language.LSP.Types.Formatting-import           Language.LSP.Types.Hover-import           Language.LSP.Types.Implementation-import           Language.LSP.Types.Method-import           Language.LSP.Types.References-import           Language.LSP.Types.Rename-import           Language.LSP.Types.SignatureHelp-import           Language.LSP.Types.SelectionRange-import           Language.LSP.Types.SemanticTokens-import           Language.LSP.Types.TextDocument-import           Language.LSP.Types.TypeDefinition-import           Language.LSP.Types.Utils-import           Language.LSP.Types.WatchedFiles-import           Language.LSP.Types.WorkspaceSymbol----- ------------------------------------------------------------------------- | Matches up the registration options for a specific method-type family RegistrationOptions (m :: Method FromClient t) :: Type where-  -- Workspace-  RegistrationOptions WorkspaceDidChangeWorkspaceFolders = Empty-  RegistrationOptions WorkspaceDidChangeConfiguration    = Empty-  RegistrationOptions WorkspaceDidChangeWatchedFiles     = DidChangeWatchedFilesRegistrationOptions-  RegistrationOptions WorkspaceSymbol                    = WorkspaceSymbolRegistrationOptions-  RegistrationOptions WorkspaceExecuteCommand            = ExecuteCommandRegistrationOptions--  -- Text synchronisation-  RegistrationOptions TextDocumentDidOpen                = TextDocumentRegistrationOptions-  RegistrationOptions TextDocumentDidChange              = TextDocumentChangeRegistrationOptions-  RegistrationOptions TextDocumentWillSave               = TextDocumentRegistrationOptions-  RegistrationOptions TextDocumentWillSaveWaitUntil      = TextDocumentRegistrationOptions-  RegistrationOptions TextDocumentDidSave                = TextDocumentSaveRegistrationOptions-  RegistrationOptions TextDocumentDidClose               = TextDocumentRegistrationOptions--  -- Language features-  RegistrationOptions TextDocumentCompletion             = CompletionRegistrationOptions-  RegistrationOptions TextDocumentHover                  = HoverRegistrationOptions-  RegistrationOptions TextDocumentSignatureHelp          = SignatureHelpRegistrationOptions-  RegistrationOptions TextDocumentDeclaration            = DeclarationRegistrationOptions-  RegistrationOptions TextDocumentDefinition             = DefinitionRegistrationOptions-  RegistrationOptions TextDocumentTypeDefinition         = TypeDefinitionRegistrationOptions-  RegistrationOptions TextDocumentImplementation         = ImplementationRegistrationOptions-  RegistrationOptions TextDocumentReferences             = ReferenceRegistrationOptions-  RegistrationOptions TextDocumentDocumentHighlight      = DocumentHighlightRegistrationOptions-  RegistrationOptions TextDocumentDocumentSymbol         = DocumentSymbolRegistrationOptions-  RegistrationOptions TextDocumentCodeAction             = CodeActionRegistrationOptions-  RegistrationOptions TextDocumentCodeLens               = CodeLensRegistrationOptions-  RegistrationOptions TextDocumentDocumentLink           = DocumentLinkRegistrationOptions-  RegistrationOptions TextDocumentDocumentColor          = DocumentColorRegistrationOptions-  RegistrationOptions TextDocumentFormatting             = DocumentFormattingRegistrationOptions-  RegistrationOptions TextDocumentRangeFormatting        = DocumentRangeFormattingRegistrationOptions-  RegistrationOptions TextDocumentOnTypeFormatting       = DocumentOnTypeFormattingRegistrationOptions-  RegistrationOptions TextDocumentRename                 = RenameRegistrationOptions-  RegistrationOptions TextDocumentFoldingRange           = FoldingRangeRegistrationOptions-  RegistrationOptions TextDocumentSelectionRange         = SelectionRangeRegistrationOptions-  RegistrationOptions TextDocumentPrepareCallHierarchy   = CallHierarchyRegistrationOptions-  RegistrationOptions TextDocumentSemanticTokens         = SemanticTokensRegistrationOptions-  RegistrationOptions m                                  = Void--data Registration (m :: Method FromClient t) =-  Registration-    { -- | The id used to register the request. The id can be used to deregister-      -- the request again.-      _id :: Text-      -- | The method / capability to register for.-    , _method :: SClientMethod m-      -- | Options necessary for the registration.-      -- Make this strict to aid the pattern matching exhaustiveness checker-    , _registerOptions :: !(RegistrationOptions m)-    }-  deriving Generic--deriving instance Eq (RegistrationOptions m) => Eq (Registration m)-deriving instance Show (RegistrationOptions m) => Show (Registration m)---- This generates the function--- regHelper :: SMethod m---           -> (( Show (RegistrationOptions m)---               , ToJSON (RegistrationOptions m)---               , FromJSON ($regOptTcon m)---              => x)---           -> x-makeRegHelper ''RegistrationOptions--instance ToJSON (Registration m) where-  toJSON x@(Registration _ m _) = regHelper m (genericToJSON lspOptions x)--data SomeRegistration = forall t (m :: Method FromClient t). SomeRegistration (Registration m)--instance ToJSON SomeRegistration where-  toJSON (SomeRegistration r) = toJSON r--instance FromJSON SomeRegistration where-  parseJSON = withObject "Registration" $ \o -> do-    SomeClientMethod m <- o .: "method"-    r <- Registration <$> o .: "id" <*> pure m <*> regHelper m (o .: "registerOptions")-    pure (SomeRegistration r)--instance Eq SomeRegistration where-  (==) = (==) `on` toJSON--instance Show SomeRegistration where-  show (SomeRegistration r@(Registration _ m _)) = regHelper m (show r)--data RegistrationParams =-  RegistrationParams { _registrations :: List SomeRegistration }-  deriving (Show, Eq)--deriveJSON lspOptions ''RegistrationParams----- ------------------------------------------------------------------------- | General parameters to unregister a capability.-data Unregistration =-  Unregistration-    { -- | The id used to unregister the request or notification. Usually an id-      -- provided during the register request.-      _id     :: Text-      -- | The method / capability to unregister for.-    , _method :: SomeClientMethod-    } deriving (Show, Eq)--deriveJSON lspOptions ''Unregistration--data UnregistrationParams =-  UnregistrationParams-    { -- | This should correctly be named @unregistrations@. However changing this-      -- is a breaking change and needs to wait until we deliver a 4.x version-      -- of the specification.-      _unregisterations :: List Unregistration-    } deriving (Show, Eq)--deriveJSON lspOptions ''UnregistrationParams
− src/Language/LSP/Types/Rename.hs
@@ -1,85 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE DuplicateRecordFields #-}--module Language.LSP.Types.Rename where--import Data.Aeson-import Data.Aeson.TH-import Data.Text (Text)-import Data.Scientific (Scientific)--import Language.LSP.Types.Location-import Language.LSP.Types.TextDocument-import Language.LSP.Types.Progress-import Language.LSP.Types.Utils--data PrepareSupportDefaultBehavior =-  PsIdentifier |-  PsUnknown Scientific-  deriving (Read, Show, Eq)--instance ToJSON PrepareSupportDefaultBehavior where-  toJSON PsIdentifier  = Number 1-  toJSON (PsUnknown i) = Number i--instance FromJSON PrepareSupportDefaultBehavior where-  parseJSON (Number 1) = pure PsIdentifier-  parseJSON _          = fail "PrepareSupportDefaultBehavior"--data RenameClientCapabilities =-  RenameClientCapabilities-    { -- | Whether rename supports dynamic registration.-      _dynamicRegistration :: Maybe Bool-      -- | Client supports testing for validity of rename operations-      -- before execution.-      ---      -- Since LSP 3.12.0-    , _prepareSupport :: Maybe Bool-      -- | Client supports the default behavior result-      -- (`{ defaultBehavior: boolean }`).-      ---      -- The value indicates the default behavior used by the client.-      ---      -- @since 3.16.0-    , prepareSupportDefaultBehavior :: Maybe PrepareSupportDefaultBehavior-      -- | Whether the client honors the change annotations in-      -- text edits and resource operations returned via the-      -- rename request's workspace edit by for example presenting-      -- the workspace edit in the user interface and asking-      -- for confirmation.-      ---      -- @since 3.16.0-    , honorsChangeAnnotations :: Maybe Bool-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''RenameClientCapabilities--makeExtendingDatatype "RenameOptions" [''WorkDoneProgressOptions]-  [("_prepareProvider", [t| Maybe Bool |])]-deriveJSON lspOptions ''RenameOptions--makeExtendingDatatype "RenameRegistrationOptions"-  [ ''TextDocumentRegistrationOptions-  , ''RenameOptions-  ] []-deriveJSON lspOptions ''RenameRegistrationOptions--makeExtendingDatatype "RenameParams"-  [ ''TextDocumentPositionParams-  , ''WorkDoneProgressParams-  ]-  [("_newName", [t| Text |])]-deriveJSON lspOptions ''RenameParams---- -------------------------------------------makeExtendingDatatype "PrepareRenameParams" [''TextDocumentPositionParams] []-deriveJSON lspOptions ''PrepareRenameParams--data RangeWithPlaceholder =-  RangeWithPlaceholder-  {-    _range :: Range-  , _placeholder :: Text-  } deriving Eq-deriveJSON lspOptions ''RangeWithPlaceholder
− src/Language/LSP/Types/SMethodMap.hs
@@ -1,71 +0,0 @@-{-# LANGUAGE DataKinds  #-}-{-# LANGUAGE GADTs      #-}-{-# LANGUAGE MagicHash  #-}-{-# LANGUAGE PolyKinds  #-}-{-# LANGUAGE RankNTypes #-}--module Language.LSP.Types.SMethodMap-  ( SMethodMap-  , singleton-  , insert-  , delete-  , member-  , lookup-  , map-  ) where--import Prelude hiding (lookup, map)-import Data.IntMap (IntMap)-import qualified Data.IntMap.Strict as IntMap-import Data.Kind (Type)-import Data.Map (Map)-import qualified Data.Map.Strict as Map-import Data.Text (Text)-import GHC.Exts (Int(..), dataToTag#, Any)-import Unsafe.Coerce (unsafeCoerce)--import Language.LSP.Types.Method (Method(..), SMethod(..))---- This type exists to avoid a dependency on 'dependent-map'. It is less--- safe (since we use 'unsafeCoerce') but much simpler and hence easier to include.--- | A specialized alternative to a full dependent map for use with 'SMethod'.-data SMethodMap (v :: Method f t -> Type) =-  -- This works by using an 'IntMap' indexed by constructor tag for the majority-  -- of 'SMethod's, which have no parameters, and hence can only appear once as keys-  -- in the map. We do not attempt to be truly dependent here, and instead exploit-  -- 'usafeCoerce' to go to and from 'v Any'.-  -- The sole exception is 'SCustomMethod', for which we keep a separate map from-  -- its 'Text' parameter (and where we can get the type indices right).-  SMethodMap !(IntMap (v Any)) !(Map Text (v 'CustomMethod))--toIx :: SMethod a -> Int-toIx k = I# (dataToTag# k)--singleton :: SMethod a -> v a -> SMethodMap v-singleton (SCustomMethod t) v = SMethodMap mempty (Map.singleton t v)-singleton k v = SMethodMap (IntMap.singleton (toIx k) (unsafeCoerce v)) mempty--insert :: SMethod a -> v a -> SMethodMap v -> SMethodMap v-insert (SCustomMethod t) v (SMethodMap xs ys) = SMethodMap xs (Map.insert t v ys)-insert k v (SMethodMap xs ys) = SMethodMap (IntMap.insert (toIx k) (unsafeCoerce v) xs) ys--delete :: SMethod a -> SMethodMap v -> SMethodMap v-delete (SCustomMethod t) (SMethodMap xs ys) = SMethodMap xs (Map.delete t ys)-delete k (SMethodMap xs ys) = SMethodMap (IntMap.delete (toIx k) xs) ys--member :: SMethod a -> SMethodMap v -> Bool-member (SCustomMethod t) (SMethodMap _ ys) = Map.member t ys-member k (SMethodMap xs _) = IntMap.member (toIx k) xs--lookup :: SMethod a -> SMethodMap v -> Maybe (v a)-lookup (SCustomMethod t) (SMethodMap _ ys) = Map.lookup t ys-lookup k (SMethodMap xs _) = unsafeCoerce (IntMap.lookup (toIx k) xs)--map :: (forall a. u a -> v a) -> SMethodMap u -> SMethodMap v-map f (SMethodMap xs ys) = SMethodMap (IntMap.map f xs) (Map.map f ys)--instance Semigroup (SMethodMap v) where-  SMethodMap xs ys <> SMethodMap xs' ys' = SMethodMap (xs <> xs') (ys <> ys')--instance Monoid (SMethodMap v) where-  mempty = SMethodMap mempty mempty
− src/Language/LSP/Types/SelectionRange.hs
@@ -1,54 +0,0 @@-{-# LANGUAGE DuplicateRecordFields #-}-{-# LANGUAGE TemplateHaskell #-}--module Language.LSP.Types.SelectionRange where--import Data.Aeson.TH-import Language.LSP.Types.Common-import Language.LSP.Types.Location-import Language.LSP.Types.Progress-import Language.LSP.Types.StaticRegistrationOptions-import Language.LSP.Types.TextDocument-import Language.LSP.Types.Utils--data SelectionRangeClientCapabilities = SelectionRangeClientCapabilities-  { -- | Whether implementation supports dynamic registration for selection range providers. If this is set to 'True'-    -- the client supports the new 'SelectionRangeRegistrationOptions' return value for the corresponding server-    -- capability as well.-    _dynamicRegistration :: Maybe Bool-  }-  deriving (Read, Show, Eq)--deriveJSON lspOptions ''SelectionRangeClientCapabilities--makeExtendingDatatype "SelectionRangeOptions" [''WorkDoneProgressOptions] []-deriveJSON lspOptions ''SelectionRangeOptions--makeExtendingDatatype-  "SelectionRangeRegistrationOptions"-  [ ''SelectionRangeOptions,-    ''TextDocumentRegistrationOptions,-    ''StaticRegistrationOptions-  ]-  []-deriveJSON lspOptions ''SelectionRangeRegistrationOptions--makeExtendingDatatype-  "SelectionRangeParams"-  [ ''WorkDoneProgressParams,-    ''PartialResultParams-  ]-  [ ("_textDocument", [t|TextDocumentIdentifier|]),-    ("_positions", [t|List Position|])-  ]-deriveJSON lspOptions ''SelectionRangeParams--data SelectionRange = SelectionRange-  { -- | The 'range' of this selection range.-    _range :: Range,-    -- | The parent selection range containing this range. Therefore @parent.range@ must contain @this.range@.-    _parent :: Maybe SelectionRange-  }-  deriving (Read, Show, Eq)--deriveJSON lspOptions ''SelectionRange
− src/Language/LSP/Types/SemanticTokens.hs
@@ -1,500 +0,0 @@-{-# LANGUAGE DuplicateRecordFields #-}-{-# LANGUAGE OverloadedLists       #-}-{-# LANGUAGE OverloadedStrings     #-}-{-# LANGUAGE ScopedTypeVariables   #-}-{-# LANGUAGE TemplateHaskell       #-}-module Language.LSP.Types.SemanticTokens where--import qualified Data.Aeson                                   as A-import           Data.Aeson.TH-import           Data.Text                                    (Text)--import           Control.Monad.Except--import           Language.LSP.Types.Common-import           Language.LSP.Types.Location-import           Language.LSP.Types.Progress-import           Language.LSP.Types.StaticRegistrationOptions-import           Language.LSP.Types.TextDocument-import           Language.LSP.Types.Utils--import qualified Data.Algorithm.Diff                          as Diff-import qualified Data.Bits                                    as Bits-import qualified Data.DList                                   as DList-import           Data.Default-import           Data.Foldable                                hiding (length)-import qualified Data.Map                                     as Map-import           Data.Maybe                                   (fromMaybe,-                                                               maybeToList)-import           Data.String--data SemanticTokenTypes =-  SttNamespace-  | SttType-  | SttClass-  | SttEnum-  | SttInterface-  | SttStruct-  | SttTypeParameter-  | SttParameter-  | SttVariable-  | SttProperty-  | SttEnumMember-  | SttEvent-  | SttFunction-  | SttMethod-  | SttMacro-  | SttKeyword-  | SttModifier-  | SttComment-  | SttString-  | SttNumber-  | SttRegexp-  | SttOperator-  | SttUnknown Text-  deriving (Show, Read, Eq, Ord)--instance A.ToJSON SemanticTokenTypes where-  toJSON SttNamespace     = A.String "namespace"-  toJSON SttType          = A.String "type"-  toJSON SttClass         = A.String "class"-  toJSON SttEnum          = A.String "enum"-  toJSON SttInterface     = A.String "interface"-  toJSON SttStruct        = A.String "struct"-  toJSON SttTypeParameter = A.String "typeParameter"-  toJSON SttParameter     = A.String "parameter"-  toJSON SttVariable      = A.String "variable"-  toJSON SttProperty      = A.String "property"-  toJSON SttEnumMember    = A.String "enumMember"-  toJSON SttEvent         = A.String "event"-  toJSON SttFunction      = A.String "function"-  toJSON SttMethod        = A.String "method"-  toJSON SttMacro         = A.String "macro"-  toJSON SttKeyword       = A.String "keyword"-  toJSON SttModifier      = A.String "modifier"-  toJSON SttComment       = A.String "comment"-  toJSON SttString        = A.String "string"-  toJSON SttNumber        = A.String "number"-  toJSON SttRegexp        = A.String "regexp"-  toJSON SttOperator      = A.String "operator"-  toJSON (SttUnknown t)   = A.String t--instance A.FromJSON SemanticTokenTypes where-  parseJSON (A.String "namespace")     = pure SttNamespace-  parseJSON (A.String "type")          = pure SttType-  parseJSON (A.String "class")         = pure SttClass-  parseJSON (A.String "enum")          = pure SttEnum-  parseJSON (A.String "interface")     = pure SttInterface-  parseJSON (A.String "struct")        = pure SttStruct-  parseJSON (A.String "typeParameter") = pure SttTypeParameter-  parseJSON (A.String "parameter")     = pure SttParameter-  parseJSON (A.String "variable")      = pure SttVariable-  parseJSON (A.String "property")      = pure SttProperty-  parseJSON (A.String "enumMember")    = pure SttEnumMember-  parseJSON (A.String "event")         = pure SttEvent-  parseJSON (A.String "function")      = pure SttFunction-  parseJSON (A.String "method")        = pure SttMethod-  parseJSON (A.String "macro")         = pure SttMacro-  parseJSON (A.String "keyword")       = pure SttKeyword-  parseJSON (A.String "modifier")      = pure SttModifier-  parseJSON (A.String "comment")       = pure SttComment-  parseJSON (A.String "string")        = pure SttString-  parseJSON (A.String "number")        = pure SttNumber-  parseJSON (A.String "regexp")        = pure SttRegexp-  parseJSON (A.String "operator")      = pure SttOperator-  parseJSON (A.String t)               = pure $ SttUnknown t-  parseJSON _                          = mempty---- | The set of semantic token types which are "known" (i.e. listed in the LSP spec).-knownSemanticTokenTypes :: [SemanticTokenTypes]-knownSemanticTokenTypes = [-  SttNamespace-  , SttType-  , SttClass-  , SttEnum-  , SttInterface-  , SttStruct-  , SttTypeParameter-  , SttParameter-  , SttVariable-  , SttProperty-  , SttEnumMember-  , SttEvent-  , SttFunction-  , SttMethod-  , SttMacro-  , SttKeyword-  , SttModifier-  , SttComment-  , SttString-  , SttNumber-  , SttRegexp-  , SttOperator-  ]--data SemanticTokenModifiers =-  StmDeclaration-  | StmDefinition-  | StmReadonly-  | StmStatic-  | StmDeprecated-  | StmAbstract-  | StmAsync-  | StmModification-  | StmDocumentation-  | StmDefaultLibrary-  | StmUnknown Text-  deriving (Show, Read, Eq, Ord)--instance A.ToJSON SemanticTokenModifiers where-  toJSON StmDeclaration    = A.String "declaration"-  toJSON StmDefinition     = A.String "definition"-  toJSON StmReadonly       = A.String "readonly"-  toJSON StmStatic         = A.String "static"-  toJSON StmDeprecated     = A.String "deprecated"-  toJSON StmAbstract       = A.String "abstract"-  toJSON StmAsync          = A.String "async"-  toJSON StmModification   = A.String "modification"-  toJSON StmDocumentation  = A.String "documentation"-  toJSON StmDefaultLibrary = A.String "defaultLibrary"-  toJSON (StmUnknown t)    = A.String t--instance A.FromJSON SemanticTokenModifiers where-  parseJSON (A.String "declaration")    = pure StmDeclaration-  parseJSON (A.String "definition")     = pure StmDefinition-  parseJSON (A.String "readonly")       = pure StmReadonly-  parseJSON (A.String "static")         = pure StmStatic-  parseJSON (A.String "deprecated")     = pure StmDeprecated-  parseJSON (A.String "abstract")       = pure StmAbstract-  parseJSON (A.String "async")          = pure StmAsync-  parseJSON (A.String "modification")   = pure StmModification-  parseJSON (A.String "documentation")  = pure StmDocumentation-  parseJSON (A.String "defaultLibrary") = pure StmDefaultLibrary-  parseJSON (A.String t)                = pure $ StmUnknown t-  parseJSON _                           = mempty---- | The set of semantic token modifiers which are "known" (i.e. listed in the LSP spec).-knownSemanticTokenModifiers :: [SemanticTokenModifiers]-knownSemanticTokenModifiers = [-  StmDeclaration-  , StmDefinition-  , StmReadonly-  , StmStatic-  , StmDeprecated-  , StmAbstract-  , StmAsync-  , StmModification-  , StmDocumentation-  , StmDefaultLibrary-  ]--data TokenFormat = TokenFormatRelative-  deriving (Show, Read, Eq)--instance A.ToJSON TokenFormat where-  toJSON TokenFormatRelative = A.String "relative"--instance A.FromJSON TokenFormat where-  parseJSON (A.String "relative") = pure TokenFormatRelative-  parseJSON _                     = mempty--data SemanticTokensLegend = SemanticTokensLegend {-  -- | The token types a server uses.-  _tokenTypes     :: List SemanticTokenTypes,-  -- | The token modifiers a server uses.-  _tokenModifiers :: List SemanticTokenModifiers-} deriving (Show, Read, Eq)-deriveJSON lspOptions ''SemanticTokensLegend---- We give a default legend which just lists the "known" types and modifiers in the order they're listed.-instance Default SemanticTokensLegend where-  def = SemanticTokensLegend (List knownSemanticTokenTypes) (List knownSemanticTokenModifiers)--data SemanticTokensRangeClientCapabilities = SemanticTokensRangeBool Bool | SemanticTokensRangeObj A.Value-  deriving (Show, Read, Eq)-deriveJSON lspOptionsUntagged ''SemanticTokensRangeClientCapabilities--data SemanticTokensDeltaClientCapabilities = SemanticTokensDeltaClientCapabilities {-  -- | The client will send the `textDocument/semanticTokens/full/delta`-  -- request if the server provides a corresponding handler.-  _delta :: Maybe Bool-} deriving (Show, Read, Eq)-deriveJSON lspOptions ''SemanticTokensDeltaClientCapabilities--data SemanticTokensFullClientCapabilities = SemanticTokensFullBool Bool | SemanticTokensFullDelta SemanticTokensDeltaClientCapabilities-  deriving (Show, Read, Eq)-deriveJSON lspOptionsUntagged ''SemanticTokensFullClientCapabilities--data SemanticTokensRequestsClientCapabilities = SemanticTokensRequestsClientCapabilities {-  -- | The client will send the `textDocument/semanticTokens/range` request-  -- if the server provides a corresponding handler.-  _range :: Maybe SemanticTokensRangeClientCapabilities,-  -- | The client will send the `textDocument/semanticTokens/full` request-  -- if the server provides a corresponding handler.-  _full  :: Maybe SemanticTokensFullClientCapabilities-} deriving (Show, Read, Eq)-deriveJSON lspOptions ''SemanticTokensRequestsClientCapabilities--data SemanticTokensClientCapabilities = SemanticTokensClientCapabilities {-  -- | Whether implementation supports dynamic registration. If this is set to-  -- `true` the client supports the new `(TextDocumentRegistrationOptions &-  -- StaticRegistrationOptions)` return value for the corresponding server-  -- capability as well.-  _dynamicRegistration     :: Maybe Bool,--  -- | Which requests the client supports and might send to the server-  -- depending on the server's capability. Please note that clients might not-  -- show semantic tokens or degrade some of the user experience if a range-  -- or full request is advertised by the client but not provided by the-  -- server. If for example the client capability `requests.full` and-  -- `request.range` are both set to true but the server only provides a-  -- range provider the client might not render a minimap correctly or might-  -- even decide to not show any semantic tokens at all.-  _requests                :: SemanticTokensRequestsClientCapabilities,--  -- | The token types that the client supports.-  _tokenTypes              :: List SemanticTokenTypes,--  -- | The token modifiers that the client supports.-  _tokenModifiers          :: List SemanticTokenModifiers,--  -- | The formats the clients supports.-  _formats                 :: List TokenFormat,--  -- | Whether the client supports tokens that can overlap each other.-  _overlappingTokenSupport :: Maybe Bool,--  -- | Whether the client supports tokens that can span multiple lines.-  _multilineTokenSupport   :: Maybe Bool-} deriving (Show, Read, Eq)-deriveJSON lspOptions ''SemanticTokensClientCapabilities--makeExtendingDatatype "SemanticTokensOptions" [''WorkDoneProgressOptions]-  [ ("_legend", [t| SemanticTokensLegend |])-  , ("_range", [t| Maybe SemanticTokensRangeClientCapabilities |])-  , ("_full", [t| Maybe SemanticTokensFullClientCapabilities |])-  ]-deriveJSON lspOptions ''SemanticTokensOptions--makeExtendingDatatype "SemanticTokensRegistrationOptions"-  [ ''TextDocumentRegistrationOptions-  , ''SemanticTokensOptions-  , ''StaticRegistrationOptions] []-deriveJSON lspOptions ''SemanticTokensRegistrationOptions--makeExtendingDatatype "SemanticTokensParams"-  [''WorkDoneProgressParams-  , ''PartialResultParams]-  [ ("_textDocument", [t| TextDocumentIdentifier |]) ]-deriveJSON lspOptions ''SemanticTokensParams--data SemanticTokens = SemanticTokens {-  -- | An optional result id. If provided and clients support delta updating-  -- the client will include the result id in the next semantic token request.-  -- A server can then instead of computing all semantic tokens again simply-  -- send a delta.-  _resultId :: Maybe Text,--  -- | The actual tokens.-  _xdata    :: List UInt-} deriving (Show, Read, Eq)-deriveJSON lspOptions ''SemanticTokens--data SemanticTokensPartialResult = SemanticTokensPartialResult {-  _xdata :: List UInt-}-deriveJSON lspOptions ''SemanticTokensPartialResult--makeExtendingDatatype "SemanticTokensDeltaParams"-  [''WorkDoneProgressParams-  , ''PartialResultParams]-  [ ("_textDocument", [t| TextDocumentIdentifier  |])-  , ("_previousResultId", [t| Text |])-  ]-deriveJSON lspOptions ''SemanticTokensDeltaParams--data SemanticTokensEdit = SemanticTokensEdit {-  -- | The start offset of the edit.-  _start       :: UInt,-  -- | The count of elements to remove.-  _deleteCount :: UInt,-  -- | The elements to insert.-  _xdata       :: Maybe (List UInt)-} deriving (Show, Read, Eq)-deriveJSON lspOptions ''SemanticTokensEdit--data SemanticTokensDelta = SemanticTokensDelta {-  _resultId :: Maybe Text,-  -- | The semantic token edits to transform a previous result into a new-  -- result.-  _edits    :: List SemanticTokensEdit-} deriving (Show, Read, Eq)-deriveJSON lspOptions ''SemanticTokensDelta--data SemanticTokensDeltaPartialResult = SemantictokensDeltaPartialResult {-  _edits :: List SemanticTokensEdit-} deriving (Show, Read, Eq)-deriveJSON lspOptions ''SemanticTokensDeltaPartialResult--makeExtendingDatatype "SemanticTokensRangeParams"-  [''WorkDoneProgressParams-  , ''PartialResultParams]-  [ ("_textDocument", [t| TextDocumentIdentifier  |])-  , ("_range", [t| Range |])-  ]-deriveJSON lspOptions ''SemanticTokensRangeParams--data SemanticTokensWorkspaceClientCapabilities = SemanticTokensWorkspaceClientCapabilities {-  -- | Whether the client implementation supports a refresh request sent from-  -- the server to the client.-  ---  -- Note that this event is global and will force the client to refresh all-  -- semantic tokens currently shown. It should be used with absolute care-  -- and is useful for situation where a server for example detect a project-  -- wide change that requires such a calculation.-  _refreshSupport :: Maybe Bool-} deriving (Show, Read, Eq)-deriveJSON lspOptions ''SemanticTokensWorkspaceClientCapabilities--------------------------------------------------------------- Tools for working with semantic tokens.--------------------------------------------------------------- | A single 'semantic token' as described in the LSP specification, using absolute positions.--- This is the kind of token that is usually easiest for editors to produce.-data SemanticTokenAbsolute = SemanticTokenAbsolute {-  line           :: UInt,-  startChar      :: UInt,-  length         :: UInt,-  tokenType      :: SemanticTokenTypes,-  tokenModifiers :: [SemanticTokenModifiers]-} deriving (Show, Read, Eq, Ord)--- Note: we want the Ord instance to sort the tokens textually: this is achieved due to the--- order of the constructors---- | A single 'semantic token' as described in the LSP specification, using relative positions.-data SemanticTokenRelative = SemanticTokenRelative {-  deltaLine      :: UInt,-  deltaStartChar :: UInt,-  length         :: UInt,-  tokenType      :: SemanticTokenTypes,-  tokenModifiers :: [SemanticTokenModifiers]-} deriving (Show, Read, Eq, Ord)--- Note: we want the Ord instance to sort the tokens textually: this is achieved due to the--- order of the constructors---- | Turn a list of absolutely-positioned tokens into a list of relatively-positioned tokens. The tokens are assumed to be in the--- order that they appear in the document!-relativizeTokens :: [SemanticTokenAbsolute] -> [SemanticTokenRelative]-relativizeTokens xs = DList.toList $ go 0 0 xs mempty-  where-    -- Pass an accumulator to make this tail-recursive-    go :: UInt -> UInt -> [SemanticTokenAbsolute] -> DList.DList SemanticTokenRelative -> DList.DList SemanticTokenRelative-    go _ _ [] acc = acc-    go lastLine lastChar (SemanticTokenAbsolute l c len ty mods:ts) acc =-      let-        lastCharInLine = if l == lastLine then lastChar else 0-        dl = l - lastLine-        dc = c - lastCharInLine-      in go l c ts (DList.snoc acc (SemanticTokenRelative dl dc len ty mods))---- | Turn a list of relatively-positioned tokens into a list of absolutely-positioned tokens. The tokens are assumed to be in the--- order that they appear in the document!-absolutizeTokens :: [SemanticTokenRelative] -> [SemanticTokenAbsolute]-absolutizeTokens xs = DList.toList $ go 0 0 xs mempty-  where-    -- Pass an accumulator to make this tail-recursive-    go :: UInt -> UInt -> [SemanticTokenRelative] -> DList.DList SemanticTokenAbsolute -> DList.DList SemanticTokenAbsolute-    go _ _ [] acc = acc-    go lastLine lastChar (SemanticTokenRelative dl dc len ty mods:ts) acc =-      let-        lastCharInLine = if dl == 0 then lastChar else 0-        l = lastLine + dl-        c = lastCharInLine + dc-      in go l c ts (DList.snoc acc (SemanticTokenAbsolute l c len ty mods))---- | Encode a series of relatively-positioned semantic tokens into an integer array following the given legend.-encodeTokens :: SemanticTokensLegend -> [SemanticTokenRelative] -> Either Text [UInt]-encodeTokens SemanticTokensLegend{_tokenTypes=List tts,_tokenModifiers=List tms} sts =-  DList.toList . DList.concat <$> traverse encodeToken sts-  where-    -- Note that there's no "fast" version of these (e.g. backed by an IntMap or similar)-    -- in general, due to the possibility  of unknown token types which are only identified by strings.-    tyMap :: Map.Map SemanticTokenTypes UInt-    tyMap = Map.fromList $ zip tts [0..]-    modMap :: Map.Map SemanticTokenModifiers Int-    modMap = Map.fromList $ zip tms [0..]--    lookupTy :: SemanticTokenTypes -> Either Text UInt-    lookupTy ty = case Map.lookup ty tyMap of-        Just tycode -> pure tycode-        Nothing -> throwError $ "Semantic token type " <> fromString (show ty) <> " did not appear in the legend"-    lookupMod :: SemanticTokenModifiers -> Either Text Int-    lookupMod modifier = case Map.lookup modifier modMap of-        Just modcode -> pure modcode-        Nothing -> throwError $ "Semantic token modifier " <> fromString (show modifier) <> " did not appear in the legend"--    -- Use a DList here for better efficiency when concatenating all these together-    encodeToken :: SemanticTokenRelative -> Either Text (DList.DList UInt)-    encodeToken (SemanticTokenRelative dl dc len ty mods) = do-      tycode <- lookupTy ty-      modcodes <- traverse lookupMod mods-      let combinedModcode :: Int = foldl' Bits.setBit Bits.zeroBits modcodes--      pure [dl, dc, len, tycode, fromIntegral combinedModcode ]---- This is basically 'SemanticTokensEdit', but slightly easier to work with.--- | An edit to a buffer of items. -data Edit a = Edit { editStart :: UInt, editDeleteCount :: UInt, editInsertions :: [a] }-  deriving (Read, Show, Eq, Ord)---- | Compute a list of edits that will turn the first list into the second list.-computeEdits :: Eq a => [a] -> [a] -> [Edit a]-computeEdits l r = DList.toList $ go 0 Nothing (Diff.getGroupedDiff l r) mempty-  where-    {--    Strategy: traverse the list of diffs, keeping the current index and (maybe) an in-progress 'Edit'.-    Whenever we see a 'Diff' that's only one side or the other, we can bundle that in to our in-progress-    'Edit'. We only have to stop if we see a 'Diff' that's on both sides (i.e. unchanged), then we-    dump the 'Edit' into the accumulator.-    We need the index, because 'Edit's need to say where they start.-    -}-    go :: UInt -> Maybe (Edit a) -> [Diff.Diff [a]] -> DList.DList (Edit a) -> DList.DList (Edit a)-    -- No more diffs: append the current edit if there is one and return-    go _ e [] acc = acc <> DList.fromList (maybeToList e)--    -- Items only on the left (i.e. deletions): increment the current index, and record the count of deletions,-    -- starting a new edit if necessary.-    go ix e (Diff.First ds : rest) acc =-      let-        deleteCount = fromIntegral $ Prelude.length ds-        edit = fromMaybe (Edit ix 0 []) e-      in go (ix + deleteCount) (Just (edit{editDeleteCount=editDeleteCount edit + deleteCount})) rest acc-    -- Items only on the right (i.e. insertions): don't increment the current index, and record the insertions,-    -- starting a new edit if necessary.-    go ix e (Diff.Second as : rest) acc =-      let edit = fromMaybe (Edit ix 0 []) e-      in go ix (Just (edit{editInsertions=editInsertions edit <> as})) rest acc--    -- Items on both sides: increment the current index appropriately (since the items appear on the left),-    -- and append the current edit (if there is one) to our list of edits (since we can't continue it with a break).-    go ix e (Diff.Both bs _bs : rest) acc =-      let bothCount = fromIntegral $ Prelude.length bs-      in go (ix + bothCount) Nothing rest (acc <> DList.fromList (maybeToList e))---- | Convenience method for making a 'SemanticTokens' from a list of 'SemanticTokenAbsolute's. An error may be returned if---- The resulting 'SemanticTokens' lacks a result ID, which must be set separately if you are using that.-makeSemanticTokens :: SemanticTokensLegend -> [SemanticTokenAbsolute] -> Either Text SemanticTokens-makeSemanticTokens legend sts = do-  encoded <- encodeTokens legend $ relativizeTokens sts-  pure $ SemanticTokens Nothing (List encoded)---- | Convenience function for making a 'SemanticTokensDelta' from a previous and current 'SemanticTokens'.--- The resulting 'SemanticTokensDelta' lacks a result ID, which must be set separately if you are using that.-makeSemanticTokensDelta :: SemanticTokens -> SemanticTokens -> SemanticTokensDelta-makeSemanticTokensDelta SemanticTokens{_xdata=List prevTokens} SemanticTokens{_xdata=List curTokens} =-  let edits = computeEdits prevTokens curTokens-      stEdits = fmap (\(Edit s ds as) -> SemanticTokensEdit s ds (Just $ List as)) edits-  in SemanticTokensDelta Nothing (List stEdits)-
− src/Language/LSP/Types/ServerCapabilities.hs
@@ -1,137 +0,0 @@-{-# LANGUAGE TemplateHaskell       #-}-{-# LANGUAGE TypeOperators         #-}-{-# LANGUAGE DuplicateRecordFields #-}--module Language.LSP.Types.ServerCapabilities where--import Data.Aeson-import Data.Aeson.TH-import Data.Text (Text)-import Language.LSP.Types.CallHierarchy-import Language.LSP.Types.CodeAction-import Language.LSP.Types.CodeLens-import Language.LSP.Types.Command-import Language.LSP.Types.Common-import Language.LSP.Types.Completion-import Language.LSP.Types.Declaration-import Language.LSP.Types.Definition-import Language.LSP.Types.DocumentColor-import Language.LSP.Types.DocumentHighlight-import Language.LSP.Types.DocumentLink-import Language.LSP.Types.DocumentSymbol-import Language.LSP.Types.FoldingRange-import Language.LSP.Types.Formatting-import Language.LSP.Types.Hover-import Language.LSP.Types.Implementation-import Language.LSP.Types.References-import Language.LSP.Types.Rename-import Language.LSP.Types.SelectionRange-import Language.LSP.Types.SemanticTokens-import Language.LSP.Types.SignatureHelp-import Language.LSP.Types.TextDocument-import Language.LSP.Types.TypeDefinition-import Language.LSP.Types.Utils-import Language.LSP.Types.WorkspaceSymbol---- -----------------------------------------------------------------------data WorkspaceFoldersServerCapabilities =-  WorkspaceFoldersServerCapabilities-    { -- | The server has support for workspace folders-      _supported :: Maybe Bool-      -- | Whether the server wants to receive workspace folder-      -- change notifications.-      -- If a strings is provided the string is treated as a ID-      -- under which the notification is registered on the client-      -- side. The ID can be used to unregister for these events-      -- using the `client/unregisterCapability` request.-    , _changeNotifications :: Maybe (Text |? Bool)-    }-  deriving (Show, Read, Eq)--deriveJSON lspOptions ''WorkspaceFoldersServerCapabilities--data WorkspaceServerCapabilities =-  WorkspaceServerCapabilities-    { -- | The server supports workspace folder. Since LSP 3.6-      ---      -- @since 0.7.0.0-      _workspaceFolders :: Maybe WorkspaceFoldersServerCapabilities-    }-  deriving (Show, Read, Eq)-deriveJSON lspOptions ''WorkspaceServerCapabilities--data ServerCapabilities =-  ServerCapabilities-    { -- | Defines how text documents are synced. Is either a detailed structure-      -- defining each notification or for backwards compatibility the-      -- 'TextDocumentSyncKind' number.-      -- If omitted it defaults to 'TdSyncNone'.-      _textDocumentSync                 :: Maybe (TextDocumentSyncOptions |? TextDocumentSyncKind)-      -- | The server provides hover support.-    , _hoverProvider                    :: Maybe (Bool |? HoverOptions)-      -- | The server provides completion support.-    , _completionProvider               :: Maybe CompletionOptions-      -- | The server provides signature help support.-    , _signatureHelpProvider            :: Maybe SignatureHelpOptions-      -- | The server provides go to declaration support.-      ---      -- Since LSP 3.14.0-    , _declarationProvider              :: Maybe (Bool |? DeclarationOptions |? DeclarationRegistrationOptions)-      -- | The server provides goto definition support.-    , _definitionProvider               :: Maybe (Bool |? DefinitionOptions)-      -- | The server provides Goto Type Definition support. Since LSP 3.6-      ---      -- @since 0.7.0.0-    , _typeDefinitionProvider           :: Maybe (Bool |? TypeDefinitionOptions |? TypeDefinitionRegistrationOptions)-      -- | The server provides Goto Implementation support. Since LSP 3.6-      ---      -- @since 0.7.0.0-    , _implementationProvider           :: Maybe (Bool |? ImplementationOptions |? ImplementationRegistrationOptions)-      -- | The server provides find references support.-    , _referencesProvider               :: Maybe (Bool |? ReferenceOptions)-      -- | The server provides document highlight support.-    , _documentHighlightProvider        :: Maybe (Bool |? DocumentHighlightOptions)-      -- | The server provides document symbol support.-    , _documentSymbolProvider           :: Maybe (Bool |? DocumentSymbolOptions)-      -- | The server provides code actions.-    , _codeActionProvider               :: Maybe (Bool |? CodeActionOptions)-      -- | The server provides code lens.-    , _codeLensProvider                 :: Maybe CodeLensOptions-      -- | The server provides document link support.-    , _documentLinkProvider             :: Maybe DocumentLinkOptions-      -- | The server provides color provider support. Since LSP 3.6-      ---      -- @since 0.7.0.0-    , _colorProvider                    :: Maybe (Bool |? DocumentColorOptions |? DocumentColorRegistrationOptions)-      -- | The server provides document formatting.-    , _documentFormattingProvider       :: Maybe (Bool |? DocumentFormattingOptions)-      -- | The server provides document range formatting.-    , _documentRangeFormattingProvider  :: Maybe (Bool |? DocumentRangeFormattingOptions)-      -- | The server provides document formatting on typing.-    , _documentOnTypeFormattingProvider :: Maybe DocumentOnTypeFormattingOptions-      -- | The server provides rename support.-    , _renameProvider                   :: Maybe (Bool |? RenameOptions)-      -- | The server provides folding provider support. Since LSP 3.10-      ---      -- @since 0.7.0.0-    , _foldingRangeProvider             :: Maybe (Bool |? FoldingRangeOptions |? FoldingRangeRegistrationOptions)-      -- | The server provides execute command support.-    , _executeCommandProvider           :: Maybe ExecuteCommandOptions-      -- | The server provides selection range support. Since LSP 3.15-    , _selectionRangeProvider           :: Maybe (Bool |? SelectionRangeOptions |? SelectionRangeRegistrationOptions)-      -- | The server provides call hierarchy support.-    , _callHierarchyProvider            :: Maybe (Bool |? CallHierarchyOptions |? CallHierarchyRegistrationOptions)-      -- | The server provides semantic tokens support.-      ---      -- @since 3.16.0-    , _semanticTokensProvider           :: Maybe (SemanticTokensOptions |? SemanticTokensRegistrationOptions)-      -- | The server provides workspace symbol support.-    , _workspaceSymbolProvider          :: Maybe (Bool |? WorkspaceSymbolOptions)-      -- | Workspace specific server capabilities-    , _workspace                        :: Maybe WorkspaceServerCapabilities-      -- | Experimental server capabilities.-    , _experimental                     :: Maybe Value-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''ServerCapabilities
− src/Language/LSP/Types/SignatureHelp.hs
@@ -1,207 +0,0 @@-{-# LANGUAGE DuplicateRecordFields #-}-{-# LANGUAGE TemplateHaskell #-}--- | Signature Help Request--- https://github.com/Microsoft/language-server-protocol/blob/master/protocol.md#signature-help-request-module Language.LSP.Types.SignatureHelp where-    -import Data.Aeson-import Data.Aeson.TH-import Data.Text (Text)-import Language.LSP.Types.Common-import Language.LSP.Types.MarkupContent-import Language.LSP.Types.Progress-import Language.LSP.Types.TextDocument-import Language.LSP.Types.Utils-import Control.Applicative (Alternative((<|>)))---- ---------------------------------------data SignatureHelpParameterInformation =-  SignatureHelpParameterInformation-    { -- | The client supports processing label offsets instead of a simple-      -- label string.-      ---      -- @since 3.14.0-      _labelOffsetSupport :: Maybe Bool-    }-  deriving (Read, Show, Eq)-deriveJSON lspOptions ''SignatureHelpParameterInformation--data SignatureHelpSignatureInformation =-  SignatureHelpSignatureInformation-    { -- | Client supports the follow content formats for the documentation-      -- property. The order describes the preferred format of the client.-      _documentationFormat :: Maybe (List MarkupKind)-      -- | Client capabilities specific to parameter information.-    , _parameterInformation :: Maybe SignatureHelpParameterInformation-      -- | The client supports the `activeParameter` property on-      -- 'SignatureInformation' literal.-      ---      -- @since 3.16.0-    , _activeParameterSuport :: Maybe Bool-    }-  deriving (Show, Read, Eq)--deriveJSON lspOptions ''SignatureHelpSignatureInformation--data SignatureHelpClientCapabilities =-  SignatureHelpClientCapabilities-    { -- | Whether signature help supports dynamic registration.-      _dynamicRegistration :: Maybe Bool-      -- | The client supports the following 'SignatureInformation'-      -- specific properties.-    , _signatureInformation :: Maybe SignatureHelpSignatureInformation-      -- | The client supports to send additional context information for a-      -- @textDocument/signatureHelp@ request. A client that opts into-      -- contextSupport will also support the '_retriggerCharacters' on-      -- 'SignatureHelpOptions'.-      ---      -- @since 3.15.0-    , _contextSupport :: Maybe Bool-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''SignatureHelpClientCapabilities---- ---------------------------------------makeExtendingDatatype "SignatureHelpOptions" [''WorkDoneProgressOptions]-  [ ("_triggerCharacters", [t| Maybe (List Text) |])-  , ("_retriggerCharacters", [t| Maybe (List Text) |])-  ]-deriveJSON lspOptions ''SignatureHelpOptions--makeExtendingDatatype "SignatureHelpRegistrationOptions"-  [ ''TextDocumentRegistrationOptions-  , ''SignatureHelpOptions-  ] []-deriveJSON lspOptions ''SignatureHelpRegistrationOptions---- ---------------------------------------data SignatureHelpDoc = SignatureHelpDocString Text | SignatureHelpDocMarkup MarkupContent-  deriving (Read,Show,Eq)--deriveJSON lspOptionsUntagged ''SignatureHelpDoc---- ---------------------------------------data ParameterLabel = ParameterLabelString Text | ParameterLabelOffset UInt UInt-  deriving (Read,Show,Eq)--instance ToJSON ParameterLabel where-  toJSON (ParameterLabelString t) = toJSON t-  toJSON (ParameterLabelOffset l h) = toJSON [l, h]--instance FromJSON ParameterLabel where-  parseJSON x = ParameterLabelString <$> parseJSON x <|> parseInterval x-    where-      parseInterval v@(Array _) = do-        is <- parseJSON v-        case is of-          [l, h] -> pure $ ParameterLabelOffset l h-          _ -> fail "ParameterLabel"-      parseInterval _ = fail "ParameterLabel"---- ---------------------------------------{-| -Represents a parameter of a callable-signature. A parameter can-have a label and a doc-comment.--}-data ParameterInformation =-  ParameterInformation-    { _label         :: ParameterLabel -- ^ The label of this parameter information.-    , _documentation :: Maybe SignatureHelpDoc -- ^ The human-readable doc-comment of this parameter.-    } deriving (Read,Show,Eq)-deriveJSON lspOptions ''ParameterInformation---- ---------------------------------------{-|-Represents the signature of something callable. A signature-can have a label, like a function-name, a doc-comment, and-a set of parameters.--}-data SignatureInformation =-  SignatureInformation-    { _label           :: Text -- ^ The label of the signature.-    , _documentation   :: Maybe SignatureHelpDoc -- ^ The human-readable doc-comment of this signature.-    , _parameters      :: Maybe (List ParameterInformation) -- ^ The parameters of this signature.-    , _activeParameter :: Maybe UInt -- ^ The index of the active parameter.-    } deriving (Read,Show,Eq)--deriveJSON lspOptions ''SignatureInformation---{-|-Signature help represents the signature of something-callable. There can be multiple signature but only one-active and only one active parameter.--}-data SignatureHelp =-  SignatureHelp-    { _signatures      :: List SignatureInformation -- ^ One or more signatures.-    , _activeSignature :: Maybe UInt -- ^ The active signature.-    , _activeParameter :: Maybe UInt -- ^ The active parameter of the active signature.-    } deriving (Read,Show,Eq)--deriveJSON lspOptions ''SignatureHelp---- ----------------------------------------- | How a signature help was triggered.------ @since 3.15.0-data SignatureHelpTriggerKind = SHTKInvoked -- ^ Signature help was invoked manually by the user or by a command.-                              | SHTKTriggerCharacter -- ^ Signature help was triggered by a trigger character.-                              | SHTKContentChange -- ^ Signature help was triggered by the cursor moving or by the document content changing.-  deriving (Read,Show,Eq)--instance ToJSON SignatureHelpTriggerKind where-  toJSON SHTKInvoked          = Number 1-  toJSON SHTKTriggerCharacter = Number 2-  toJSON SHTKContentChange    = Number 3--instance FromJSON SignatureHelpTriggerKind where-  parseJSON (Number 1) = pure SHTKInvoked-  parseJSON (Number 2) = pure SHTKTriggerCharacter-  parseJSON (Number 3) = pure SHTKContentChange-  parseJSON _          = fail "SignatureHelpTriggerKind"---- | Additional information about the context in which a signature help request--- was triggered.------ @since 3.15.0-data SignatureHelpContext = -  SignatureHelpContext-    { -- | Action that caused signature help to be triggered.-      _triggerKind :: SignatureHelpTriggerKind-      -- | Character that caused signature help to be triggered. This is-      -- undefined when @triggerKind !==-      -- SignatureHelpTriggerKind.TriggerCharacter@-    , _triggerCharacter :: Maybe Text-      -- | 'True' if signature help was already showing when it was triggered.-      -- -      -- Retriggers occur when the signature help is already active and can be-      -- caused by actions such as typing a trigger character, a cursor move, or-      -- document content changes.-    , _isRetrigger :: Bool-      -- | The currently active 'SignatureHelp'.-      -- -      -- The '_activeSignatureHelp' has its @SignatureHelp.activeSignature@-      -- field updated based on the user navigating through available-      -- signatures.-    , _activeSignatureHelp :: Maybe SignatureHelp-    }-  deriving (Read,Show,Eq)-deriveJSON lspOptions ''SignatureHelpContext--makeExtendingDatatype "SignatureHelpParams"-  [ ''TextDocumentPositionParams-  , ''WorkDoneProgressParams-  ]-  [ ("_context", [t| Maybe SignatureHelpContext |])-  ]-deriveJSON lspOptions ''SignatureHelpParams--
− src/Language/LSP/Types/StaticRegistrationOptions.hs
@@ -1,13 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}--- Cyclic dependencies mean we have to put poor StaticRegistrationOptions on its own-module Language.LSP.Types.StaticRegistrationOptions where--import Data.Aeson.TH-import Data.Text (Text)-import Language.LSP.Types.Utils--data StaticRegistrationOptions =-  StaticRegistrationOptions-    { _id :: Maybe Text-    } deriving (Read,Show,Eq)-deriveJSON lspOptions ''StaticRegistrationOptions
− src/Language/LSP/Types/TextDocument.hs
@@ -1,264 +0,0 @@-{-# LANGUAGE DuplicateRecordFields      #-}-{-# LANGUAGE TemplateHaskell            #-}-{-# LANGUAGE TypeOperators              #-}-module Language.LSP.Types.TextDocument where--import           Data.Aeson-import           Data.Aeson.TH-import           Data.Default-import           Data.Text                      ( Text )--import           Language.LSP.Types.Common-import           Language.LSP.Types.DocumentFilter-import           Language.LSP.Types.Location-import           Language.LSP.Types.Uri-import           Language.LSP.Types.Utils---- -----------------------------------------------------------------------data TextDocumentIdentifier =-  TextDocumentIdentifier-    { _uri :: Uri-    } deriving (Show, Read, Eq)-deriveJSON lspOptions ''TextDocumentIdentifier--type TextDocumentVersion = Maybe Int32--makeExtendingDatatype "VersionedTextDocumentIdentifier" [''TextDocumentIdentifier]-  [ ("_version", [t| TextDocumentVersion |])]-deriveJSON lspOptions ''VersionedTextDocumentIdentifier--data TextDocumentItem =-  TextDocumentItem {-    _uri        :: Uri-  , _languageId :: Text-  , _version    :: Int32-  , _text       :: Text-  } deriving (Show, Read, Eq)--deriveJSON lspOptions ''TextDocumentItem---- -----------------------------------------------------------------------data TextDocumentPositionParams =-  TextDocumentPositionParams-    { -- | The text document.-      _textDocument :: TextDocumentIdentifier-    , -- | The position inside the text document.-      _position     :: Position-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''TextDocumentPositionParams---- ----------------------------------------- Text document synchronisation---data TextDocumentSyncClientCapabilities =-  TextDocumentSyncClientCapabilities-    { -- | Whether text document synchronization supports dynamic registration.-      _dynamicRegistration :: Maybe Bool--      -- | The client supports sending will save notifications.-    , _willSave :: Maybe Bool--      -- | The client supports sending a will save request and waits for a-      -- response providing text edits which will be applied to the document-      -- before it is saved.-    , _willSaveWaitUntil :: Maybe Bool--      -- | The client supports did save notifications.-    , _didSave :: Maybe Bool-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''TextDocumentSyncClientCapabilities--instance Default TextDocumentSyncClientCapabilities where-  def = TextDocumentSyncClientCapabilities def def def def---- ---------------------------------------data SaveOptions =-  SaveOptions-  { -- | The client is supposed to include the content on save.-    _includeText :: Maybe Bool-  } deriving (Show, Read, Eq)-deriveJSON lspOptions ''SaveOptions---- ----------------------------------------- | Defines how the host (editor) should sync document changes to the language server.-data TextDocumentSyncKind-  = -- | Documents should not be synced at all.-    TdSyncNone-  | -- | Documents are synced by always sending the full content of the document.-    TdSyncFull-  | -- | Documents are synced by sending the full content on open. After that only incremental updates to the document are send.-    TdSyncIncremental-  deriving (Read, Eq, Show)--instance ToJSON TextDocumentSyncKind where-  toJSON TdSyncNone        = Number 0-  toJSON TdSyncFull        = Number 1-  toJSON TdSyncIncremental = Number 2--instance FromJSON TextDocumentSyncKind where-  parseJSON (Number 0) = pure TdSyncNone-  parseJSON (Number 1) = pure TdSyncFull-  parseJSON (Number 2) = pure TdSyncIncremental-  parseJSON _          = fail "TextDocumentSyncKind"--data TextDocumentSyncOptions =-  TextDocumentSyncOptions-  { -- | Open and close notifications are sent to the server. If omitted open-    -- close notification should not be sent.-    _openClose :: Maybe Bool-  , -- | Change notifications are sent to the server. See-    -- TextDocumentSyncKind.None, TextDocumentSyncKind.Full-    -- and TextDocumentSyncKind.Incremental. If omitted it defaults to-    -- TextDocumentSyncKind.None.-    _change    :: Maybe TextDocumentSyncKind-    -- | If present will save notifications are sent to the server. If omitted the notification should not be-    -- sent.-  , _willSave  :: Maybe Bool-    -- | If present will save wait until requests are sent to the server. If omitted the request should not be-    -- sent.-  , _willSaveWaitUntil :: Maybe Bool-    -- | If present save notifications are sent to the server. If omitted the-    -- notification should not be sent.-  , _save      :: Maybe (Bool |? SaveOptions)-  } deriving (Show, Read, Eq)-deriveJSON lspOptions ''TextDocumentSyncOptions---- ---------------------------------------{--Since most of the registration options require to specify a document selector-there is a base interface that can be used.--}--data TextDocumentRegistrationOptions =-  TextDocumentRegistrationOptions-    { _documentSelector :: Maybe DocumentSelector-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''TextDocumentRegistrationOptions---- ---------------------------------------data DidOpenTextDocumentParams =-  DidOpenTextDocumentParams-  { -- | The document that was opened.-    _textDocument :: TextDocumentItem-  } deriving (Show, Read, Eq)--deriveJSON lspOptions ''DidOpenTextDocumentParams---- ---------------------------------------makeExtendingDatatype "TextDocumentChangeRegistrationOptions"-  [''TextDocumentRegistrationOptions]-  [("_syncKind", [t| TextDocumentSyncKind |])]--deriveJSON lspOptions ''TextDocumentChangeRegistrationOptions--data TextDocumentContentChangeEvent =-  TextDocumentContentChangeEvent-    { -- | The range of the document that changed.-      _range       :: Maybe Range-      -- | The optional length of the range that got replaced.-      -- Deprecated, use _range instead-    , _rangeLength :: Maybe UInt-      -- | The new text for the provided range, if provided.-      -- Otherwise the new text of the whole document.-    , _text        :: Text-    }-  deriving (Read,Show,Eq)--deriveJSON lspOptions ''TextDocumentContentChangeEvent---- ---------------------------------------data DidChangeTextDocumentParams =-  DidChangeTextDocumentParams-    { -- | The document that did change. The version number points-      -- to the version after all provided content changes have-      -- been applied.-      _textDocument   :: VersionedTextDocumentIdentifier-      -- | The actual content changes. The content changes describe single state changes-      -- to the document. So if there are two content changes c1 (at array index 0) and-      -- c2 (at array index 1) for a document in state S then c1 moves the document from-      -- S to S' and c2 from S' to S''. So c1 is computed on the state S and c2 is computed-      -- on the state S'.-      ---      -- To mirror the content of a document using change events use the following approach:-      -- - start with the same initial content-      -- - apply the 'textDocument/didChange' notifications in the order you recevie them.-      -- - apply the `TextDocumentContentChangeEvent`s in a single notification in the order-      --   you receive them.-    , _contentChanges :: List TextDocumentContentChangeEvent-    } deriving (Show,Read,Eq)--deriveJSON lspOptions ''DidChangeTextDocumentParams---- ---------------------------------------data TextDocumentSaveReason-  = SaveManual-         -- ^ Manually triggered, e.g. by the user pressing save, by starting-         -- debugging, or by an API call.-  | SaveAfterDelay -- ^ Automatic after a delay-  | SaveFocusOut   -- ^ When the editor lost focus-  deriving (Show, Read, Eq)--instance ToJSON TextDocumentSaveReason where-  toJSON SaveManual     = Number 1-  toJSON SaveAfterDelay = Number 2-  toJSON SaveFocusOut   = Number 3--instance FromJSON TextDocumentSaveReason where-  parseJSON (Number 1) = pure SaveManual-  parseJSON (Number 2) = pure SaveAfterDelay-  parseJSON (Number 3) = pure SaveFocusOut-  parseJSON _          = fail "TextDocumentSaveReason"--data WillSaveTextDocumentParams =-  WillSaveTextDocumentParams-    { -- | The document that will be saved.-      _textDocument :: TextDocumentIdentifier-      -- | The 'TextDocumentSaveReason'.-    , _reason       :: TextDocumentSaveReason-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''WillSaveTextDocumentParams---- ----------------------------------------makeExtendingDatatype "TextDocumentSaveRegistrationOptions"-  [''TextDocumentRegistrationOptions]-  [("_includeText", [t| Maybe Bool |])]--deriveJSON lspOptions ''TextDocumentSaveRegistrationOptions--data DidSaveTextDocumentParams =-  DidSaveTextDocumentParams-    { -- | The document that was saved.-      _textDocument :: TextDocumentIdentifier-      -- | Optional the content when saved. Depends on the includeText value-      -- when the save notification was requested.-    , _text         :: Maybe Text-    } deriving (Read,Show,Eq)--deriveJSON lspOptions ''DidSaveTextDocumentParams---- ---------------------------------------data DidCloseTextDocumentParams =-  DidCloseTextDocumentParams-    { -- | The document that was closed.-      _textDocument :: TextDocumentIdentifier-    } deriving (Read,Show,Eq)--deriveJSON lspOptions ''DidCloseTextDocumentParams
− src/Language/LSP/Types/TypeDefinition.hs
@@ -1,42 +0,0 @@-{-# LANGUAGE DuplicateRecordFields #-}-{-# LANGUAGE TemplateHaskell #-}--module Language.LSP.Types.TypeDefinition where--import Data.Aeson.TH-import Language.LSP.Types.Progress-import Language.LSP.Types.StaticRegistrationOptions-import Language.LSP.Types.TextDocument-import Language.LSP.Types.Utils--data TypeDefinitionClientCapabilities = TypeDefinitionClientCapabilities-  { -- | Whether implementation supports dynamic registration. If this is set-    -- to 'True'-    -- the client supports the new 'TypeDefinitionRegistrationOptions' return-    -- value for the corresponding server capability as well.-    _dynamicRegistration :: Maybe Bool,-    -- | The client supports additional metadata in the form of definition links.-    ---    -- Since LSP 3.14.0-    _linkSupport :: Maybe Bool-  }-  deriving (Read, Show, Eq)--deriveJSON lspOptions ''TypeDefinitionClientCapabilities--makeExtendingDatatype "TypeDefinitionOptions" [''WorkDoneProgressOptions] []-deriveJSON lspOptions ''TypeDefinitionOptions--makeExtendingDatatype "TypeDefinitionRegistrationOptions"-  [ ''TextDocumentRegistrationOptions-  , ''TypeDefinitionOptions-  , ''StaticRegistrationOptions-  ] []-deriveJSON lspOptions ''TypeDefinitionRegistrationOptions--makeExtendingDatatype "TypeDefinitionParams"-  [ ''TextDocumentPositionParams-  , ''WorkDoneProgressParams-  , ''PartialResultParams-  ] []-deriveJSON lspOptions ''TypeDefinitionParams
− src/Language/LSP/Types/Uri.hs
@@ -1,241 +0,0 @@-{-# LANGUAGE DeriveGeneric              #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE InstanceSigs               #-}-{-# LANGUAGE OverloadedStrings          #-}-{-# LANGUAGE RankNTypes                 #-}-{-# LANGUAGE RecordWildCards            #-}-{-# LANGUAGE TypeSynonymInstances       #-}--module Language.LSP.Types.Uri-  ( Uri(..)-  , uriToFilePath-  , filePathToUri-  , NormalizedUri(..)-  , toNormalizedUri-  , fromNormalizedUri-  , NormalizedFilePath-  , toNormalizedFilePath-  , fromNormalizedFilePath-  , normalizedFilePathToUri-  , uriToNormalizedFilePath-  , emptyNormalizedFilePath-  -- Private functions-  , platformAwareUriToFilePath-  , platformAwareFilePathToUri-  )-  where--import           Control.DeepSeq-import qualified Data.Aeson              as A-import           Data.Binary             (Binary, Get, get, put)-import           Data.Hashable-import           Data.List               (stripPrefix)-import           Data.String             (IsString (fromString))-import           Data.Text               (Text)-import qualified Data.Text               as T-import           GHC.Generics-import           Network.URI             hiding (authority)-import           Safe                    (tailMay)-import qualified System.FilePath         as FP-import qualified System.FilePath.Posix   as FPP-import qualified System.FilePath.Windows as FPW-import qualified System.Info--newtype Uri = Uri { getUri :: Text }-  deriving (Eq,Ord,Read,Show,Generic,A.FromJSON,A.ToJSON,Hashable,A.ToJSONKey,A.FromJSONKey)--instance NFData Uri---- If you care about performance then you should use a hash map. The keys--- are cached in order to make hashing very fast.-data NormalizedUri = NormalizedUri !Int !Text-  deriving (Read,Show,Generic, Eq)---- Slow but compares paths alphabetically as you would expect.-instance Ord NormalizedUri where-  compare (NormalizedUri _ u1) (NormalizedUri _ u2) = compare u1 u2--instance Hashable NormalizedUri where-  hash (NormalizedUri h _) = h-  hashWithSalt salt (NormalizedUri h _) = hashWithSalt salt h--instance NFData NormalizedUri--isUnescapedInUriPath :: SystemOS -> Char -> Bool-isUnescapedInUriPath systemOS c-   | systemOS == windowsOS = isUnreserved c || c `elem` [':', '\\', '/']-   | otherwise = isUnreserved c || c == '/'---- | When URIs are supposed to be used as keys, it is important to normalize--- the percent encoding in the URI since URIs that only differ--- when it comes to the percent-encoding should be treated as equivalent.-normalizeUriEscaping :: String -> String-normalizeUriEscaping uri =-  case stripPrefix (fileScheme ++ "//") uri of-    Just p  -> fileScheme ++ "//" ++ escapeURIPath (unEscapeString p)-    Nothing -> escapeURIString isUnescapedInURI $ unEscapeString uri-  where escapeURIPath = escapeURIString (isUnescapedInUriPath System.Info.os)--toNormalizedUri :: Uri -> NormalizedUri-toNormalizedUri uri = NormalizedUri (hash norm) norm-  where (Uri t) = maybe uri filePathToUri (uriToFilePath uri)-        -- To ensure all `Uri`s have the file path normalized-        norm = T.pack (normalizeUriEscaping (T.unpack t))--fromNormalizedUri :: NormalizedUri -> Uri-fromNormalizedUri (NormalizedUri _ t) = Uri t--fileScheme :: String-fileScheme = "file:"--windowsOS :: String-windowsOS = "mingw32"--type SystemOS = String--uriToFilePath :: Uri -> Maybe FilePath-uriToFilePath = platformAwareUriToFilePath System.Info.os--{-# WARNING platformAwareUriToFilePath "This function is considered private. Use normalizedFilePathToUri instead." #-}-platformAwareUriToFilePath :: String -> Uri -> Maybe FilePath-platformAwareUriToFilePath systemOS (Uri uri) = do-  URI{..} <- parseURI $ T.unpack uri-  if uriScheme == fileScheme-    then return $-      platformAdjustFromUriPath systemOS (uriRegName <$> uriAuthority) $ unEscapeString uriPath-    else Nothing---- | We pull in the authority because in relative file paths the Uri likes to put everything before the slash---   into the authority field-platformAdjustFromUriPath :: SystemOS-                          -> Maybe String -- ^ authority-                          -> String -- ^ path-                          -> FilePath-platformAdjustFromUriPath systemOS authority srcPath =-  maybe id (++) authority $-  if systemOS /= windowsOS-  then srcPath-  else case FPP.splitDirectories <$> tailMay srcPath of-      Just (firstSegment:rest) -> -- Drop leading '/' for absolute Windows paths-        let drive = if FPW.isDrive firstSegment-                    then FPW.addTrailingPathSeparator firstSegment-                    else firstSegment-         in FPW.joinDrive drive $ FPW.joinPath rest-      _ -> srcPath--filePathToUri :: FilePath -> Uri-filePathToUri = platformAwareFilePathToUri System.Info.os . FP.normalise--{-# WARNING platformAwareFilePathToUri "This function is considered private. Use normalizedUriToFilePath instead." #-}-platformAwareFilePathToUri :: SystemOS -> FilePath -> Uri-platformAwareFilePathToUri systemOS fp = Uri . T.pack . show $ URI-  { uriScheme = fileScheme-  , uriAuthority = Just $ URIAuth "" "" ""-  , uriPath = platformAdjustToUriPath systemOS fp-  , uriQuery = ""-  , uriFragment = ""-  }--platformAdjustToUriPath :: SystemOS -> FilePath -> String-platformAdjustToUriPath systemOS srcPath-  | systemOS == windowsOS = '/' : escapedPath-  | otherwise = escapedPath-  where-    (splitDirectories, splitDrive)-      | systemOS == windowsOS =-          (FPW.splitDirectories, FPW.splitDrive)-      | otherwise =-          (FPP.splitDirectories, FPP.splitDrive)-    escapedPath =-        case splitDrive srcPath of-            (drv, rest) ->-                convertDrive drv `FPP.joinDrive`-                FPP.joinPath (map (escapeURIString (isUnescapedInUriPath systemOS)) $ splitDirectories rest)-    -- splitDirectories does not remove the path separator after the drive so-    -- we do a final replacement of \ to /-    convertDrive drv-      | systemOS == windowsOS && FPW.hasTrailingPathSeparator drv =-          FPP.addTrailingPathSeparator (init drv)-      | otherwise = drv--{-| A file path that is already normalized.--The 'NormalizedUri' is cached to avoided-repeated normalisation when we need to compute them (which is a lot).--This is one of the most performance critical parts of HLS, do not-modify it without profiling.--== Adoption Plan of OsPath--Currently we store 'Text'. We may change it to OsPath in the future if-the following steps are executed.--1. In the client codebase, use 'osPathToNormalizedFilePath' and 'normalizedFilePathToOsPath' instead of 'fromNormalizedFilePath'-  and 'toNormalizedFilePath'. For HLS, we could wait until GHC 9.6 becomes the oldest-  GHC we support, then change 'FilePath' to OsPath everywhere in the codebase.-2. Deprecate and remove 'fromNormalizedFilePath' and 'toNormalizedFilePath'.-3. Change 'Text' to OsPath and benchmark it to make sure performance doesn't go down. Don't forget to check Windows,-  as OsPath on Windows uses UTF-16, which may consume more memory.--See [#453](https://github.com/haskell/lsp/pull/453) and [#446](https://github.com/haskell/lsp/pull/446)-for more discussions on this topic.--}-data NormalizedFilePath = NormalizedFilePath !NormalizedUri {-# UNPACK #-} !Text-    deriving (Generic, Eq, Ord)--instance NFData NormalizedFilePath--instance Binary NormalizedFilePath where-  put (NormalizedFilePath _ fp) = put fp-  get = do-    v <- Data.Binary.get :: Get Text-    return (NormalizedFilePath (internalNormalizedFilePathToUri (T.unpack v)) v)---- | Internal helper that takes a file path that is assumed to--- already be normalized to a URI. It is up to the caller--- to ensure normalization.-internalNormalizedFilePathToUri :: FilePath -> NormalizedUri-internalNormalizedFilePathToUri fp = nuri-  where-    uriPath = platformAdjustToUriPath System.Info.os fp-    nuriStr = T.pack $ fileScheme <> "//" <> uriPath-    nuri = NormalizedUri (hash nuriStr) nuriStr--instance Show NormalizedFilePath where-  show (NormalizedFilePath _ fp) = "NormalizedFilePath " ++ show fp--instance Hashable NormalizedFilePath where-  hash (NormalizedFilePath uri _) = hash uri-  hashWithSalt salt (NormalizedFilePath uri _) = hashWithSalt salt uri--instance IsString NormalizedFilePath where-    fromString :: String -> NormalizedFilePath-    fromString = toNormalizedFilePath--toNormalizedFilePath :: FilePath -> NormalizedFilePath-toNormalizedFilePath fp = NormalizedFilePath nuri . T.pack $ nfp-  where-    nfp = FP.normalise fp-    nuri = internalNormalizedFilePathToUri nfp---- | Extracts 'FilePath' from 'NormalizedFilePath'.-fromNormalizedFilePath :: NormalizedFilePath -> FilePath-fromNormalizedFilePath (NormalizedFilePath _ fp) = T.unpack fp--normalizedFilePathToUri :: NormalizedFilePath -> NormalizedUri-normalizedFilePathToUri (NormalizedFilePath uri _) = uri--uriToNormalizedFilePath :: NormalizedUri -> Maybe NormalizedFilePath-uriToNormalizedFilePath nuri = fmap (NormalizedFilePath nuri . T.pack) mbFilePath-  where mbFilePath = platformAwareUriToFilePath System.Info.os (fromNormalizedUri nuri)--emptyNormalizedUri :: NormalizedUri-emptyNormalizedUri =-    let s = "file://"-    in NormalizedUri (hash s) s---- | 'NormalizedFilePath' that contains an empty file path-emptyNormalizedFilePath :: NormalizedFilePath-emptyNormalizedFilePath = NormalizedFilePath emptyNormalizedUri ""-
− src/Language/LSP/Types/Uri/OsPath.hs
@@ -1,53 +0,0 @@-{-# LANGUAGE CPP                 #-}-{-# LANGUAGE ScopedTypeVariables #-}--#if MIN_VERSION_filepath(1,4,100)-#define OS_PATH 1-#endif--module Language.LSP.Types.Uri.OsPath-  (-#ifdef OS_PATH-    osPathToNormalizedFilePath-  , normalizedFilePathToOsPath-  , EncodingException-#endif-  ) where--#ifdef OS_PATH--import           Control.Exception      hiding (try)-import           Control.Monad.Catch-import           GHC.IO.Encoding        (getFileSystemEncoding)-import           Language.LSP.Types.Uri-import           System.IO-import           System.IO.Unsafe       (unsafePerformIO)-import           System.OsPath-import           System.OsPath.Encoding (EncodingException)--{-|-Constructs 'NormalizedFilePath' from 'OsPath'. Throws 'EncodingException' if the conversion fails.--We store a 'Text' in 'NormalizedFilePath', which is UTF-16 or UTF-8 depending on the verion of text library.-'OsPath' may have a different encoding than 'Text', so this function may fail.-But DO NOTE THAT encoding mismatch doesn't always mean an exception will be thrown.-[Possibly your encoding simply won't throw exception on failure](https://hackage.haskell.org/package/base-4.17.0.0/docs/src/GHC.IO.Encoding.html#initFileSystemEncoding).-Possibly the conversion function can't find any invalid byte sequence, giving a sucessful but wrong result.--}-osPathToNormalizedFilePath :: MonadThrow m => OsPath -> m NormalizedFilePath-osPathToNormalizedFilePath = fmap toNormalizedFilePath . liftException . decodeWith systemEnc utf16le--{-|-Extracts 'OsPath' from 'NormalizedFilePath'. Throws 'EncodingException' if the conversion fails.--}-normalizedFilePathToOsPath :: MonadThrow m => NormalizedFilePath -> m OsPath-normalizedFilePathToOsPath = liftException . encodeWith systemEnc utf16le . fromNormalizedFilePath--liftException :: (MonadThrow m, Exception e) => Either e a -> m a-liftException (Right x)  = pure x-liftException (Left err) = throwM err--systemEnc :: TextEncoding-systemEnc = unsafePerformIO getFileSystemEncoding--#endif
− src/Language/LSP/Types/Utils.hs
@@ -1,123 +0,0 @@-{-# LANGUAGE RankNTypes                 #-}-{-# LANGUAGE TemplateHaskell            #-}-{-# LANGUAGE LambdaCase                 #-}--- | Internal helpers for generating definitions-module Language.LSP.Types.Utils-  ( rdrop-  , makeSingletonFromJSON-  , makeRegHelper-  , makeExtendingDatatype-  , lspOptions-  , lspOptionsUntagged-  ) where--import Control.Monad-import Data.Aeson-import Data.List-import Language.Haskell.TH---- -----------------------------------------------------------------------rdrop :: Int -> [a] -> [a]-rdrop cnt = reverse . drop cnt . reverse---- | Given a wrapper and a singleton GADT, construct FromJSON--- instances for each constructor return type by invoking the--- FromJSON instance for the wrapper and unwrapping-makeSingletonFromJSON :: Name -> Name -> Q [Dec]-makeSingletonFromJSON wrap gadt = do-  TyConI (DataD _ _ _ _ cons _) <- reify gadt-  concat <$> mapM (makeInst wrap) cons--{--instance FromJSON (SMethod $method) where-  parseJSON = parseJSON >=> \case-      SomeMethod $singleton-method -> pure $singleton-method-      _ -> mempty--}-makeInst :: Name -> Con -> Q [Dec]-makeInst wrap (GadtC [sConstructor] args t) = do-  ns <- replicateM (length args) (newName "x")-  let wrappedPat = conP wrap [conP sConstructor (map varP ns)]-      unwrappedE = pure $ foldl' AppE (ConE sConstructor) (map VarE ns)-  [d| instance FromJSON $(pure t) where-        parseJSON = parseJSON >=> \case-          $wrappedPat -> pure $unwrappedE-          _ -> mempty-    |]-makeInst wrap (ForallC _ _ con) = makeInst wrap con -- Cancel and Custom requests-makeInst _ _ = fail "makeInst only defined for GADT constructors"--makeRegHelper :: Name -> DecsQ-makeRegHelper regOptTypeName = do-  Just sMethodTypeName <- lookupTypeName "SMethod"-  Just fromClientName <- lookupValueName "FromClient"-  TyConI (DataD _ _ _ _ allCons _) <- reify sMethodTypeName--  let isConsFromClient (GadtC _ _ (AppT _ method)) = isMethodFromClient method-      isConsFromClient _ = return False-      isMethodFromClient :: Type -> Q Bool-      isMethodFromClient (PromotedT method) = do-        DataConI _ typ _ <- reify method-        case typ of-          AppT (AppT _ (PromotedT n)) _ -> return $ n == fromClientName-          _ -> return False-      isMethodFromClient _ = fail "Didn't expect this type of Method!"--  cons <- filterM isConsFromClient allCons--  let conNames = map (\(GadtC [name] _ _) -> name) cons-      helperName = mkName "regHelper"-      mkClause name = do-        x <- newName "x"-        clause [ conP name [], varP x ]-               (normalB (varE x))-               []-      regOptTcon = conT regOptTypeName-  fun <- funD helperName (map mkClause conNames)--  typSig <- sigD helperName $-    [t| forall m x. $(conT sMethodTypeName) m-        -> (Show ($regOptTcon m) => ToJSON ($regOptTcon m) => FromJSON ($regOptTcon m) => x)-        -> x |]-  return [typSig, fun]---- | @makeExtendingDatatype name extends fields@ generates a record datatype--- that contains all the fields of @extends@, plus the additional fields in--- @fields@.--- e.g.--- data Foo = { a :: Int }--- makeExtendingDatatype "bar" [''Foo] [("b", [t| String |])]--- Will generate--- data Bar = { a :: Int, b :: String }-makeExtendingDatatype :: String -> [Name] -> [(String, TypeQ)] -> DecsQ-makeExtendingDatatype datatypeNameStr extends fields = do-  extendFields <- fmap concat $ forM extends $ \e -> do-    TyConI (DataD _ _ _ _ [RecC _ eFields] _) <- reify e-    return eFields-  let datatypeName = mkName datatypeNameStr-      insts = [[t| Read |], [t| Show |], [t| Eq |]]-      constructor = recC datatypeName combinedFields-      userFields = flip map fields $ \(s, typ) -> do-        varBangType (mkName s) (bangType (bang noSourceUnpackedness noSourceStrictness) typ)-      combinedFields = (map pure extendFields) <> userFields-      derivs = [derivClause Nothing insts]-  (\a -> [a]) <$> dataD (cxt []) datatypeName [] Nothing [constructor] derivs---- | Standard options for use when generating JSON instances--- NOTE: This needs to be in a separate file because of the TH stage restriction-lspOptions :: Options-lspOptions = defaultOptions { omitNothingFields = True, fieldLabelModifier = modifier }-  where-  modifier :: String -> String-  -- For fields called data and type in the spec, we call them xdata and xtype-  -- in haskell-lsp-types to avoid it clashing with the Haskell keywords. This-  -- fixes up the json derivation-  modifier "_xdata" = "data"-  modifier "_xtype" = "type"-  modifier xs = drop 1 xs---- | Standard options for use when generating JSON instances for an untagged union-lspOptionsUntagged :: Options-lspOptionsUntagged = lspOptions { sumEncoding = UntaggedValue }-
− src/Language/LSP/Types/WatchedFiles.hs
@@ -1,113 +0,0 @@-{-# LANGUAGE TemplateHaskell       #-}-{-# LANGUAGE DuplicateRecordFields #-}--module Language.LSP.Types.WatchedFiles where--import Data.Aeson-import Data.Aeson.TH-import Data.Bits-import Data.Scientific-import Language.LSP.Types.Common-import Language.LSP.Types.Uri-import Language.LSP.Types.Utils-import Data.Text (Text)---- ---------------------------------------data DidChangeWatchedFilesClientCapabilities = DidChangeWatchedFilesClientCapabilities-  { -- | Did change watched files notification supports dynamic-    -- registration.-    _dynamicRegistration :: Maybe Bool-  }-  deriving (Show, Read, Eq)-deriveJSON lspOptions ''DidChangeWatchedFilesClientCapabilities---- | Describe options to be used when registering for file system change events.-data DidChangeWatchedFilesRegistrationOptions =-  DidChangeWatchedFilesRegistrationOptions-  { -- | The watchers to register.-    _watchers :: List FileSystemWatcher-  } deriving (Show, Read, Eq)--data FileSystemWatcher =-  FileSystemWatcher-  { -- | The glob pattern to watch.-    -- Glob patterns can have the following syntax:-    -- - @*@ to match one or more characters in a path segment-    -- - @?@ to match on one character in a path segment-    -- - @**@ to match any number of path segments, including none-    -- - @{}@ to group conditions (e.g. @**​/*.{ts,js}@ matches all TypeScript and JavaScript files)-    -- - @[]@ to declare a range of characters to match in a path segment (e.g., @example.[0-9]@ to match on @example.0@, @example.1@, …)-    -- - @[!...]@ to negate a range of characters to match in a path segment (e.g., @example.[!0-9]@ to match on @example.a@, @example.b@, but not @example.0@)-    _globPattern :: Text,-    -- | The kind of events of interest. If omitted it defaults-    -- to WatchKind.Create | WatchKind.Change | WatchKind.Delete-    -- which is 7.-    _kind :: Maybe WatchKind-  } deriving (Show, Read, Eq)--data WatchKind =-  WatchKind {-    -- | Watch for create events-    _watchCreate :: Bool,-    -- | Watch for change events-    _watchChange :: Bool,-    -- | Watch for delete events-    _watchDelete :: Bool-  } deriving (Show, Read, Eq)--instance ToJSON WatchKind where-  toJSON wk = Number (createNum + changeNum + deleteNum)-    where-      createNum = if _watchCreate wk then 0x1 else 0x0-      changeNum = if _watchChange wk then 0x2 else 0x0-      deleteNum = if _watchDelete wk then 0x4 else 0x0--instance FromJSON WatchKind where-  parseJSON (Number n)-    | Right i <- floatingOrInteger n :: Either Double Int-    , 0 <= i && i <= 7 =-        pure $ WatchKind (testBit i 0x0) (testBit i 0x1) (testBit i 0x2)-    | otherwise = fail "WatchKind"-  parseJSON _            = fail "WatchKind"--deriveJSON lspOptions ''FileSystemWatcher-deriveJSON lspOptions ''DidChangeWatchedFilesRegistrationOptions--- | The file event type.-data FileChangeType = FcCreated -- ^ The file got created.-                    | FcChanged -- ^ The file got changed.-                    | FcDeleted -- ^ The file got deleted.-       deriving (Read,Show,Eq)--instance ToJSON FileChangeType where-  toJSON FcCreated = Number 1-  toJSON FcChanged = Number 2-  toJSON FcDeleted = Number 3--instance FromJSON FileChangeType where-  parseJSON (Number 1) = pure FcCreated-  parseJSON (Number 2) = pure FcChanged-  parseJSON (Number 3) = pure FcDeleted-  parseJSON _          = fail "FileChangetype"----- ----------------------------------------- | An event describing a file change.-data FileEvent =-  FileEvent-  { -- | The file's URI.-    _uri   :: Uri-    -- | The change type.-  , _xtype :: FileChangeType-  } deriving (Read,Show,Eq)--deriveJSON lspOptions ''FileEvent--data DidChangeWatchedFilesParams =-  DidChangeWatchedFilesParams-  { -- | The actual file events.-    _changes :: List FileEvent-  } deriving (Read,Show,Eq)--deriveJSON lspOptions ''DidChangeWatchedFilesParams
− src/Language/LSP/Types/Window.hs
@@ -1,114 +0,0 @@-{-# LANGUAGE OverloadedStrings          #-}-{-# LANGUAGE DuplicateRecordFields      #-}-{-# LANGUAGE RecordWildCards            #-}-{-# LANGUAGE TemplateHaskell            #-}-module Language.LSP.Types.Window where--import qualified Data.Aeson                                 as A-import           Data.Aeson.TH-import           Data.Text                                  (Text)-import           Language.LSP.Types.Utils-import Language.LSP.Types.Uri-import Language.LSP.Types.Location---- -----------------------------------------------------------------------data MessageType = MtError   -- ^ Error = 1,-                 | MtWarning -- ^ Warning = 2,-                 | MtInfo    -- ^ Info = 3,-                 | MtLog     -- ^ Log = 4-        deriving (Eq,Ord,Show,Read,Enum)--instance A.ToJSON MessageType where-  toJSON MtError   = A.Number 1-  toJSON MtWarning = A.Number 2-  toJSON MtInfo    = A.Number 3-  toJSON MtLog     = A.Number 4--instance A.FromJSON MessageType where-  parseJSON (A.Number 1) = pure MtError-  parseJSON (A.Number 2) = pure MtWarning-  parseJSON (A.Number 3) = pure MtInfo-  parseJSON (A.Number 4) = pure MtLog-  parseJSON _            = fail "MessageType"---- ------------------------------------------data ShowMessageParams =-  ShowMessageParams {-    _xtype   :: MessageType-  , _message :: Text-  } deriving (Show, Read, Eq)--deriveJSON lspOptions ''ShowMessageParams---- -----------------------------------------------------------------------data MessageActionItem =-  MessageActionItem-    { _title :: Text-    } deriving (Show,Read,Eq)--deriveJSON lspOptions ''MessageActionItem---data ShowMessageRequestParams =-  ShowMessageRequestParams-    { _xtype   :: MessageType-    , _message :: Text-    , _actions :: Maybe [MessageActionItem]-    } deriving (Show,Read,Eq)--deriveJSON lspOptions ''ShowMessageRequestParams---- ------------------------------------------------------------------------- | Params to show a document.------ @since 3.16.0-data ShowDocumentParams =-  ShowDocumentParams {-    -- | The document uri to show.-    _uri :: Uri--    -- | Indicates to show the resource in an external program.-    -- To show for example `https://code.visualstudio.com/`-    -- in the default WEB browser set `external` to `true`.-  , _external :: Maybe Bool--    -- | An optional property to indicate whether the editor-    -- showing the document should take focus or not.-    -- Clients might ignore this property if an external-    -- program is started.-  , _takeFocus :: Maybe Bool--    -- | An optional selection range if the document is a text-    -- document. Clients might ignore the property if an-    -- external program is started or the file is not a text-    -- file.-  , _selection :: Maybe Range-  } deriving (Show, Read, Eq)--deriveJSON lspOptions ''ShowDocumentParams---- | The result of an show document request.------  @since 3.16.0-data ShowDocumentResult =-  ShowDocumentResult {-    -- | A boolean indicating if the show was successful.-    _success :: Bool-  } deriving (Show, Read, Eq)--deriveJSON lspOptions ''ShowDocumentResult---- -----------------------------------------------------------------------data LogMessageParams =-  LogMessageParams {-    _xtype   :: MessageType-  , _message :: Text-  } deriving (Show, Read, Eq)--deriveJSON lspOptions ''LogMessageParams
− src/Language/LSP/Types/WorkspaceEdit.hs
@@ -1,404 +0,0 @@-{-# LANGUAGE DuplicateRecordFields      #-}-{-# LANGUAGE TemplateHaskell            #-}-{-# LANGUAGE TypeOperators              #-}-{-# LANGUAGE OverloadedStrings          #-}-{-# LANGUAGE RecordWildCards            #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}--module Language.LSP.Types.WorkspaceEdit where--import           Control.Monad                              (unless)-import           Data.Aeson-import           Data.Aeson.TH-import qualified Data.HashMap.Strict                        as H-import           Data.Maybe                                 (catMaybes)-import           Data.Text                                  (Text)-import qualified Data.Text                                  as T-import           Data.Hashable--import           Language.LSP.Types.Common-import           Language.LSP.Types.Location-import           Language.LSP.Types.TextDocument-import           Language.LSP.Types.Uri-import           Language.LSP.Types.Utils---- -----------------------------------------------------------------------data TextEdit =-  TextEdit-    { _range   :: Range-    , _newText :: Text-    } deriving (Show,Read,Eq)--deriveJSON lspOptions ''TextEdit---- -----------------------------------------------------------------------{-|-Additional information that describes document changes.--@since 3.16.0--}-data ChangeAnnotation =-  ChangeAnnotation-    { -- | A human-readable string describing the actual change. The string-      -- is rendered prominent in the user interface.-      _label             :: Text-      -- | A flag which indicates that user confirmation is needed-      -- before applying the change.-    , _needsConfirmation :: Maybe Bool-      -- | A human-readable string which is rendered less prominent in-      -- the user interface.-    , _description       :: Maybe Text-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''ChangeAnnotation--{-|-An identifier referring to a change annotation managed by a workspace-edit.--@since 3.16.0--}-newtype ChangeAnnotationIdentifier = ChangeAnnotationIdentifierId Text-  deriving (Show, Read, Eq, FromJSON, ToJSON, ToJSONKey, FromJSONKey, Hashable)--makeExtendingDatatype "AnnotatedTextEdit" [''TextEdit]-  [("_annotationId", [t| ChangeAnnotationIdentifier |]) ]-deriveJSON lspOptions ''AnnotatedTextEdit---- -----------------------------------------------------------------------data TextDocumentEdit =-  TextDocumentEdit-    { _textDocument :: VersionedTextDocumentIdentifier-    , _edits        :: List (TextEdit |? AnnotatedTextEdit)-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''TextDocumentEdit---- ------------------------------------------------------------------------- | Options to create a file.-data CreateFileOptions =-  CreateFileOptions-    { -- | Overwrite existing file. Overwrite wins over `ignoreIfExists`-      _overwrite      :: Maybe Bool-      -- | Ignore if exists.-    , _ignoreIfExists :: Maybe Bool-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''CreateFileOptions---- | Create file operation-data CreateFile =-  CreateFile-    { -- | The resource to create.-      _uri      :: Uri-      -- | Additional options-    , _options  :: Maybe CreateFileOptions-      -- | An optional annotation identifer describing the operation.-      ---      -- @since 3.16.0-    , _annotationId  :: Maybe ChangeAnnotationIdentifier-    } deriving (Show, Read, Eq)--instance ToJSON CreateFile where-    toJSON CreateFile{..} =-      object $ catMaybes-        [ Just $ "kind" .= ("create" :: Text)-        , Just $ "uri" .= _uri-        , ("options" .=) <$> _options-        , ("annotationId" .=) <$> _annotationId-        ]--instance FromJSON CreateFile where-    parseJSON = withObject "CreateFile" $ \o -> do-        kind <- o .: "kind"-        unless (kind == ("create" :: Text)) -          $ fail $ "Expected kind \"create\" but got " ++ show kind-        _uri <- o .: "uri"-        _options <- o .:? "options"-        _annotationId <- o .:? "annotationId"-        pure CreateFile{..}---- Rename file options-data RenameFileOptions =-  RenameFileOptions-    { -- | Overwrite target if existing. Overwrite wins over `ignoreIfExists`-      _overwrite      :: Maybe Bool-      -- | Ignores if target exists.-    , _ignoreIfExists :: Maybe Bool-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''RenameFileOptions---- | Rename file operation-data RenameFile =-  RenameFile-    { -- | The old (existing) location.-      _oldUri   :: Uri-      -- | The new location.-    , _newUri   :: Uri-      -- | Rename options.-    , _options  :: Maybe RenameFileOptions-      -- | An optional annotation identifer describing the operation.-      ---      -- @since 3.16.0-    , _annotationId  :: Maybe ChangeAnnotationIdentifier-    } deriving (Show, Read, Eq)--instance ToJSON RenameFile where-    toJSON RenameFile{..} =-      object $ catMaybes-        [ Just $ "kind" .= ("rename" :: Text)-        , Just $ "oldUri" .= _oldUri-        , Just $ "newUri" .= _newUri-        , ("options" .=) <$> _options-        , ("annotationId" .=) <$> _annotationId-        ]--instance FromJSON RenameFile where-    parseJSON = withObject "RenameFile" $ \o -> do-        kind <- o .: "kind"-        unless (kind == ("rename" :: Text)) -          $ fail $ "Expected kind \"rename\" but got " ++ show kind-        _oldUri <- o .: "oldUri"-        _newUri <- o .: "newUri"-        _options <- o .:? "options"-        _annotationId <- o .:? "annotationId"-        pure RenameFile{..}---- Delete file options-data DeleteFileOptions =-  DeleteFileOptions-    { -- | Delete the content recursively if a folder is denoted.-      _recursive          :: Maybe Bool-      -- | Ignore the operation if the file doesn't exist.-    , _ignoreIfNotExists  :: Maybe Bool-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''DeleteFileOptions---- | Delete file operation-data DeleteFile =-  DeleteFile-    { -- | The file to delete.-      _uri      :: Uri-      -- | Delete options.-    , _options  :: Maybe DeleteFileOptions-      -- | An optional annotation identifer describing the operation.-      ---      -- @since 3.16.0-    , _annotationId  :: Maybe ChangeAnnotationIdentifier-    } deriving (Show, Read, Eq)--instance ToJSON DeleteFile where-    toJSON DeleteFile{..} =-      object $ catMaybes-        [ Just $ "kind" .= ("delete" :: Text)-        , Just $ "uri" .= _uri-        , ("options" .=) <$> _options-        , ("annotationId" .=) <$> _annotationId-        ]--instance FromJSON DeleteFile where-    parseJSON = withObject "DeleteFile" $ \o -> do-        kind <- o .: "kind"-        unless (kind == ("delete" :: Text)) -          $ fail $ "Expected kind \"delete\" but got " ++ show kind-        _uri <- o .: "uri"-        _options <- o .:? "options"-        _annotationId <- o .:? "annotationId"-        pure DeleteFile{..}---- ------------------------------------------------------------------------- | `TextDocumentEdit |? CreateFile |? RenameFile |? DeleteFile` is a bit mouthful, here's the synonym-type DocumentChange = TextDocumentEdit |? CreateFile |? RenameFile |? DeleteFile---- -----------------------------------------------------------------------type WorkspaceEditMap = H.HashMap Uri (List TextEdit)-type ChangeAnnotationMap = H.HashMap ChangeAnnotationIdentifier ChangeAnnotation--data WorkspaceEdit =-  WorkspaceEdit-    {-      -- | Holds changes to existing resources.-      _changes           :: Maybe WorkspaceEditMap-      -- | Depending on the client capability-      -- `workspace.workspaceEdit.resourceOperations` document changes are either-      -- an array of `TextDocumentEdit`s to express changes to n different text-      -- documents where each text document edit addresses a specific version of-      -- a text document. Or it can contain above `TextDocumentEdit`s mixed with-      -- create, rename and delete file / folder operations.-      ---      -- Whether a client supports versioned document edits is expressed via-      -- `workspace.workspaceEdit.documentChanges` client capability.-      ---      -- If a client neither supports `documentChanges` nor-      -- `workspace.workspaceEdit.resourceOperations` then only plain `TextEdit`s-      -- using the `changes` property are supported.-    , _documentChanges   :: Maybe (List DocumentChange)-      -- | A map of change annotations that can be referenced in-      -- `AnnotatedTextEdit`s or create, rename and delete file / folder-      -- operations.-      ---      -- Whether clients honor this property depends on the client capability-      -- `workspace.changeAnnotationSupport`.-      ---      -- @since 3.16.0-    , _changeAnnotations :: Maybe ChangeAnnotationMap-    } deriving (Show, Read, Eq)--instance Semigroup WorkspaceEdit where-  (WorkspaceEdit a b c) <> (WorkspaceEdit a' b' c') = WorkspaceEdit (a <> a') (b <> b') (c <> c')-instance Monoid WorkspaceEdit where-  mempty = WorkspaceEdit Nothing Nothing Nothing--deriveJSON lspOptions ''WorkspaceEdit---- ---------------------------------------data ResourceOperationKind-  = ResourceOperationCreate -- ^ Supports creating new files and folders.-  | ResourceOperationRename -- ^ Supports renaming existing files and folders.-  | ResourceOperationDelete -- ^ Supports deleting existing files and folders.-  deriving (Read, Show, Eq)-  -instance ToJSON ResourceOperationKind where-  toJSON ResourceOperationCreate = String "create"-  toJSON ResourceOperationRename = String "rename"-  toJSON ResourceOperationDelete = String "delete"--instance FromJSON ResourceOperationKind where-  parseJSON (String "create") = pure ResourceOperationCreate-  parseJSON (String "rename") = pure ResourceOperationRename-  parseJSON (String "delete") = pure ResourceOperationDelete-  parseJSON _                 = fail "ResourceOperationKind"--data FailureHandlingKind-  = FailureHandlingAbort -- ^ Applying the workspace change is simply aborted if one of the changes provided fails. All operations executed before the failing operation stay executed.-  | FailureHandlingTransactional -- ^ All operations are executed transactional. That means they either all succeed or no changes at all are applied to the workspace.-  | FailureHandlingTextOnlyTransactional -- ^ If the workspace edit contains only textual file changes they are executed transactional. If resource changes (create, rename or delete file) are part of the change the failure handling strategy is abort.-  | FailureHandlingUndo -- ^ The client tries to undo the operations already executed. But there is no guarantee that this is succeeding.-  deriving (Read, Show, Eq)-  -instance ToJSON FailureHandlingKind where-  toJSON FailureHandlingAbort                 = String "abort"-  toJSON FailureHandlingTransactional         = String "transactional"-  toJSON FailureHandlingTextOnlyTransactional = String "textOnlyTransactional"-  toJSON FailureHandlingUndo                  = String "undo"--instance FromJSON FailureHandlingKind where-  parseJSON (String "abort")                 = pure FailureHandlingAbort-  parseJSON (String "transactional")         = pure FailureHandlingTransactional-  parseJSON (String "textOnlyTransactional") = pure FailureHandlingTextOnlyTransactional-  parseJSON (String "undo")                  = pure FailureHandlingUndo-  parseJSON _                                = fail "FailureHandlingKind"--data WorkspaceEditChangeAnnotationClientCapabilities =-  WorkspaceEditChangeAnnotationClientCapabilities-  {-    -- | Whether the client groups edits with equal labels into tree nodes,-    -- for instance all edits labelled with "Changes in Strings" would-    -- be a tree node.-    groupsOnLabel :: Maybe Bool-  } deriving (Show, Read, Eq)--deriveJSON lspOptions ''WorkspaceEditChangeAnnotationClientCapabilities--data WorkspaceEditClientCapabilities =-  WorkspaceEditClientCapabilities-  { _documentChanges :: Maybe Bool -- ^The client supports versioned document-                                   -- changes in 'WorkspaceEdit's-    -- | The resource operations the client supports. Clients should at least-    -- support @create@, @rename@ and @delete@ files and folders.-  , _resourceOperations :: Maybe (List ResourceOperationKind)-    -- | The failure handling strategy of a client if applying the workspace edit-    -- fails.-  , _failureHandling :: Maybe FailureHandlingKind-    -- | Whether the client normalizes line endings to the client specific-    -- setting.-    ---    -- If set to `true` the client will normalize line ending characters-    -- in a workspace edit to the client specific new line character(s).-    ---    -- @since 3.16.0-  , _normalizesLineEndings :: Maybe Bool-    -- | Whether the client in general supports change annotations on text edits,-    -- create file, rename file and delete file changes.-    ---    -- @since 3.16.0-  , _changeAnnotationSupport :: Maybe WorkspaceEditChangeAnnotationClientCapabilities-  } deriving (Show, Read, Eq)--deriveJSON lspOptions ''WorkspaceEditClientCapabilities---- -----------------------------------------------------------------------data ApplyWorkspaceEditParams =-  ApplyWorkspaceEditParams-    { -- | An optional label of the workspace edit. This label is-      -- presented in the user interface for example on an undo-      -- stack to undo the workspace edit.-      _label :: Maybe Text-      -- | The edits to apply-    , _edit :: WorkspaceEdit-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''ApplyWorkspaceEditParams--data ApplyWorkspaceEditResponseBody =-  ApplyWorkspaceEditResponseBody-    { -- | Indicates whether the edit was applied or not.-      _applied :: Bool-      -- | An optional textual description for why the edit was not applied.-      -- This may be used may be used by the server for diagnostic-      -- logging or to provide a suitable error for a request that-      -- triggered the edit.-    , _failureReason :: Maybe Text-      -- | Depending on the client's failure handling strategy `failedChange`-      -- might contain the index of the change that failed. This property is-      -- only available if the client signals a `failureHandling` strategy-      -- in its client capabilities.-    , _failedChange :: Maybe UInt-    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''ApplyWorkspaceEditResponseBody---- ------------------------------------------------------------------------- | Applies a 'TextEdit' to some 'Text'.--- >>> applyTextEdit (TextEdit (Range (Position 0 1) (Position 0 2)) "i") "foo"--- "fio"-applyTextEdit :: TextEdit -> Text -> Text-applyTextEdit (TextEdit (Range sp ep) newText) oldText =-  let (_, afterEnd) = splitAtPos ep oldText-      (beforeStart, _) = splitAtPos sp oldText-    in mconcat [beforeStart, newText, afterEnd]-  where-    splitAtPos :: Position -> Text -> (Text, Text)-    splitAtPos (Position sl sc) t =-      -- If we are looking for a line beyond the end of the text, this will give us an index-      -- past the end. Fortunately, T.splitAt is fine with this, and just gives us the whole-      -- string and an empty string, which is what we want.-      let index = sc + startLineIndex sl t-        in T.splitAt (fromIntegral index) t--    -- The index of the first character of line 'line'-    startLineIndex :: UInt -> Text -> UInt-    startLineIndex 0 _ = 0-    startLineIndex line t' =-      case T.findIndex (== '\n') t' of-        Just i -> fromIntegral i + 1 + startLineIndex (line - 1) (T.drop (i + 1) t')-        -- i != 0, and there are no newlines, so this is a line beyond the end of the text.-        -- In this case give the "start index" as the end, so we will at least append the text.-        Nothing -> fromIntegral $ T.length t'---- | 'editTextEdit' @outer@ @inner@ applies @inner@ to the text inside @outer@.-editTextEdit :: TextEdit -> TextEdit -> TextEdit-editTextEdit (TextEdit origRange origText) innerEdit =-  let newText = applyTextEdit innerEdit origText-    in TextEdit origRange newText
− src/Language/LSP/Types/WorkspaceFolders.hs
@@ -1,37 +0,0 @@-{-# LANGUAGE DuplicateRecordFields #-}-{-# LANGUAGE TemplateHaskell       #-}-module Language.LSP.Types.WorkspaceFolders where--import           Data.Aeson.TH-import           Data.Text                      ( Text )--import           Language.LSP.Types.Common-import           Language.LSP.Types.Utils--data WorkspaceFolder =-  WorkspaceFolder-    { -- | The URI of the workspace folder.-      _uri  :: Text-    -- | The name of the workspace folder. Defaults to the uri's basename.-    , _name :: Text-    } deriving (Read, Show, Eq)--deriveJSON lspOptions ''WorkspaceFolder---- | The workspace folder change event.-data WorkspaceFoldersChangeEvent =-  WorkspaceFoldersChangeEvent-    { _added :: List WorkspaceFolder -- ^ The array of added workspace folders-    , _removed :: List WorkspaceFolder -- ^ The array of the removed workspace folders-    } deriving (Read, Show, Eq)--deriveJSON lspOptions ''WorkspaceFoldersChangeEvent--data DidChangeWorkspaceFoldersParams = -  DidChangeWorkspaceFoldersParams-    { _event :: WorkspaceFoldersChangeEvent-      -- ^ The actual workspace folder change event.-    } deriving (Read, Show, Eq)--deriveJSON lspOptions ''DidChangeWorkspaceFoldersParams-
− src/Language/LSP/Types/WorkspaceSymbol.hs
@@ -1,91 +0,0 @@-{-# LANGUAGE TemplateHaskell       #-}-{-# LANGUAGE DuplicateRecordFields #-}--module Language.LSP.Types.WorkspaceSymbol where--import Data.Aeson.TH-import Data.Default-import Language.LSP.Types.Common-import Language.LSP.Types.DocumentSymbol-import Language.LSP.Types.Progress-import Language.LSP.Types.Utils-import Data.Text (Text)--data WorkspaceSymbolKindClientCapabilities =-  WorkspaceSymbolKindClientCapabilities-   { -- | The symbol kind values the client supports. When this-     -- property exists the client also guarantees that it will-     -- handle values outside its set gracefully and falls back-     -- to a default value when unknown.-     ---     -- If this property is not present the client only supports-     -- the symbol kinds from `File` to `Array` as defined in-     -- the initial version of the protocol.-     _valueSet :: Maybe (List SymbolKind)-   } deriving (Show, Read, Eq)--deriveJSON lspOptions ''WorkspaceSymbolKindClientCapabilities--data WorkspaceSymbolTagClientCapabilities =-  WorkspaceSymbolTagClientCapabilities-    { -- | The tags supported by the client.-      _valueSet :: Maybe (List SymbolTag)-    }-  deriving (Show, Read, Eq)--deriveJSON lspOptions ''WorkspaceSymbolTagClientCapabilities--instance Default WorkspaceSymbolKindClientCapabilities where-  def = WorkspaceSymbolKindClientCapabilities (Just $ List allKinds)-    where allKinds = [ SkFile-                     , SkModule-                     , SkNamespace-                     , SkPackage-                     , SkClass-                     , SkMethod-                     , SkProperty-                     , SkField-                     , SkConstructor-                     , SkEnum-                     , SkInterface-                     , SkFunction-                     , SkVariable-                     , SkConstant-                     , SkString-                     , SkNumber-                     , SkBoolean-                     , SkArray-                     ]--data WorkspaceSymbolClientCapabilities =-  WorkspaceSymbolClientCapabilities-    { _dynamicRegistration :: Maybe Bool -- ^Symbol request supports dynamic-                                         -- registration.-    , _symbolKind :: Maybe WorkspaceSymbolKindClientCapabilities -- ^ Specific capabilities for the `SymbolKind`.-      -- | The client supports tags on `SymbolInformation`.-      -- Clients supporting tags have to handle unknown tags gracefully.-      ---      -- @since 3.16.0-    , _tagSupport :: Maybe WorkspaceSymbolTagClientCapabilities -    } deriving (Show, Read, Eq)--deriveJSON lspOptions ''WorkspaceSymbolClientCapabilities---- ---------------------------------------makeExtendingDatatype "WorkspaceSymbolOptions" [''WorkDoneProgressOptions] []-deriveJSON lspOptions ''WorkspaceSymbolOptions--makeExtendingDatatype "WorkspaceSymbolRegistrationOptions"-  [''WorkspaceSymbolOptions] []-deriveJSON lspOptions ''WorkspaceSymbolRegistrationOptions---- ---------------------------------------makeExtendingDatatype "WorkspaceSymbolParams"-  [ ''WorkDoneProgressParams-  , ''PartialResultParams-  ]-  [("_query", [t| Text |])]--deriveJSON lspOptions ''WorkspaceSymbolParams
test/CapabilitiesSpec.hs view
@@ -1,16 +1,19 @@+{-# LANGUAGE DuplicateRecordFields #-}++{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} module CapabilitiesSpec where -import Language.LSP.Types-import Language.LSP.Types.Capabilities-import Test.Hspec+import           Language.LSP.Protocol.Types+import           Language.LSP.Protocol.Capabilities+import           Test.Hspec  spec :: Spec spec = describe "capabilities" $ do   it "gives 3.10 capabilities" $-    let ClientCapabilities _ (Just tdcs) _ _ _ = capsForVersion (LSPVersion 3 10)-        Just (DocumentSymbolClientCapabilities _ _ mHierarchical _ _ ) = _documentSymbol tdcs+    let ClientCapabilities{_textDocument=Just tdcs} = capsForVersion (LSPVersion 3 10)+        Just (DocumentSymbolClientCapabilities{_hierarchicalDocumentSymbolSupport=mHierarchical}) = _documentSymbol tdcs       in mHierarchical `shouldBe` Just True   it "gives pre 3.10 capabilities" $-      let ClientCapabilities _ (Just tdcs) _ _ _ = capsForVersion (LSPVersion 3 9)-          Just (DocumentSymbolClientCapabilities _ _ mHierarchical _ _) = _documentSymbol tdcs+      let ClientCapabilities{_textDocument=Just tdcs} = capsForVersion (LSPVersion 3 9)+          Just (DocumentSymbolClientCapabilities{_hierarchicalDocumentSymbolSupport=mHierarchical}) = _documentSymbol tdcs         in mHierarchical `shouldBe` Nothing
test/JsonSpec.hs view
@@ -1,23 +1,34 @@-{-# LANGUAGE UndecidableInstances #-}-{-# LANGUAGE FlexibleContexts     #-}-{-# LANGUAGE TypeInType           #-}-{-# LANGUAGE FlexibleInstances    #-}-{-# LANGUAGE OverloadedStrings    #-}-{-# LANGUAGE TypeSynonymInstances #-}-{-# OPTIONS_GHC -fno-warn-orphans #-}--- For the use of MarkedString+{-# LANGUAGE FlexibleContexts           #-}+{-# LANGUAGE FlexibleInstances          #-}+{-# LANGUAGE OverloadedStrings          #-}+{-# LANGUAGE ScopedTypeVariables        #-}+{-# LANGUAGE TypeApplications           #-}+{-# LANGUAGE TypeInType                 #-}+{-# LANGUAGE TypeFamilies               #-}+{-# LANGUAGE UndecidableInstances       #-}+{-# LANGUAGE DerivingStrategies         #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE StandaloneDeriving         #-}+{-# LANGUAGE TypeOperators              #-}++-- we're using some deprecated stuff from the LSP spec, that's fine {-# OPTIONS_GHC -fno-warn-deprecations #-}+{-# OPTIONS_GHC -fno-warn-orphans #-} -- | Test for JSON serialization module JsonSpec where -import           Language.LSP.Types+import           Language.LSP.Protocol.Types+import           Language.LSP.Protocol.Message -import qualified Data.Aeson                    as J-import           Data.List(isPrefixOf)+import qualified Data.Aeson                as J+import           Data.List                 (isPrefixOf)+import qualified Data.Row                  as R+import qualified Data.Row.Records          as R+import           Data.Void import           Test.Hspec import           Test.Hspec.QuickCheck-import           Test.QuickCheck               hiding (Success)-import           Test.QuickCheck.Instances     ()+import           Test.QuickCheck           hiding (Success)+import           Test.QuickCheck.Instances ()  -- import Debug.Trace -- ---------------------------------------------------------------------@@ -38,19 +49,15 @@ jsonSpec = do   describe "General JSON instances round trip" $ do   -- DataTypesJSON-    prop "LanguageString" (propertyJsonRoundtrip :: LanguageString -> Property)     prop "MarkedString"   (propertyJsonRoundtrip :: MarkedString -> Property)     prop "MarkupContent"  (propertyJsonRoundtrip :: MarkupContent -> Property)-    prop "HoverContents"  (propertyJsonRoundtrip :: HoverContents -> Property)-    prop "ResponseError"  (propertyJsonRoundtrip :: ResponseError -> Property)+    prop "TextDocumentContentChangeEvent"  (propertyJsonRoundtrip :: TextDocumentContentChangeEvent -> Property)     prop "WatchedFiles"   (propertyJsonRoundtrip :: DidChangeWatchedFilesRegistrationOptions -> Property)-    prop "ResponseMessage Initialize"-         (propertyJsonRoundtrip :: ResponseMessage 'TextDocumentHover -> Property)-    -- prop "ResponseMessage JSON value"-        --  (propertyJsonRoundtrip :: ResponseMessage J.Value -> Property)+    prop "ResponseMessage Hover"+         (propertyJsonRoundtrip :: TResponseMessage 'Method_TextDocumentHover -> Property)   describe "JSON decoding regressions" $     it "CompletionItem" $-      (J.decode "{\"jsonrpc\":\"2.0\",\"result\":[{\"label\":\"raisebox\"}],\"id\":1}" :: Maybe (ResponseMessage 'TextDocumentCompletion))+      (J.decode "{\"jsonrpc\":\"2.0\",\"result\":[{\"label\":\"raisebox\"}],\"id\":1}" :: Maybe (TResponseMessage 'Method_TextDocumentCompletion))         `shouldNotBe` Nothing  @@ -60,18 +67,18 @@     it "decodes result = null" $ do       let input = "{\"jsonrpc\": \"2.0\", \"id\": 123, \"result\": null}"         in  J.decode input `shouldBe` Just-              ((ResponseMessage "2.0" (Just (IdInt 123)) (Right J.Null)) :: ResponseMessage 'WorkspaceExecuteCommand)+              ((TResponseMessage "2.0" (Just (IdInt 123)) (Right $ InL J.Null)) :: TResponseMessage 'Method_WorkspaceExecuteCommand)     it "handles missing params field" $ do       J.eitherDecode "{ \"jsonrpc\": \"2.0\", \"id\": 15, \"method\": \"shutdown\"}"-        `shouldBe` Right (RequestMessage "2.0" (IdInt 15) SShutdown Empty)+        `shouldBe` Right (TRequestMessage "2.0" (IdInt 15) SMethod_Shutdown Nothing)   describe "invalid JSON" $ do     it "throws if neither result nor error is present" $ do-      (J.eitherDecode "{\"jsonrpc\":\"2.0\",\"id\":1}" :: Either String (ResponseMessage 'Initialize))+      (J.eitherDecode "{\"jsonrpc\":\"2.0\",\"id\":1}" :: Either String (TResponseMessage 'Method_Initialize))         `shouldBe` Left ("Error in $: both error and result cannot be Nothing")     it "throws if both result and error are present" $ do       (J.eitherDecode-        "{\"jsonrpc\":\"2.0\",\"id\": 1,\"result\":{\"capabilities\": {}},\"error\":{\"code\":-32700,\"message\":\"\",\"data\":null}}"-        :: Either String (ResponseMessage 'Initialize))+        "{\"jsonrpc\":\"2.0\",\"id\": 1,\"result\":{\"capabilities\": {}},\"error\":{\"code\":-32700,\"message\":\"\",\"data\":{ \"retry\":false}}}"+        :: Either String (TResponseMessage 'Method_Initialize))         `shouldSatisfy`           (either (\err -> "Error in $: both error and result cannot be present" `isPrefixOf` err) (\_ -> False)) @@ -82,92 +89,121 @@  -- --------------------------------------------------------------------- -instance Arbitrary LanguageString where-  arbitrary = LanguageString <$> arbitrary <*> arbitrary+instance (Arbitrary a, Arbitrary b) => Arbitrary (a |? b) where+  arbitrary = oneof [InL <$> arbitrary, InR <$> arbitrary]+  shrink = genericShrink -instance Arbitrary MarkedString where-  arbitrary = oneof [PlainString <$> arbitrary, CodeString <$> arbitrary]+instance Arbitrary Null where+  arbitrary = pure Null +instance (R.AllUniqueLabels r, R.Forall r Arbitrary) => Arbitrary (R.Rec r) where+  arbitrary = R.fromLabelsA @Arbitrary $ \_l -> arbitrary+  shrink record = R.traverse @Arbitrary @[] shrink record++deriving newtype instance Arbitrary MarkedString+ instance Arbitrary MarkupContent where   arbitrary = MarkupContent <$> arbitrary <*> arbitrary+  shrink = genericShrink  instance Arbitrary MarkupKind where-  arbitrary = oneof [pure MkPlainText,pure MkMarkdown]--instance Arbitrary HoverContents where-  arbitrary = oneof [ HoverContentsMS <$> arbitrary-                    , HoverContents <$> arbitrary-                    ]+  arbitrary = oneof [pure MarkupKind_PlainText,pure MarkupKind_Markdown]+  shrink = genericShrink  instance Arbitrary UInt where   arbitrary = fromInteger <$> arbitrary  instance Arbitrary Uri where   arbitrary = Uri <$> arbitrary+  shrink = genericShrink +--deriving newtype instance Arbitrary URI++instance Arbitrary WorkspaceFolder where+  arbitrary = WorkspaceFolder <$> arbitrary <*> arbitrary+  shrink = genericShrink++instance Arbitrary RelativePattern where+  arbitrary = RelativePattern <$> arbitrary <*> arbitrary+  shrink = genericShrink++deriving newtype instance Arbitrary Pattern+deriving newtype instance Arbitrary GlobPattern+ instance Arbitrary Position where   arbitrary = Position <$> arbitrary <*> arbitrary+  shrink = genericShrink  instance Arbitrary Location where   arbitrary = Location <$> arbitrary <*> arbitrary+  shrink = genericShrink  instance Arbitrary Range where   arbitrary = Range <$> arbitrary <*> arbitrary+  shrink = genericShrink  instance Arbitrary Hover where   arbitrary = Hover <$> arbitrary <*> arbitrary+  shrink = genericShrink -instance Arbitrary (ResponseResult m) => Arbitrary (ResponseMessage m) where-  arbitrary =-    oneof-      [ ResponseMessage-          <$> arbitrary-          <*> arbitrary-          <*> (Right <$> arbitrary)-      , ResponseMessage-          <$> arbitrary-          <*> arbitrary-          <*> (Left <$> arbitrary)-      ]+instance {-# OVERLAPPING #-} Arbitrary (Maybe Void) where+  arbitrary = pure Nothing -instance Arbitrary (LspId m) where-  arbitrary = oneof [IdInt <$> arbitrary, IdString <$> arbitrary]+instance (ErrorData m ~ Maybe Void) => Arbitrary (TResponseError m) where+  arbitrary = TResponseError <$> arbitrary <*> arbitrary <*> pure Nothing+  shrink = genericShrink  instance Arbitrary ResponseError where   arbitrary = ResponseError <$> arbitrary <*> arbitrary <*> pure Nothing+  shrink = genericShrink -instance Arbitrary ErrorCode where+instance (Arbitrary (MessageResult m), ErrorData m ~ Maybe Void) => Arbitrary (TResponseMessage m) where+  arbitrary = TResponseMessage <$> arbitrary <*> arbitrary <*> arbitrary+  shrink = genericShrink++instance Arbitrary (LspId m) where+  arbitrary = oneof [IdInt <$> arbitrary, IdString <$> arbitrary]+  shrink = genericShrink++instance Arbitrary ErrorCodes where   arbitrary =     elements-      [ ParseError-      , InvalidRequest-      , MethodNotFound-      , InvalidParams-      , InternalError-      , ServerErrorStart-      , ServerErrorEnd-      , ServerNotInitialized-      , UnknownErrorCode-      , RequestCancelled-      , ContentModified+      [ ErrorCodes_ParseError+      , ErrorCodes_InvalidRequest+      , ErrorCodes_MethodNotFound+      , ErrorCodes_InvalidParams+      , ErrorCodes_InternalError+      , ErrorCodes_ServerNotInitialized+      , ErrorCodes_UnknownErrorCode       ]---- | make lists of maximum length 3 for test performance-smallList :: Gen a -> Gen [a]-smallList = resize 3 . listOf--instance (Arbitrary a) => Arbitrary (List a) where-  arbitrary = List <$> arbitrary+  shrink = genericShrink +instance Arbitrary LSPErrorCodes where+  arbitrary =+    elements+      [ LSPErrorCodes_RequestFailed+      , LSPErrorCodes_ServerCancelled+      , LSPErrorCodes_ContentModified+      , LSPErrorCodes_RequestCancelled+      ]+  shrink = genericShrink -- ---------------------------------------------------------------------  instance Arbitrary DidChangeWatchedFilesRegistrationOptions where   arbitrary = DidChangeWatchedFilesRegistrationOptions <$> arbitrary+  shrink = genericShrink  instance Arbitrary FileSystemWatcher where   arbitrary = FileSystemWatcher <$> arbitrary <*> arbitrary+  shrink = genericShrink +-- TODO: watchKind is weird instance Arbitrary WatchKind where-  arbitrary = WatchKind <$> arbitrary <*> arbitrary <*> arbitrary+  arbitrary = oneof [pure WatchKind_Change, pure WatchKind_Create, pure WatchKind_Delete]+  shrink = genericShrink  -- ---------------------------------------------------------------------+--+instance Arbitrary TextDocumentContentChangeEvent where+  arbitrary = TextDocumentContentChangeEvent <$> arbitrary+  shrink = genericShrink
test/LocationSpec.hs view
@@ -2,7 +2,7 @@  module LocationSpec where -import           Language.LSP.Types+import           Language.LSP.Protocol.Types import           Test.Hspec  main :: IO ()
test/Main.hs view
@@ -1,7 +1,7 @@ module Main where -import Test.Hspec.Runner import qualified Spec+import           Test.Hspec.Runner  main :: IO () main = hspec Spec.spec
test/MethodSpec.hs view
@@ -1,12 +1,13 @@-{-# LANGUAGE OverloadedStrings, DataKinds #-}+{-# LANGUAGE DataKinds         #-}+{-# LANGUAGE OverloadedStrings #-} module MethodSpec where   import           Control.Monad-import qualified Data.Aeson as J-import qualified Language.LSP.Types            as J+import qualified Data.Aeson         as J+import qualified Data.Text          as T+import qualified Language.LSP.Protocol.Message as J import           Test.Hspec-import qualified Data.Text as T  -- --------------------------------------------------------------------- @@ -31,7 +32,6 @@   ,"workspace/didChangeWatchedFiles"   ,"workspace/symbol"   ,"workspace/executeCommand"-  ,"workspace/semanticTokens/refresh"  -- Document   ,"textDocument/didOpen"   ,"textDocument/didChange"@@ -61,7 +61,8 @@   ,"callHierarchy/incomingCalls"   ,"callHierarchy/outgoingCalls" -  ,"textDocument/semanticTokens"+  -- FIXME: weird method+  -- ,"textDocument/semanticTokens"   ,"textDocument/semanticTokens/full"   ,"textDocument/semanticTokens/full/delta"   ,"textDocument/semanticTokens/range"@@ -79,6 +80,7 @@   ,"client/unregisterCapability"   -- Workspace   ,"workspace/applyEdit"+  ,"workspace/semanticTokens/refresh"   -- Document   ,"textDocument/publishDiagnostics"   ]
test/SemanticTokensSpec.hs view
@@ -1,33 +1,37 @@ {-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE TypeApplications #-}+{-# LANGUAGE TypeApplications  #-} module SemanticTokensSpec where -import Test.Hspec-import Language.LSP.Types-import Data.List (unfoldr)-import Data.Either (isRight)+import           Data.Either        (isRight)+import           Data.List          (unfoldr)+import           Language.LSP.Protocol.Types+import           Test.Hspec  spec :: Spec spec = do-  let exampleLegend = SemanticTokensLegend (List [SttProperty, SttType, SttClass]) (List [StmUnknown "private", StmStatic])+  let+      allMods = [SemanticTokenModifiers_Abstract, SemanticTokenModifiers_Static]+      exampleLegend = SemanticTokensLegend+        (fmap toEnumBaseType [SemanticTokenTypes_Property, SemanticTokenTypes_Type, SemanticTokenTypes_Class])+        (fmap toEnumBaseType allMods)       exampleTokens1 = [-        SemanticTokenAbsolute 2 5 3 SttProperty [StmUnknown "private", StmStatic]-        , SemanticTokenAbsolute 2 10 4 SttType []-        , SemanticTokenAbsolute 5 2 7 SttClass []+        SemanticTokenAbsolute 2 5 3 SemanticTokenTypes_Property allMods+        , SemanticTokenAbsolute 2 10 4 SemanticTokenTypes_Type []+        , SemanticTokenAbsolute 5 2 7 SemanticTokenTypes_Class []         ]       exampleTokens2 = [-        SemanticTokenAbsolute 3 5 3 SttProperty [StmUnknown "private", StmStatic]-        , SemanticTokenAbsolute 3 10 4 SttType []-        , SemanticTokenAbsolute 6 2 7 SttClass []+        SemanticTokenAbsolute 3 5 3 SemanticTokenTypes_Property allMods+        , SemanticTokenAbsolute 3 10 4 SemanticTokenTypes_Type []+        , SemanticTokenAbsolute 6 2 7 SemanticTokenTypes_Class []         ]        bigNumber :: UInt       bigNumber = 100000       bigTokens =-        unfoldr (\i -> if i == bigNumber then Nothing else Just (SemanticTokenAbsolute i 1 1 SttType [StmUnknown "private", StmStatic], i+1)) 0+        unfoldr (\i -> if i == bigNumber then Nothing else Just (SemanticTokenAbsolute i 1 1 SemanticTokenTypes_Type allMods, i+1)) 0       -- Relativized version of bigTokens       bigTokensRel =-        unfoldr (\i -> if i == bigNumber then Nothing else Just (SemanticTokenRelative (if i == 0 then 0 else 1) 1 1 SttType [StmUnknown "private", StmStatic], i+1)) 0+        unfoldr (\i -> if i == bigNumber then Nothing else Just (SemanticTokenRelative (if i == 0 then 0 else 1) 1 1 SemanticTokenTypes_Type allMods, i+1)) 0        -- One more order of magnitude makes diffing more-or-less hang - possibly we need a better diffing algorithm, since this is only ~= 200 tokens at 5 ints per token       -- (I checked and it is the diffing that's slow, not turning it into edits)
test/ServerCapabilitiesSpec.hs view
@@ -1,40 +1,44 @@-{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE OverloadedLabels    #-}+{-# LANGUAGE OverloadedStrings   #-}+{-# LANGUAGE ScopedTypeVariables #-} module ServerCapabilitiesSpec where -import Control.Lens.Operators-import Data.Aeson-import Language.LSP.Types-import Language.LSP.Types.Capabilities-import Language.LSP.Types.Lens-import Test.Hspec+import           Control.Lens.Operators+import           Data.Aeson             hiding (Null)+import           Data.Row+import           Data.Maybe (fromJust)+import           Language.LSP.Protocol.Types+import           Language.LSP.Protocol.Lens+import           Language.LSP.Protocol.Message+import           Test.Hspec  spec :: Spec spec = describe "server capabilities" $ do   describe "folding range options" $ do     describe "decodes" $ do       it "just id" $-        let input = "{\"id\": \"abc123\"}"-          in decode input `shouldBe` Just (FoldingRangeRegistrationOptions Nothing Nothing (Just "abc123"))+        let input = "{\"id\": \"abc123\", \"documentSelector\": null}"+          in decode input `shouldBe` Just (FoldingRangeRegistrationOptions (InR Null) Nothing (Just "abc123"))       it "id and document selector" $         let input = "{\"id\": \"foo\", \"documentSelector\": " <> documentFiltersJson <> "}"-          in decode input `shouldBe` Just (FoldingRangeRegistrationOptions (Just documentFilters) Nothing (Just "foo"))+          in decode input `shouldBe` Just (FoldingRangeRegistrationOptions (InL documentFilters) Nothing (Just "foo"))       it "static boolean" $         let input = "true"           in decode input `shouldBe` Just True     describe "encodes" $       it "just id" $-        encode (FoldingRangeRegistrationOptions Nothing Nothing (Just "foo")) `shouldBe` "{\"id\":\"foo\"}"+        encode (FoldingRangeRegistrationOptions (InR Null) Nothing (Just "foo")) `shouldBe` "{\"documentSelector\":null,\"id\":\"foo\"}"   it "decodes" $     let input = "{\"hoverProvider\": true, \"colorProvider\": {\"id\": \"abc123\", \"documentSelector\": " <> documentFiltersJson <> "}}"-        Just caps = decode input :: Maybe ServerCapabilities-      in caps ^. colorProvider `shouldBe` Just (InR $ InR $ DocumentColorRegistrationOptions (Just documentFilters) (Just "abc123") Nothing)+        caps :: ServerCapabilities = fromJust $ decode input+      in caps ^. colorProvider `shouldBe` Just (InR $ InR $ DocumentColorRegistrationOptions (InL documentFilters) Nothing (Just "abc123"))   describe "client/registerCapability" $     it "allows empty registerOptions" $       let input = "{\"registrations\":[{\"registerOptions\":{},\"method\":\"workspace/didChangeConfiguration\",\"id\":\"4a56f5ca-7188-4f4c-a366-652d6f9d63aa\"}]}"-          Just registrationParams = decode input :: Maybe RegistrationParams+          registrationParams :: RegistrationParams = fromJust $ decode input         in registrationParams ^. registrations `shouldBe`-             List [SomeRegistration $ Registration "4a56f5ca-7188-4f4c-a366-652d6f9d63aa"-                                      SWorkspaceDidChangeConfiguration Empty]+             [toUntypedRegistration $ TRegistration "4a56f5ca-7188-4f4c-a366-652d6f9d63aa"+                                      SMethod_WorkspaceDidChangeConfiguration (Just $ DidChangeConfigurationRegistrationOptions Nothing)]   where-    documentFilters = List [DocumentFilter (Just "haskell") Nothing Nothing]+    documentFilters = DocumentSelector [DocumentFilter $ InL $ TextDocumentFilter $ InL $ #language .== "haskell" .+ #scheme .== Nothing .+ #pattern .== Nothing]     documentFiltersJson = "[{\"language\": \"haskell\"}]"
test/TypesSpec.hs view
@@ -1,30 +1,18 @@ {-# LANGUAGE OverloadedStrings #-} module TypesSpec where -import qualified Language.LSP.Types as J+import qualified Language.LSP.Protocol.Types as J import           Test.Hspec --- -----------------------------------------------------------------------main :: IO ()-main = hspec spec- spec :: Spec-spec = diagnosticsSpec---- -----------------------------------------------------------------------diagnosticsSpec :: Spec-diagnosticsSpec = do+spec = do   describe "MarkupContent" $ do     it "appends two plainstrings" $ do-      J.unmarkedUpContent "string1\n" <> J.unmarkedUpContent "string2\n"-        `shouldBe` J.unmarkedUpContent "string1\nstring2\n"+      J.mkPlainText "string1\n" <> J.mkPlainText "string2\n"+        `shouldBe` J.mkPlainText "string1\nstring2\n"     it "appends a marked up and a plain string" $ do-      J.markedUpContent "haskell" "foo :: Int" <> J.unmarkedUpContent "string2\nstring3\n"-        `shouldBe` J.MarkupContent J.MkMarkdown "\n```haskell\nfoo :: Int\n```\nstring2  \nstring3  \n"+      J.mkMarkdownCodeBlock "haskell" "foo :: Int" <> J.mkPlainText "string2\nstring3\n"+        `shouldBe` J.MarkupContent J.MarkupKind_Markdown "\n```haskell\nfoo :: Int\n```\nstring2  \nstring3  \n"     it "appends a plain string and a marked up string" $ do-       J.unmarkedUpContent "string2\n" <> J.markedUpContent "haskell" "foo :: Int"-        `shouldBe` J.MarkupContent J.MkMarkdown "string2  \n\n```haskell\nfoo :: Int\n```\n"---- ---------------------------------------------------------------------+       J.mkPlainText "string2\n" <> J.mkMarkdownCodeBlock "haskell" "foo :: Int"+        `shouldBe` J.MarkupContent J.MarkupKind_Markdown "string2  \n\n```haskell\nfoo :: Int\n```\n"
test/URIFilePathSpec.hs view
@@ -2,7 +2,12 @@ {-# LANGUAGE OverloadedStrings   #-} {-# LANGUAGE ScopedTypeVariables #-} +-- We're testing our own deprecated function here!+{-# OPTIONS_GHC -Wno-deprecations #-}+{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}+ #if MIN_VERSION_filepath(1,4,100)+ #define OS_PATH #endif @@ -13,12 +18,12 @@ #endif  import           Control.Monad           (when)+import           Control.Exception       (throwIO) import           Data.List+import           Data.Maybe              (fromJust) import           Data.Text               (Text, pack)-import           Language.LSP.Types+import           Language.LSP.Protocol.Types -import           Control.Exception       (IOException, throwIO)-import           Data.Maybe              (fromJust) import           GHC.IO.Encoding         (setFileSystemEncoding) import           Network.URI import           System.FilePath         (normalise)@@ -89,12 +94,12 @@    it "converts a Windows file path to a URI" $ do     let theFilePath = platformAwareFilePathToUri windowsOS "c:/Functional.hs"-    theFilePath `shouldBe` (Uri "file:///c:/Functional.hs")+    theFilePath `shouldBe` Uri "file:///c:/Functional.hs"    it "converts a POSIX file path to a URI and back" $ do     let theFilePath = platformAwareFilePathToUri "posix" "./Functional.hs"-    theFilePath `shouldBe` (Uri "file://./Functional.hs")-    let Just (URI scheme' auth' path' query' frag') =  parseURI "file://./Functional.hs"+    theFilePath `shouldBe` Uri "file://./Functional.hs"+    let Just (URI scheme' auth' path' query' frag') = parseURI "file://./Functional.hs"     (scheme',auth',path',query',frag') `shouldBe`       ("file:"       ,Just (URIAuth {uriUserInfo = "", uriRegName = ".", uriPort = ""}) -- AZ: Seems odd@@ -201,8 +206,8 @@    it "converts a file path with initial current dir to a URI and back" $ do     let uri = filePathToUri withInitialCurrentDirFilePath-    uri `shouldBe` (Uri (pack withInitialCurrentDirUriStr))-    let Just (URI scheme' auth' path' query' frag') =  parseURI withInitialCurrentDirUriStr+    uri `shouldBe` Uri (pack withInitialCurrentDirUriStr)+    let Just (URI scheme' auth' path' query' frag') = parseURI withInitialCurrentDirUriStr     (scheme',auth',path',query',frag') `shouldBe` withInitialCurrentDirUriParts     Just "Functional.hs" `shouldBe` uriToFilePath uri 
test/WorkspaceEditSpec.hs view
@@ -1,8 +1,8 @@ {-# LANGUAGE OverloadedStrings #-} module WorkspaceEditSpec where -import Test.Hspec-import Language.LSP.Types+import           Language.LSP.Protocol.Types+import           Test.Hspec  spec :: Spec spec = do