From 794d6895797c5848c55100362173f916e8824bbc Mon Sep 17 00:00:00 2001 From: Michael Peyton Jones Date: Wed, 17 Jan 2024 12:28:48 +0000 Subject: [PATCH] Generate Arbitrary instance for all types (#544) * Generate Arbitrary instances for all types * More format --- lsp-types/ChangeLog.md | 1 + .../Language/LSP/Protocol/Internal/Lens.hs | 637 ------------------ .../Language/LSP/Protocol/Internal/Meta.hs | 382 +++++++++++ .../Protocol/Internal/Types/CodeActionKind.hs | 2 +- .../Internal/Types/CodeActionTriggerKind.hs | 2 +- .../Internal/Types/CompletionItemKind.hs | 2 +- .../Internal/Types/CompletionItemTag.hs | 2 +- .../Internal/Types/CompletionTriggerKind.hs | 2 +- .../Internal/Types/DiagnosticSeverity.hs | 2 +- .../Protocol/Internal/Types/DiagnosticTag.hs | 2 +- .../Types/DocumentDiagnosticReportKind.hs | 2 +- .../Internal/Types/DocumentHighlightKind.hs | 2 +- .../LSP/Protocol/Internal/Types/ErrorCodes.hs | 2 +- .../Internal/Types/FailureHandlingKind.hs | 2 +- .../Protocol/Internal/Types/FileChangeType.hs | 2 +- .../Types/FileOperationPatternKind.hs | 2 +- .../Internal/Types/FoldingRangeKind.hs | 2 +- .../Protocol/Internal/Types/InlayHintKind.hs | 2 +- .../Internal/Types/InsertTextFormat.hs | 2 +- .../Protocol/Internal/Types/InsertTextMode.hs | 2 +- .../Protocol/Internal/Types/LSPErrorCodes.hs | 2 +- .../LSP/Protocol/Internal/Types/MarkupKind.hs | 2 +- .../Protocol/Internal/Types/MessageType.hs | 2 +- .../Protocol/Internal/Types/MonikerKind.hs | 2 +- .../Internal/Types/NotebookCellKind.hs | 2 +- .../Internal/Types/PositionEncodingKind.hs | 2 +- .../Types/PrepareSupportDefaultBehavior.hs | 2 +- .../Internal/Types/ResourceOperationKind.hs | 2 +- .../Internal/Types/SemanticTokenModifiers.hs | 2 +- .../Internal/Types/SemanticTokenTypes.hs | 2 +- .../Types/SignatureHelpTriggerKind.hs | 2 +- .../LSP/Protocol/Internal/Types/SymbolKind.hs | 2 +- .../LSP/Protocol/Internal/Types/SymbolTag.hs | 2 +- .../Internal/Types/TextDocumentSaveReason.hs | 2 +- .../Internal/Types/TextDocumentSyncKind.hs | 2 +- .../Protocol/Internal/Types/TokenFormat.hs | 2 +- .../Protocol/Internal/Types/TraceValues.hs | 2 +- .../Internal/Types/UniquenessLevel.hs | 2 +- .../LSP/Protocol/Internal/Types/WatchKind.hs | 2 +- lsp-types/generator/CodeGen.hs | 46 +- lsp-types/lsp-types.cabal | 36 +- .../Language/LSP/Protocol/QuickCheck.hs | 6 + .../LSP/Protocol/QuickCheck/Common.hs | 49 ++ .../LSP/Protocol/QuickCheck/Message.hs | 87 +++ .../Language/LSP/Protocol/QuickCheck/Types.hs | 27 + lsp-types/src/Language/LSP/Protocol/Lens.hs | 4 - .../src/Language/LSP/Protocol/Message/Lens.hs | 2 +- lsp-types/src/Language/LSP/Protocol/Meta.hs | 3 + .../src/Language/LSP/Protocol/Types/Lens.hs | 7 +- .../Language/LSP/Protocol/Types/LspEnum.hs | 8 +- .../src/Language/LSP/Protocol/Utils/Misc.hs | 21 +- lsp-types/test/JsonSpec.hs | 135 +--- 52 files changed, 688 insertions(+), 835 deletions(-) delete mode 100644 lsp-types/generated/Language/LSP/Protocol/Internal/Lens.hs create mode 100644 lsp-types/generated/Language/LSP/Protocol/Internal/Meta.hs create mode 100644 lsp-types/quickcheck/Language/LSP/Protocol/QuickCheck.hs create mode 100644 lsp-types/quickcheck/Language/LSP/Protocol/QuickCheck/Common.hs create mode 100644 lsp-types/quickcheck/Language/LSP/Protocol/QuickCheck/Message.hs create mode 100644 lsp-types/quickcheck/Language/LSP/Protocol/QuickCheck/Types.hs create mode 100644 lsp-types/src/Language/LSP/Protocol/Meta.hs diff --git a/lsp-types/ChangeLog.md b/lsp-types/ChangeLog.md index 01b4d547..db8a68cd 100644 --- a/lsp-types/ChangeLog.md +++ b/lsp-types/ChangeLog.md @@ -4,6 +4,7 @@ - Require aeson 2 - Accept `null` in place of a missing field, a common mistake in spec compliance. +- Arbitrary instances for everything now exist and are exported via the new `lsp-types-quickcheck` library ## 2.1.0.0 -- 2023-11-13 diff --git a/lsp-types/generated/Language/LSP/Protocol/Internal/Lens.hs b/lsp-types/generated/Language/LSP/Protocol/Internal/Lens.hs deleted file mode 100644 index 781c3989..00000000 --- a/lsp-types/generated/Language/LSP/Protocol/Internal/Lens.hs +++ /dev/null @@ -1,637 +0,0 @@ -{- ORMOLU_DISABLE -} -{- HLINT ignore -} --- 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 diff --git a/lsp-types/generated/Language/LSP/Protocol/Internal/Meta.hs b/lsp-types/generated/Language/LSP/Protocol/Internal/Meta.hs new file mode 100644 index 00000000..7abe1292 --- /dev/null +++ b/lsp-types/generated/Language/LSP/Protocol/Internal/Meta.hs @@ -0,0 +1,382 @@ +{- ORMOLU_DISABLE -} +{- HLINT ignore -} +-- 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.Meta where + +import qualified Language.Haskell.TH as TH +import qualified Language.LSP.Protocol.Internal.Types + +structNames :: [TH.Name] +structNames = [''Language.LSP.Protocol.Internal.Types.ImplementationParams + ,''Language.LSP.Protocol.Internal.Types.Location + ,''Language.LSP.Protocol.Internal.Types.ImplementationRegistrationOptions + ,''Language.LSP.Protocol.Internal.Types.TypeDefinitionParams + ,''Language.LSP.Protocol.Internal.Types.TypeDefinitionRegistrationOptions + ,''Language.LSP.Protocol.Internal.Types.WorkspaceFolder + ,''Language.LSP.Protocol.Internal.Types.DidChangeWorkspaceFoldersParams + ,''Language.LSP.Protocol.Internal.Types.ConfigurationParams + ,''Language.LSP.Protocol.Internal.Types.DocumentColorParams + ,''Language.LSP.Protocol.Internal.Types.ColorInformation + ,''Language.LSP.Protocol.Internal.Types.DocumentColorRegistrationOptions + ,''Language.LSP.Protocol.Internal.Types.ColorPresentationParams + ,''Language.LSP.Protocol.Internal.Types.ColorPresentation + ,''Language.LSP.Protocol.Internal.Types.WorkDoneProgressOptions + ,''Language.LSP.Protocol.Internal.Types.TextDocumentRegistrationOptions + ,''Language.LSP.Protocol.Internal.Types.FoldingRangeParams + ,''Language.LSP.Protocol.Internal.Types.FoldingRange + ,''Language.LSP.Protocol.Internal.Types.FoldingRangeRegistrationOptions + ,''Language.LSP.Protocol.Internal.Types.DeclarationParams + ,''Language.LSP.Protocol.Internal.Types.DeclarationRegistrationOptions + ,''Language.LSP.Protocol.Internal.Types.SelectionRangeParams + ,''Language.LSP.Protocol.Internal.Types.SelectionRange + ,''Language.LSP.Protocol.Internal.Types.SelectionRangeRegistrationOptions + ,''Language.LSP.Protocol.Internal.Types.WorkDoneProgressCreateParams + ,''Language.LSP.Protocol.Internal.Types.WorkDoneProgressCancelParams + ,''Language.LSP.Protocol.Internal.Types.CallHierarchyPrepareParams + ,''Language.LSP.Protocol.Internal.Types.CallHierarchyItem + ,''Language.LSP.Protocol.Internal.Types.CallHierarchyRegistrationOptions + ,''Language.LSP.Protocol.Internal.Types.CallHierarchyIncomingCallsParams + ,''Language.LSP.Protocol.Internal.Types.CallHierarchyIncomingCall + ,''Language.LSP.Protocol.Internal.Types.CallHierarchyOutgoingCallsParams + ,''Language.LSP.Protocol.Internal.Types.CallHierarchyOutgoingCall + ,''Language.LSP.Protocol.Internal.Types.SemanticTokensParams + ,''Language.LSP.Protocol.Internal.Types.SemanticTokens + ,''Language.LSP.Protocol.Internal.Types.SemanticTokensPartialResult + ,''Language.LSP.Protocol.Internal.Types.SemanticTokensRegistrationOptions + ,''Language.LSP.Protocol.Internal.Types.SemanticTokensDeltaParams + ,''Language.LSP.Protocol.Internal.Types.SemanticTokensDelta + ,''Language.LSP.Protocol.Internal.Types.SemanticTokensDeltaPartialResult + ,''Language.LSP.Protocol.Internal.Types.SemanticTokensRangeParams + ,''Language.LSP.Protocol.Internal.Types.ShowDocumentParams + ,''Language.LSP.Protocol.Internal.Types.ShowDocumentResult + ,''Language.LSP.Protocol.Internal.Types.LinkedEditingRangeParams + ,''Language.LSP.Protocol.Internal.Types.LinkedEditingRanges + ,''Language.LSP.Protocol.Internal.Types.LinkedEditingRangeRegistrationOptions + ,''Language.LSP.Protocol.Internal.Types.CreateFilesParams + ,''Language.LSP.Protocol.Internal.Types.WorkspaceEdit + ,''Language.LSP.Protocol.Internal.Types.FileOperationRegistrationOptions + ,''Language.LSP.Protocol.Internal.Types.RenameFilesParams + ,''Language.LSP.Protocol.Internal.Types.DeleteFilesParams + ,''Language.LSP.Protocol.Internal.Types.MonikerParams + ,''Language.LSP.Protocol.Internal.Types.Moniker + ,''Language.LSP.Protocol.Internal.Types.MonikerRegistrationOptions + ,''Language.LSP.Protocol.Internal.Types.TypeHierarchyPrepareParams + ,''Language.LSP.Protocol.Internal.Types.TypeHierarchyItem + ,''Language.LSP.Protocol.Internal.Types.TypeHierarchyRegistrationOptions + ,''Language.LSP.Protocol.Internal.Types.TypeHierarchySupertypesParams + ,''Language.LSP.Protocol.Internal.Types.TypeHierarchySubtypesParams + ,''Language.LSP.Protocol.Internal.Types.InlineValueParams + ,''Language.LSP.Protocol.Internal.Types.InlineValueRegistrationOptions + ,''Language.LSP.Protocol.Internal.Types.InlayHintParams + ,''Language.LSP.Protocol.Internal.Types.InlayHint + ,''Language.LSP.Protocol.Internal.Types.InlayHintRegistrationOptions + ,''Language.LSP.Protocol.Internal.Types.DocumentDiagnosticParams + ,''Language.LSP.Protocol.Internal.Types.DocumentDiagnosticReportPartialResult + ,''Language.LSP.Protocol.Internal.Types.DiagnosticServerCancellationData + ,''Language.LSP.Protocol.Internal.Types.DiagnosticRegistrationOptions + ,''Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticParams + ,''Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticReport + ,''Language.LSP.Protocol.Internal.Types.WorkspaceDiagnosticReportPartialResult + ,''Language.LSP.Protocol.Internal.Types.DidOpenNotebookDocumentParams + ,''Language.LSP.Protocol.Internal.Types.DidChangeNotebookDocumentParams + ,''Language.LSP.Protocol.Internal.Types.DidSaveNotebookDocumentParams + ,''Language.LSP.Protocol.Internal.Types.DidCloseNotebookDocumentParams + ,''Language.LSP.Protocol.Internal.Types.RegistrationParams + ,''Language.LSP.Protocol.Internal.Types.UnregistrationParams + ,''Language.LSP.Protocol.Internal.Types.InitializeParams + ,''Language.LSP.Protocol.Internal.Types.InitializeResult + ,''Language.LSP.Protocol.Internal.Types.InitializeError + ,''Language.LSP.Protocol.Internal.Types.InitializedParams + ,''Language.LSP.Protocol.Internal.Types.DidChangeConfigurationParams + ,''Language.LSP.Protocol.Internal.Types.DidChangeConfigurationRegistrationOptions + ,''Language.LSP.Protocol.Internal.Types.ShowMessageParams + ,''Language.LSP.Protocol.Internal.Types.ShowMessageRequestParams + ,''Language.LSP.Protocol.Internal.Types.MessageActionItem + ,''Language.LSP.Protocol.Internal.Types.LogMessageParams + ,''Language.LSP.Protocol.Internal.Types.DidOpenTextDocumentParams + ,''Language.LSP.Protocol.Internal.Types.DidChangeTextDocumentParams + ,''Language.LSP.Protocol.Internal.Types.TextDocumentChangeRegistrationOptions + ,''Language.LSP.Protocol.Internal.Types.DidCloseTextDocumentParams + ,''Language.LSP.Protocol.Internal.Types.DidSaveTextDocumentParams + ,''Language.LSP.Protocol.Internal.Types.TextDocumentSaveRegistrationOptions + ,''Language.LSP.Protocol.Internal.Types.WillSaveTextDocumentParams + ,''Language.LSP.Protocol.Internal.Types.TextEdit + ,''Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesParams + ,''Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesRegistrationOptions + ,''Language.LSP.Protocol.Internal.Types.PublishDiagnosticsParams + ,''Language.LSP.Protocol.Internal.Types.CompletionParams + ,''Language.LSP.Protocol.Internal.Types.CompletionItem + ,''Language.LSP.Protocol.Internal.Types.CompletionList + ,''Language.LSP.Protocol.Internal.Types.CompletionRegistrationOptions + ,''Language.LSP.Protocol.Internal.Types.HoverParams + ,''Language.LSP.Protocol.Internal.Types.Hover + ,''Language.LSP.Protocol.Internal.Types.HoverRegistrationOptions + ,''Language.LSP.Protocol.Internal.Types.SignatureHelpParams + ,''Language.LSP.Protocol.Internal.Types.SignatureHelp + ,''Language.LSP.Protocol.Internal.Types.SignatureHelpRegistrationOptions + ,''Language.LSP.Protocol.Internal.Types.DefinitionParams + ,''Language.LSP.Protocol.Internal.Types.DefinitionRegistrationOptions + ,''Language.LSP.Protocol.Internal.Types.ReferenceParams + ,''Language.LSP.Protocol.Internal.Types.ReferenceRegistrationOptions + ,''Language.LSP.Protocol.Internal.Types.DocumentHighlightParams + ,''Language.LSP.Protocol.Internal.Types.DocumentHighlight + ,''Language.LSP.Protocol.Internal.Types.DocumentHighlightRegistrationOptions + ,''Language.LSP.Protocol.Internal.Types.DocumentSymbolParams + ,''Language.LSP.Protocol.Internal.Types.SymbolInformation + ,''Language.LSP.Protocol.Internal.Types.DocumentSymbol + ,''Language.LSP.Protocol.Internal.Types.DocumentSymbolRegistrationOptions + ,''Language.LSP.Protocol.Internal.Types.CodeActionParams + ,''Language.LSP.Protocol.Internal.Types.Command + ,''Language.LSP.Protocol.Internal.Types.CodeAction + ,''Language.LSP.Protocol.Internal.Types.CodeActionRegistrationOptions + ,''Language.LSP.Protocol.Internal.Types.WorkspaceSymbolParams + ,''Language.LSP.Protocol.Internal.Types.WorkspaceSymbol + ,''Language.LSP.Protocol.Internal.Types.WorkspaceSymbolRegistrationOptions + ,''Language.LSP.Protocol.Internal.Types.CodeLensParams + ,''Language.LSP.Protocol.Internal.Types.CodeLens + ,''Language.LSP.Protocol.Internal.Types.CodeLensRegistrationOptions + ,''Language.LSP.Protocol.Internal.Types.DocumentLinkParams + ,''Language.LSP.Protocol.Internal.Types.DocumentLink + ,''Language.LSP.Protocol.Internal.Types.DocumentLinkRegistrationOptions + ,''Language.LSP.Protocol.Internal.Types.DocumentFormattingParams + ,''Language.LSP.Protocol.Internal.Types.DocumentFormattingRegistrationOptions + ,''Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingParams + ,''Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingRegistrationOptions + ,''Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingParams + ,''Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingRegistrationOptions + ,''Language.LSP.Protocol.Internal.Types.RenameParams + ,''Language.LSP.Protocol.Internal.Types.RenameRegistrationOptions + ,''Language.LSP.Protocol.Internal.Types.PrepareRenameParams + ,''Language.LSP.Protocol.Internal.Types.ExecuteCommandParams + ,''Language.LSP.Protocol.Internal.Types.ExecuteCommandRegistrationOptions + ,''Language.LSP.Protocol.Internal.Types.ApplyWorkspaceEditParams + ,''Language.LSP.Protocol.Internal.Types.ApplyWorkspaceEditResult + ,''Language.LSP.Protocol.Internal.Types.WorkDoneProgressBegin + ,''Language.LSP.Protocol.Internal.Types.WorkDoneProgressReport + ,''Language.LSP.Protocol.Internal.Types.WorkDoneProgressEnd + ,''Language.LSP.Protocol.Internal.Types.SetTraceParams + ,''Language.LSP.Protocol.Internal.Types.LogTraceParams + ,''Language.LSP.Protocol.Internal.Types.CancelParams + ,''Language.LSP.Protocol.Internal.Types.ProgressParams + ,''Language.LSP.Protocol.Internal.Types.TextDocumentPositionParams + ,''Language.LSP.Protocol.Internal.Types.WorkDoneProgressParams + ,''Language.LSP.Protocol.Internal.Types.PartialResultParams + ,''Language.LSP.Protocol.Internal.Types.LocationLink + ,''Language.LSP.Protocol.Internal.Types.Range + ,''Language.LSP.Protocol.Internal.Types.ImplementationOptions + ,''Language.LSP.Protocol.Internal.Types.StaticRegistrationOptions + ,''Language.LSP.Protocol.Internal.Types.TypeDefinitionOptions + ,''Language.LSP.Protocol.Internal.Types.WorkspaceFoldersChangeEvent + ,''Language.LSP.Protocol.Internal.Types.ConfigurationItem + ,''Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier + ,''Language.LSP.Protocol.Internal.Types.Color + ,''Language.LSP.Protocol.Internal.Types.DocumentColorOptions + ,''Language.LSP.Protocol.Internal.Types.FoldingRangeOptions + ,''Language.LSP.Protocol.Internal.Types.DeclarationOptions + ,''Language.LSP.Protocol.Internal.Types.Position + ,''Language.LSP.Protocol.Internal.Types.SelectionRangeOptions + ,''Language.LSP.Protocol.Internal.Types.CallHierarchyOptions + ,''Language.LSP.Protocol.Internal.Types.SemanticTokensOptions + ,''Language.LSP.Protocol.Internal.Types.SemanticTokensEdit + ,''Language.LSP.Protocol.Internal.Types.LinkedEditingRangeOptions + ,''Language.LSP.Protocol.Internal.Types.FileCreate + ,''Language.LSP.Protocol.Internal.Types.TextDocumentEdit + ,''Language.LSP.Protocol.Internal.Types.CreateFile + ,''Language.LSP.Protocol.Internal.Types.RenameFile + ,''Language.LSP.Protocol.Internal.Types.DeleteFile + ,''Language.LSP.Protocol.Internal.Types.ChangeAnnotation + ,''Language.LSP.Protocol.Internal.Types.FileOperationFilter + ,''Language.LSP.Protocol.Internal.Types.FileRename + ,''Language.LSP.Protocol.Internal.Types.FileDelete + ,''Language.LSP.Protocol.Internal.Types.MonikerOptions + ,''Language.LSP.Protocol.Internal.Types.TypeHierarchyOptions + ,''Language.LSP.Protocol.Internal.Types.InlineValueContext + ,''Language.LSP.Protocol.Internal.Types.InlineValueText + ,''Language.LSP.Protocol.Internal.Types.InlineValueVariableLookup + ,''Language.LSP.Protocol.Internal.Types.InlineValueEvaluatableExpression + ,''Language.LSP.Protocol.Internal.Types.InlineValueOptions + ,''Language.LSP.Protocol.Internal.Types.InlayHintLabelPart + ,''Language.LSP.Protocol.Internal.Types.MarkupContent + ,''Language.LSP.Protocol.Internal.Types.InlayHintOptions + ,''Language.LSP.Protocol.Internal.Types.RelatedFullDocumentDiagnosticReport + ,''Language.LSP.Protocol.Internal.Types.RelatedUnchangedDocumentDiagnosticReport + ,''Language.LSP.Protocol.Internal.Types.FullDocumentDiagnosticReport + ,''Language.LSP.Protocol.Internal.Types.UnchangedDocumentDiagnosticReport + ,''Language.LSP.Protocol.Internal.Types.DiagnosticOptions + ,''Language.LSP.Protocol.Internal.Types.PreviousResultId + ,''Language.LSP.Protocol.Internal.Types.NotebookDocument + ,''Language.LSP.Protocol.Internal.Types.TextDocumentItem + ,''Language.LSP.Protocol.Internal.Types.VersionedNotebookDocumentIdentifier + ,''Language.LSP.Protocol.Internal.Types.NotebookDocumentChangeEvent + ,''Language.LSP.Protocol.Internal.Types.NotebookDocumentIdentifier + ,''Language.LSP.Protocol.Internal.Types.Registration + ,''Language.LSP.Protocol.Internal.Types.Unregistration + ,''Language.LSP.Protocol.Internal.Types.UInitializeParams + ,''Language.LSP.Protocol.Internal.Types.WorkspaceFoldersInitializeParams + ,''Language.LSP.Protocol.Internal.Types.ServerCapabilities + ,''Language.LSP.Protocol.Internal.Types.VersionedTextDocumentIdentifier + ,''Language.LSP.Protocol.Internal.Types.SaveOptions + ,''Language.LSP.Protocol.Internal.Types.FileEvent + ,''Language.LSP.Protocol.Internal.Types.FileSystemWatcher + ,''Language.LSP.Protocol.Internal.Types.Diagnostic + ,''Language.LSP.Protocol.Internal.Types.CompletionContext + ,''Language.LSP.Protocol.Internal.Types.CompletionItemLabelDetails + ,''Language.LSP.Protocol.Internal.Types.InsertReplaceEdit + ,''Language.LSP.Protocol.Internal.Types.CompletionOptions + ,''Language.LSP.Protocol.Internal.Types.HoverOptions + ,''Language.LSP.Protocol.Internal.Types.SignatureHelpContext + ,''Language.LSP.Protocol.Internal.Types.SignatureInformation + ,''Language.LSP.Protocol.Internal.Types.SignatureHelpOptions + ,''Language.LSP.Protocol.Internal.Types.DefinitionOptions + ,''Language.LSP.Protocol.Internal.Types.ReferenceContext + ,''Language.LSP.Protocol.Internal.Types.ReferenceOptions + ,''Language.LSP.Protocol.Internal.Types.DocumentHighlightOptions + ,''Language.LSP.Protocol.Internal.Types.BaseSymbolInformation + ,''Language.LSP.Protocol.Internal.Types.DocumentSymbolOptions + ,''Language.LSP.Protocol.Internal.Types.CodeActionContext + ,''Language.LSP.Protocol.Internal.Types.CodeActionOptions + ,''Language.LSP.Protocol.Internal.Types.WorkspaceSymbolOptions + ,''Language.LSP.Protocol.Internal.Types.CodeLensOptions + ,''Language.LSP.Protocol.Internal.Types.DocumentLinkOptions + ,''Language.LSP.Protocol.Internal.Types.FormattingOptions + ,''Language.LSP.Protocol.Internal.Types.DocumentFormattingOptions + ,''Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingOptions + ,''Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingOptions + ,''Language.LSP.Protocol.Internal.Types.RenameOptions + ,''Language.LSP.Protocol.Internal.Types.ExecuteCommandOptions + ,''Language.LSP.Protocol.Internal.Types.SemanticTokensLegend + ,''Language.LSP.Protocol.Internal.Types.OptionalVersionedTextDocumentIdentifier + ,''Language.LSP.Protocol.Internal.Types.AnnotatedTextEdit + ,''Language.LSP.Protocol.Internal.Types.ResourceOperation + ,''Language.LSP.Protocol.Internal.Types.CreateFileOptions + ,''Language.LSP.Protocol.Internal.Types.RenameFileOptions + ,''Language.LSP.Protocol.Internal.Types.DeleteFileOptions + ,''Language.LSP.Protocol.Internal.Types.FileOperationPattern + ,''Language.LSP.Protocol.Internal.Types.WorkspaceFullDocumentDiagnosticReport + ,''Language.LSP.Protocol.Internal.Types.WorkspaceUnchangedDocumentDiagnosticReport + ,''Language.LSP.Protocol.Internal.Types.NotebookCell + ,''Language.LSP.Protocol.Internal.Types.NotebookCellArrayChange + ,''Language.LSP.Protocol.Internal.Types.ClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.TextDocumentSyncOptions + ,''Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncOptions + ,''Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncRegistrationOptions + ,''Language.LSP.Protocol.Internal.Types.WorkspaceFoldersServerCapabilities + ,''Language.LSP.Protocol.Internal.Types.FileOperationOptions + ,''Language.LSP.Protocol.Internal.Types.CodeDescription + ,''Language.LSP.Protocol.Internal.Types.DiagnosticRelatedInformation + ,''Language.LSP.Protocol.Internal.Types.ParameterInformation + ,''Language.LSP.Protocol.Internal.Types.NotebookCellTextDocumentFilter + ,''Language.LSP.Protocol.Internal.Types.FileOperationPatternOptions + ,''Language.LSP.Protocol.Internal.Types.ExecutionSummary + ,''Language.LSP.Protocol.Internal.Types.WorkspaceClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.TextDocumentClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.NotebookDocumentClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.WindowClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.GeneralClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.RelativePattern + ,''Language.LSP.Protocol.Internal.Types.WorkspaceEditClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.DidChangeConfigurationClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.DidChangeWatchedFilesClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.WorkspaceSymbolClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.ExecuteCommandClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.SemanticTokensWorkspaceClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.CodeLensWorkspaceClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.FileOperationClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.InlineValueWorkspaceClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.InlayHintWorkspaceClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.DiagnosticWorkspaceClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.TextDocumentSyncClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.CompletionClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.HoverClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.SignatureHelpClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.DeclarationClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.DefinitionClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.TypeDefinitionClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.ImplementationClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.ReferenceClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.DocumentHighlightClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.DocumentSymbolClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.CodeActionClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.CodeLensClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.DocumentLinkClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.DocumentColorClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.DocumentFormattingClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.DocumentRangeFormattingClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.DocumentOnTypeFormattingClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.RenameClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.FoldingRangeClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.SelectionRangeClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.PublishDiagnosticsClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.CallHierarchyClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.SemanticTokensClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.LinkedEditingRangeClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.MonikerClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.TypeHierarchyClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.InlineValueClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.InlayHintClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.DiagnosticClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.NotebookDocumentSyncClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.ShowMessageRequestClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.ShowDocumentClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.RegularExpressionsClientCapabilities + ,''Language.LSP.Protocol.Internal.Types.MarkdownClientCapabilities] +aliasNames :: [TH.Name] +aliasNames = [''Language.LSP.Protocol.Internal.Types.Definition + ,''Language.LSP.Protocol.Internal.Types.DefinitionLink + ,''Language.LSP.Protocol.Internal.Types.Declaration + ,''Language.LSP.Protocol.Internal.Types.DeclarationLink + ,''Language.LSP.Protocol.Internal.Types.InlineValue + ,''Language.LSP.Protocol.Internal.Types.DocumentDiagnosticReport + ,''Language.LSP.Protocol.Internal.Types.PrepareRenameResult + ,''Language.LSP.Protocol.Internal.Types.DocumentSelector + ,''Language.LSP.Protocol.Internal.Types.ProgressToken + ,''Language.LSP.Protocol.Internal.Types.ChangeAnnotationIdentifier + ,''Language.LSP.Protocol.Internal.Types.WorkspaceDocumentDiagnosticReport + ,''Language.LSP.Protocol.Internal.Types.TextDocumentContentChangeEvent + ,''Language.LSP.Protocol.Internal.Types.MarkedString + ,''Language.LSP.Protocol.Internal.Types.DocumentFilter + ,''Language.LSP.Protocol.Internal.Types.GlobPattern + ,''Language.LSP.Protocol.Internal.Types.TextDocumentFilter + ,''Language.LSP.Protocol.Internal.Types.NotebookDocumentFilter + ,''Language.LSP.Protocol.Internal.Types.Pattern] +enumNames :: [TH.Name] +enumNames = [''Language.LSP.Protocol.Internal.Types.SemanticTokenTypes + ,''Language.LSP.Protocol.Internal.Types.SemanticTokenModifiers + ,''Language.LSP.Protocol.Internal.Types.DocumentDiagnosticReportKind + ,''Language.LSP.Protocol.Internal.Types.ErrorCodes + ,''Language.LSP.Protocol.Internal.Types.LSPErrorCodes + ,''Language.LSP.Protocol.Internal.Types.FoldingRangeKind + ,''Language.LSP.Protocol.Internal.Types.SymbolKind + ,''Language.LSP.Protocol.Internal.Types.SymbolTag + ,''Language.LSP.Protocol.Internal.Types.UniquenessLevel + ,''Language.LSP.Protocol.Internal.Types.MonikerKind + ,''Language.LSP.Protocol.Internal.Types.InlayHintKind + ,''Language.LSP.Protocol.Internal.Types.MessageType + ,''Language.LSP.Protocol.Internal.Types.TextDocumentSyncKind + ,''Language.LSP.Protocol.Internal.Types.TextDocumentSaveReason + ,''Language.LSP.Protocol.Internal.Types.CompletionItemKind + ,''Language.LSP.Protocol.Internal.Types.CompletionItemTag + ,''Language.LSP.Protocol.Internal.Types.InsertTextFormat + ,''Language.LSP.Protocol.Internal.Types.InsertTextMode + ,''Language.LSP.Protocol.Internal.Types.DocumentHighlightKind + ,''Language.LSP.Protocol.Internal.Types.CodeActionKind + ,''Language.LSP.Protocol.Internal.Types.TraceValues + ,''Language.LSP.Protocol.Internal.Types.MarkupKind + ,''Language.LSP.Protocol.Internal.Types.PositionEncodingKind + ,''Language.LSP.Protocol.Internal.Types.FileChangeType + ,''Language.LSP.Protocol.Internal.Types.WatchKind + ,''Language.LSP.Protocol.Internal.Types.DiagnosticSeverity + ,''Language.LSP.Protocol.Internal.Types.DiagnosticTag + ,''Language.LSP.Protocol.Internal.Types.CompletionTriggerKind + ,''Language.LSP.Protocol.Internal.Types.SignatureHelpTriggerKind + ,''Language.LSP.Protocol.Internal.Types.CodeActionTriggerKind + ,''Language.LSP.Protocol.Internal.Types.FileOperationPatternKind + ,''Language.LSP.Protocol.Internal.Types.NotebookCellKind + ,''Language.LSP.Protocol.Internal.Types.ResourceOperationKind + ,''Language.LSP.Protocol.Internal.Types.FailureHandlingKind + ,''Language.LSP.Protocol.Internal.Types.PrepareSupportDefaultBehavior + ,''Language.LSP.Protocol.Internal.Types.TokenFormat] diff --git a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/CodeActionKind.hs b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/CodeActionKind.hs index 2b1c4598..0021b5b2 100644 --- a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/CodeActionKind.hs +++ b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/CodeActionKind.hs @@ -96,7 +96,7 @@ data CodeActionKind = deriving anyclass (NFData, Hashable) deriving ( Aeson.ToJSON , Aeson.FromJSON - , Data.String.IsString ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum CodeActionKind Data.Text.Text) + , Data.String.IsString ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum CodeActionKind) deriving Pretty via (ViaJSON CodeActionKind) instance Language.LSP.Protocol.Types.LspEnum.LspEnum CodeActionKind where diff --git a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/CodeActionTriggerKind.hs b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/CodeActionTriggerKind.hs index 6f1905ff..5926a9a9 100644 --- a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/CodeActionTriggerKind.hs +++ b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/CodeActionTriggerKind.hs @@ -40,7 +40,7 @@ data CodeActionTriggerKind = 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) + , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum CodeActionTriggerKind) deriving Pretty via (ViaJSON CodeActionTriggerKind) instance Language.LSP.Protocol.Types.LspEnum.LspEnum CodeActionTriggerKind where diff --git a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/CompletionItemKind.hs b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/CompletionItemKind.hs index bc9b3bc5..c05f214d 100644 --- a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/CompletionItemKind.hs +++ b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/CompletionItemKind.hs @@ -127,7 +127,7 @@ data CompletionItemKind = 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) + , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum CompletionItemKind) deriving Pretty via (ViaJSON CompletionItemKind) instance Language.LSP.Protocol.Types.LspEnum.LspEnum CompletionItemKind where diff --git a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/CompletionItemTag.hs b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/CompletionItemTag.hs index ceb4fe9c..adb98d7c 100644 --- a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/CompletionItemTag.hs +++ b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/CompletionItemTag.hs @@ -34,7 +34,7 @@ data CompletionItemTag = 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) + , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum CompletionItemTag) deriving Pretty via (ViaJSON CompletionItemTag) instance Language.LSP.Protocol.Types.LspEnum.LspEnum CompletionItemTag where diff --git a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/CompletionTriggerKind.hs b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/CompletionTriggerKind.hs index 69932926..c9a792f7 100644 --- a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/CompletionTriggerKind.hs +++ b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/CompletionTriggerKind.hs @@ -41,7 +41,7 @@ data CompletionTriggerKind = 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) + , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum CompletionTriggerKind) deriving Pretty via (ViaJSON CompletionTriggerKind) instance Language.LSP.Protocol.Types.LspEnum.LspEnum CompletionTriggerKind where diff --git a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/DiagnosticSeverity.hs b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/DiagnosticSeverity.hs index 23b26327..fc6393c0 100644 --- a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/DiagnosticSeverity.hs +++ b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/DiagnosticSeverity.hs @@ -43,7 +43,7 @@ data DiagnosticSeverity = 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) + , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum DiagnosticSeverity) deriving Pretty via (ViaJSON DiagnosticSeverity) instance Language.LSP.Protocol.Types.LspEnum.LspEnum DiagnosticSeverity where diff --git a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/DiagnosticTag.hs b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/DiagnosticTag.hs index 5717f25e..fc3a2373 100644 --- a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/DiagnosticTag.hs +++ b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/DiagnosticTag.hs @@ -42,7 +42,7 @@ data DiagnosticTag = 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) + , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum DiagnosticTag) deriving Pretty via (ViaJSON DiagnosticTag) instance Language.LSP.Protocol.Types.LspEnum.LspEnum DiagnosticTag where diff --git a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/DocumentDiagnosticReportKind.hs b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/DocumentDiagnosticReportKind.hs index d7674315..baaca5cd 100644 --- a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/DocumentDiagnosticReportKind.hs +++ b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/DocumentDiagnosticReportKind.hs @@ -39,7 +39,7 @@ data DocumentDiagnosticReportKind = 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) + , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum DocumentDiagnosticReportKind) deriving Pretty via (ViaJSON DocumentDiagnosticReportKind) instance Language.LSP.Protocol.Types.LspEnum.LspEnum DocumentDiagnosticReportKind where diff --git a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/DocumentHighlightKind.hs b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/DocumentHighlightKind.hs index cebb3718..489f8d13 100644 --- a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/DocumentHighlightKind.hs +++ b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/DocumentHighlightKind.hs @@ -39,7 +39,7 @@ data DocumentHighlightKind = 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) + , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum DocumentHighlightKind) deriving Pretty via (ViaJSON DocumentHighlightKind) instance Language.LSP.Protocol.Types.LspEnum.LspEnum DocumentHighlightKind where diff --git a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/ErrorCodes.hs b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/ErrorCodes.hs index 39d8fc37..bd145da9 100644 --- a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/ErrorCodes.hs +++ b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/ErrorCodes.hs @@ -57,7 +57,7 @@ data ErrorCodes = 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) + , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum ErrorCodes) deriving Pretty via (ViaJSON ErrorCodes) instance Language.LSP.Protocol.Types.LspEnum.LspEnum ErrorCodes where diff --git a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/FailureHandlingKind.hs b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/FailureHandlingKind.hs index 6dc5626c..c2dca997 100644 --- a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/FailureHandlingKind.hs +++ b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/FailureHandlingKind.hs @@ -48,7 +48,7 @@ data FailureHandlingKind = 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) + , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum FailureHandlingKind) deriving Pretty via (ViaJSON FailureHandlingKind) instance Language.LSP.Protocol.Types.LspEnum.LspEnum FailureHandlingKind where diff --git a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/FileChangeType.hs b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/FileChangeType.hs index d548063e..054fbc1c 100644 --- a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/FileChangeType.hs +++ b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/FileChangeType.hs @@ -39,7 +39,7 @@ data FileChangeType = 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) + , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum FileChangeType) deriving Pretty via (ViaJSON FileChangeType) instance Language.LSP.Protocol.Types.LspEnum.LspEnum FileChangeType where diff --git a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/FileOperationPatternKind.hs b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/FileOperationPatternKind.hs index ba303b47..c9af43a0 100644 --- a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/FileOperationPatternKind.hs +++ b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/FileOperationPatternKind.hs @@ -38,7 +38,7 @@ data FileOperationPatternKind = 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) + , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum FileOperationPatternKind) deriving Pretty via (ViaJSON FileOperationPatternKind) instance Language.LSP.Protocol.Types.LspEnum.LspEnum FileOperationPatternKind where diff --git a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/FoldingRangeKind.hs b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/FoldingRangeKind.hs index 724f4a0e..46cbb5fa 100644 --- a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/FoldingRangeKind.hs +++ b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/FoldingRangeKind.hs @@ -41,7 +41,7 @@ data FoldingRangeKind = deriving anyclass (NFData, Hashable) deriving ( Aeson.ToJSON , Aeson.FromJSON - , Data.String.IsString ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum FoldingRangeKind Data.Text.Text) + , Data.String.IsString ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum FoldingRangeKind) deriving Pretty via (ViaJSON FoldingRangeKind) instance Language.LSP.Protocol.Types.LspEnum.LspEnum FoldingRangeKind where diff --git a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/InlayHintKind.hs b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/InlayHintKind.hs index 1a715349..49c73dfe 100644 --- a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/InlayHintKind.hs +++ b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/InlayHintKind.hs @@ -37,7 +37,7 @@ data InlayHintKind = 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) + , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum InlayHintKind) deriving Pretty via (ViaJSON InlayHintKind) instance Language.LSP.Protocol.Types.LspEnum.LspEnum InlayHintKind where diff --git a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/InsertTextFormat.hs b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/InsertTextFormat.hs index 456a01ba..677d7db5 100644 --- a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/InsertTextFormat.hs +++ b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/InsertTextFormat.hs @@ -43,7 +43,7 @@ data InsertTextFormat = 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) + , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum InsertTextFormat) deriving Pretty via (ViaJSON InsertTextFormat) instance Language.LSP.Protocol.Types.LspEnum.LspEnum InsertTextFormat where diff --git a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/InsertTextMode.hs b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/InsertTextMode.hs index eeaad5c8..0cda3620 100644 --- a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/InsertTextMode.hs +++ b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/InsertTextMode.hs @@ -48,7 +48,7 @@ data InsertTextMode = 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) + , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum InsertTextMode) deriving Pretty via (ViaJSON InsertTextMode) instance Language.LSP.Protocol.Types.LspEnum.LspEnum InsertTextMode where diff --git a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/LSPErrorCodes.hs b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/LSPErrorCodes.hs index bac1982f..827fbcdc 100644 --- a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/LSPErrorCodes.hs +++ b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/LSPErrorCodes.hs @@ -61,7 +61,7 @@ data LSPErrorCodes = 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) + , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum LSPErrorCodes) deriving Pretty via (ViaJSON LSPErrorCodes) instance Language.LSP.Protocol.Types.LspEnum.LspEnum LSPErrorCodes where diff --git a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/MarkupKind.hs b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/MarkupKind.hs index 6eb59cd9..653e4362 100644 --- a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/MarkupKind.hs +++ b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/MarkupKind.hs @@ -39,7 +39,7 @@ data MarkupKind = 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) + , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum MarkupKind) deriving Pretty via (ViaJSON MarkupKind) instance Language.LSP.Protocol.Types.LspEnum.LspEnum MarkupKind where diff --git a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/MessageType.hs b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/MessageType.hs index 6fafb8d5..7a9be4c8 100644 --- a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/MessageType.hs +++ b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/MessageType.hs @@ -43,7 +43,7 @@ data MessageType = 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) + , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum MessageType) deriving Pretty via (ViaJSON MessageType) instance Language.LSP.Protocol.Types.LspEnum.LspEnum MessageType where diff --git a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/MonikerKind.hs b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/MonikerKind.hs index bd55ff1e..9b3bfed7 100644 --- a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/MonikerKind.hs +++ b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/MonikerKind.hs @@ -42,7 +42,7 @@ data MonikerKind = 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) + , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum MonikerKind) deriving Pretty via (ViaJSON MonikerKind) instance Language.LSP.Protocol.Types.LspEnum.LspEnum MonikerKind where diff --git a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/NotebookCellKind.hs b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/NotebookCellKind.hs index 21b9a7bc..94fd1816 100644 --- a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/NotebookCellKind.hs +++ b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/NotebookCellKind.hs @@ -37,7 +37,7 @@ data NotebookCellKind = 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) + , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum NotebookCellKind) deriving Pretty via (ViaJSON NotebookCellKind) instance Language.LSP.Protocol.Types.LspEnum.LspEnum NotebookCellKind where diff --git a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/PositionEncodingKind.hs b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/PositionEncodingKind.hs index 7c718ddb..c882c993 100644 --- a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/PositionEncodingKind.hs +++ b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/PositionEncodingKind.hs @@ -50,7 +50,7 @@ data PositionEncodingKind = deriving anyclass (NFData, Hashable) deriving ( Aeson.ToJSON , Aeson.FromJSON - , Data.String.IsString ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum PositionEncodingKind Data.Text.Text) + , Data.String.IsString ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum PositionEncodingKind) deriving Pretty via (ViaJSON PositionEncodingKind) instance Language.LSP.Protocol.Types.LspEnum.LspEnum PositionEncodingKind where diff --git a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/PrepareSupportDefaultBehavior.hs b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/PrepareSupportDefaultBehavior.hs index 74573682..2124baa1 100644 --- a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/PrepareSupportDefaultBehavior.hs +++ b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/PrepareSupportDefaultBehavior.hs @@ -32,7 +32,7 @@ data PrepareSupportDefaultBehavior = 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) + , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum PrepareSupportDefaultBehavior) deriving Pretty via (ViaJSON PrepareSupportDefaultBehavior) instance Language.LSP.Protocol.Types.LspEnum.LspEnum PrepareSupportDefaultBehavior where diff --git a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/ResourceOperationKind.hs b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/ResourceOperationKind.hs index 06612293..8b2921e0 100644 --- a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/ResourceOperationKind.hs +++ b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/ResourceOperationKind.hs @@ -39,7 +39,7 @@ data ResourceOperationKind = 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) + , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum ResourceOperationKind) deriving Pretty via (ViaJSON ResourceOperationKind) instance Language.LSP.Protocol.Types.LspEnum.LspEnum ResourceOperationKind where diff --git a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/SemanticTokenModifiers.hs b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/SemanticTokenModifiers.hs index f4919fc5..2e0d47c7 100644 --- a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/SemanticTokenModifiers.hs +++ b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/SemanticTokenModifiers.hs @@ -73,7 +73,7 @@ data SemanticTokenModifiers = deriving anyclass (NFData, Hashable) deriving ( Aeson.ToJSON , Aeson.FromJSON - , Data.String.IsString ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum SemanticTokenModifiers Data.Text.Text) + , Data.String.IsString ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum SemanticTokenModifiers) deriving Pretty via (ViaJSON SemanticTokenModifiers) instance Language.LSP.Protocol.Types.LspEnum.LspEnum SemanticTokenModifiers where diff --git a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/SemanticTokenTypes.hs b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/SemanticTokenTypes.hs index 74aea811..8d922af9 100644 --- a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/SemanticTokenTypes.hs +++ b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/SemanticTokenTypes.hs @@ -126,7 +126,7 @@ data SemanticTokenTypes = deriving anyclass (NFData, Hashable) deriving ( Aeson.ToJSON , Aeson.FromJSON - , Data.String.IsString ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum SemanticTokenTypes Data.Text.Text) + , Data.String.IsString ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum SemanticTokenTypes) deriving Pretty via (ViaJSON SemanticTokenTypes) instance Language.LSP.Protocol.Types.LspEnum.LspEnum SemanticTokenTypes where diff --git a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/SignatureHelpTriggerKind.hs b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/SignatureHelpTriggerKind.hs index 83267bb9..53d06130 100644 --- a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/SignatureHelpTriggerKind.hs +++ b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/SignatureHelpTriggerKind.hs @@ -41,7 +41,7 @@ data SignatureHelpTriggerKind = 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) + , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum SignatureHelpTriggerKind) deriving Pretty via (ViaJSON SignatureHelpTriggerKind) instance Language.LSP.Protocol.Types.LspEnum.LspEnum SignatureHelpTriggerKind where diff --git a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/SymbolKind.hs b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/SymbolKind.hs index af29c455..ca8d12db 100644 --- a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/SymbolKind.hs +++ b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/SymbolKind.hs @@ -131,7 +131,7 @@ data SymbolKind = 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) + , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum SymbolKind) deriving Pretty via (ViaJSON SymbolKind) instance Language.LSP.Protocol.Types.LspEnum.LspEnum SymbolKind where diff --git a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/SymbolTag.hs b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/SymbolTag.hs index 2529003e..c40943da 100644 --- a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/SymbolTag.hs +++ b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/SymbolTag.hs @@ -33,7 +33,7 @@ data SymbolTag = 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) + , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum SymbolTag) deriving Pretty via (ViaJSON SymbolTag) instance Language.LSP.Protocol.Types.LspEnum.LspEnum SymbolTag where diff --git a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/TextDocumentSaveReason.hs b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/TextDocumentSaveReason.hs index a0f00ecc..6a9b5793 100644 --- a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/TextDocumentSaveReason.hs +++ b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/TextDocumentSaveReason.hs @@ -40,7 +40,7 @@ data TextDocumentSaveReason = 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) + , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum TextDocumentSaveReason) deriving Pretty via (ViaJSON TextDocumentSaveReason) instance Language.LSP.Protocol.Types.LspEnum.LspEnum TextDocumentSaveReason where diff --git a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/TextDocumentSyncKind.hs b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/TextDocumentSyncKind.hs index 39d05fcd..1d24d5fd 100644 --- a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/TextDocumentSyncKind.hs +++ b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/TextDocumentSyncKind.hs @@ -43,7 +43,7 @@ data TextDocumentSyncKind = 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) + , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum TextDocumentSyncKind) deriving Pretty via (ViaJSON TextDocumentSyncKind) instance Language.LSP.Protocol.Types.LspEnum.LspEnum TextDocumentSyncKind where diff --git a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/TokenFormat.hs b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/TokenFormat.hs index 7c4ac2e9..d06fa365 100644 --- a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/TokenFormat.hs +++ b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/TokenFormat.hs @@ -31,7 +31,7 @@ data TokenFormat = 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) + , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum TokenFormat) deriving Pretty via (ViaJSON TokenFormat) instance Language.LSP.Protocol.Types.LspEnum.LspEnum TokenFormat where diff --git a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/TraceValues.hs b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/TraceValues.hs index 4cb235a2..a70bdb54 100644 --- a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/TraceValues.hs +++ b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/TraceValues.hs @@ -39,7 +39,7 @@ data TraceValues = 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) + , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum TraceValues) deriving Pretty via (ViaJSON TraceValues) instance Language.LSP.Protocol.Types.LspEnum.LspEnum TraceValues where diff --git a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/UniquenessLevel.hs b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/UniquenessLevel.hs index d45bfc46..e33010c6 100644 --- a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/UniquenessLevel.hs +++ b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/UniquenessLevel.hs @@ -49,7 +49,7 @@ data UniquenessLevel = 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) + , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum UniquenessLevel) deriving Pretty via (ViaJSON UniquenessLevel) instance Language.LSP.Protocol.Types.LspEnum.LspEnum UniquenessLevel where diff --git a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/WatchKind.hs b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/WatchKind.hs index 4fda265b..ebb75aec 100644 --- a/lsp-types/generated/Language/LSP/Protocol/Internal/Types/WatchKind.hs +++ b/lsp-types/generated/Language/LSP/Protocol/Internal/Types/WatchKind.hs @@ -40,7 +40,7 @@ data WatchKind = 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) + , Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum WatchKind) deriving Pretty via (ViaJSON WatchKind) instance Language.LSP.Protocol.Types.LspEnum.LspEnum WatchKind where diff --git a/lsp-types/generator/CodeGen.hs b/lsp-types/generator/CodeGen.hs index d15508cf..1fd419b4 100644 --- a/lsp-types/generator/CodeGen.hs +++ b/lsp-types/generator/CodeGen.hs @@ -163,9 +163,10 @@ 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)) + let filteredAliases = filter (\TypeAlias{name} -> name `notElem` ["LSPAny", "LSPObject", "LSPArray"]) (typeAliases mm) + structModuleNames <- traverse genStruct (structures mm) + aliasModuleNames <- traverse genAlias filteredAliases enumModuleNames <- traverse genEnum (enumerations mm) methodModuleName <- genMethods (requests mm) (notifications mm) -- not the methods, we export them separately! @@ -173,7 +174,9 @@ genFromMetaModel prefix dir mm = do -- 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 + aliasNames = mapMaybe (\TypeAlias{name} -> Map.lookup name symbolTable) filteredAliases + enumNames = mapMaybe (\Enumeration{name} -> Map.lookup name symbolTable) (enumerations mm) + genMetaModule structNames aliasNames enumNames pure () pure () @@ -477,7 +480,7 @@ printEnum tn Enumeration{name, type_, values, supportsCustomValues, documentatio 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) - viaDeriv1 = "deriving" <+> tupled toDeriveViaLspEnum <+> "via" <+> parens (asLspEnumN <+> pretty tn <+> ty) + viaDeriv1 = "deriving" <+> tupled toDeriveViaLspEnum <+> "via" <+> parens (asLspEnumN <+> pretty tn) viaDeriv2 = "deriving" <+> "Pretty" <+> "via" <+> parens ("ViaJSON" <+> pretty tn) in indent indentSize $ hardvcat [stockDeriv, anyclassDeriv, viaDeriv1, viaDeriv2] @@ -847,17 +850,32 @@ 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 +genMetaModule :: [T.Text] -> [T.Text] -> [T.Text] -> CodeGenM T.Text +genMetaModule structNames aliasNames enumNames = do + genModule "Meta" ["TemplateHaskell"] Nothing $ do + ensureImport "Language.Haskell.TH" (QualAs "TH") + let tyn thn = pretty <$> entityName "Language.LSP.Protocol.Internal.Types" thn + sns <- traverse tyn structNames + ans <- traverse tyn aliasNames + ens <- traverse tyn enumNames + let + sig1 = "structNames" <+> "::" <+> brackets "TH.Name" + decl1 = "structNames =" <+> nest indentSize (encloseSep "[" "]" "," $ fmap (\n -> "''" <> n) sns) + sig2 = "aliasNames" <+> "::" <+> brackets "TH.Name" + decl2 = "aliasNames =" <+> nest indentSize (encloseSep "[" "]" "," $ fmap (\n -> "''" <> n) ans) + sig3 = "enumNames" <+> "::" <+> brackets "TH.Name" + decl3 = "enumNames =" <+> nest indentSize (encloseSep "[" "]" "," $ fmap (\n -> "''" <> n) ens) + pure $ + hardvcat + [ sig1 + , decl1 + , sig2 + , decl2 + , sig3 + , decl3 + ] --------------- diff --git a/lsp-types/lsp-types.cabal b/lsp-types/lsp-types.cabal index 7f47ba07..c88bcba7 100644 --- a/lsp-types/lsp-types.cabal +++ b/lsp-types/lsp-types.cabal @@ -115,6 +115,7 @@ library Language.LSP.Protocol.Lens Language.LSP.Protocol.Message Language.LSP.Protocol.Types + Language.LSP.Protocol.Meta Language.LSP.Protocol.Utils.Misc Language.LSP.Protocol.Utils.SMethodMap @@ -141,6 +142,7 @@ library 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 @@ -148,7 +150,7 @@ library -- 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.Meta Language.LSP.Protocol.Internal.Method Language.LSP.Protocol.Internal.Types Language.LSP.Protocol.Internal.Types.AnnotatedTextEdit @@ -541,6 +543,37 @@ library metamodel , template-haskell >=2.7 && <2.22 , text >=1 && <2.2 +library lsp-types-quickcheck + visibility: public + hs-source-dirs: quickcheck generated + default-language: Haskell2010 + default-extensions: + ImportQualifiedPost + StrictData + DerivingVia + DerivingStrategies + StandaloneDeriving + GeneralizedNewtypeDeriving + + exposed-modules: + Language.LSP.Protocol.QuickCheck + + other-modules: + Language.LSP.Protocol.QuickCheck.Common + Language.LSP.Protocol.QuickCheck.Message + Language.LSP.Protocol.QuickCheck.Types + + build-depends: + , aeson >=2 + , base >=4.11 && <5 + , lsp-types + , row-types + , QuickCheck + , quickcheck-instances + , generic-arbitrary + , template-haskell + , text >=1 && <2.2 + executable generator hs-source-dirs: generator default-language: Haskell2010 @@ -587,6 +620,7 @@ test-suite lsp-types-test , hspec , lens , lsp-types + , lsp-types-quickcheck , network-uri , QuickCheck , quickcheck-instances diff --git a/lsp-types/quickcheck/Language/LSP/Protocol/QuickCheck.hs b/lsp-types/quickcheck/Language/LSP/Protocol/QuickCheck.hs new file mode 100644 index 00000000..3121570e --- /dev/null +++ b/lsp-types/quickcheck/Language/LSP/Protocol/QuickCheck.hs @@ -0,0 +1,6 @@ +-- | Provides 'Arbitrary' instances for protocol types. +module Language.LSP.Protocol.QuickCheck (module Export) where + +import Language.LSP.Protocol.QuickCheck.Common as Export +import Language.LSP.Protocol.QuickCheck.Message as Export +import Language.LSP.Protocol.QuickCheck.Types as Export diff --git a/lsp-types/quickcheck/Language/LSP/Protocol/QuickCheck/Common.hs b/lsp-types/quickcheck/Language/LSP/Protocol/QuickCheck/Common.hs new file mode 100644 index 00000000..4d628293 --- /dev/null +++ b/lsp-types/quickcheck/Language/LSP/Protocol/QuickCheck/Common.hs @@ -0,0 +1,49 @@ +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE TypeApplications #-} +{-# LANGUAGE TypeOperators #-} +{-# LANGUAGE UndecidableInstances #-} + +module Language.LSP.Protocol.QuickCheck.Common where + +import Data.Foldable +import Data.Row qualified as R +import Data.Row.Records qualified as R +import Data.Void +import GHC.TypeLits +import Language.LSP.Protocol.Message +import Language.LSP.Protocol.Types +import Test.QuickCheck +import Test.QuickCheck.Instances () + +instance (Arbitrary a, Arbitrary b) => Arbitrary (a |? b) where + arbitrary = oneof [InL <$> arbitrary, InR <$> arbitrary] + shrink = genericShrink + +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 + +instance Arbitrary UInt where + arbitrary = fromInteger <$> arbitrary + +instance Arbitrary Uri where + arbitrary = Uri <$> arbitrary + shrink = genericShrink + +instance Arbitrary (LspId m) where + arbitrary = oneof [IdInt <$> arbitrary, IdString <$> arbitrary] + shrink = genericShrink + +instance (LspEnum a) => Arbitrary (AsLspEnum a) where + arbitrary = elements $ AsLspEnum <$> toList knownValues + +instance (KnownSymbol s) => Arbitrary (AString s) where + arbitrary = pure $ AString + +instance (KnownNat n) => Arbitrary (AnInteger n) where + arbitrary = pure $ AnInteger diff --git a/lsp-types/quickcheck/Language/LSP/Protocol/QuickCheck/Message.hs b/lsp-types/quickcheck/Language/LSP/Protocol/QuickCheck/Message.hs new file mode 100644 index 00000000..7a5060cb --- /dev/null +++ b/lsp-types/quickcheck/Language/LSP/Protocol/QuickCheck/Message.hs @@ -0,0 +1,87 @@ +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE TypeApplications #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} +{-# LANGUAGE UndecidableInstances #-} +-- See Note [Arbitary Maybe Void] +{-# OPTIONS_GHC -Wno-simplifiable-class-constraints #-} + +module Language.LSP.Protocol.QuickCheck.Message where + +import Data.Row qualified as R +import Data.Row.Records qualified as R +import Data.Void +import Language.LSP.Protocol.Message +import Language.LSP.Protocol.QuickCheck.Types +import Language.LSP.Protocol.Types +import Test.QuickCheck +import Test.QuickCheck.Arbitrary.Generic +import Test.QuickCheck.Instances () + +deriving via (GenericArbitrary RequestMessage) instance Arbitrary RequestMessage +deriving via (GenericArbitrary ResponseMessage) instance Arbitrary ResponseMessage +deriving via (GenericArbitrary NotificationMessage) instance Arbitrary NotificationMessage + +-- See Note [Arbitary Maybe Void] +instance {-# OVERLAPS #-} Arbitrary (Maybe Void) where + arbitrary = pure Nothing + +-- FIXME: there is something funny with the way we're representing error data. +-- Should be able to have these instances! +{- +deriving via (GenericArbitrary ResponseError) instance Arbitrary ResponseError + +deriving via + (GenericArbitrary (TResponseError m)) + instance + (Arbitrary (ErrorData m)) => Arbitrary (TResponseError m) + +deriving via + (GenericArbitrary (TResponseMEssage m)) + instance + (Arbitrary (MessageResult m), Arbitrary (ErrorData m)) => Arbitrary (TResponseMEssage m) +-} + +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 + +-- See Note [Arbitary Maybe Void] +deriving via + (GenericArbitrary (TResponseMessage m)) + instance + (Arbitrary (MessageResult m), ErrorData m ~ Maybe Void) => Arbitrary (TResponseMessage m) + +-- These require a method singleton. We need something like SingI from +-- singletons to pass that into the class instance +{- +instance (Arbitrary (MessageParams m)) => Arbitrary (TRequestMessage m) where + arbitrary = TRequestMessage <$> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary + shrink = genericShrink + +instance (Arbitrary (MessageParams m)) => Arbitrary (TNotificationMessage m) where + arbitrary = TNotificationMessage <$> arbitrary <*> arbitrary <*> arbitrary + shrink = genericShrink +-} + +{- Note [Arbitary Maybe Void] +For methods that don't have error data, we say that their error data type is 'Void'. +This means that the error data field has type 'Maybe Void', i.e. can only be 'Nothing', +which is what we want. + +However, we have a problem with the Arbitrary instance. There is an 'Arbitrary (Maybe a)' +instance which depends on an 'Arbitrary a' instance - but there is no 'Arbitrary Void' +instance, and apparently can't be since we can't make an empty generator. + +So we cheat a bit: +- Define an overlapping 'Arbitrary (Maybe Void)' instance +- Define the instances for response messages to require 'Arbitrary (Maybe (ErrorData m))', + which delays GHC picking the actual instance until the use site, so it can pick + the overlapping one. +-} diff --git a/lsp-types/quickcheck/Language/LSP/Protocol/QuickCheck/Types.hs b/lsp-types/quickcheck/Language/LSP/Protocol/QuickCheck/Types.hs new file mode 100644 index 00000000..71dd138b --- /dev/null +++ b/lsp-types/quickcheck/Language/LSP/Protocol/QuickCheck/Types.hs @@ -0,0 +1,27 @@ +{-# LANGUAGE TemplateHaskell #-} + +module Language.LSP.Protocol.QuickCheck.Types where + +import Data.Traversable +import Language.Haskell.TH +import Language.LSP.Protocol.Meta +import Language.LSP.Protocol.QuickCheck.Common +import Language.LSP.Protocol.Types +import Test.QuickCheck +import Test.QuickCheck.Arbitrary.Generic + +$( let + sderiving = for structNames $ \sname -> + let viaT = ConT ''GenericArbitrary `AppT` ConT sname + arb = ConT ''Arbitrary `AppT` ConT sname + in pure $ StandaloneDerivD (Just (ViaStrategy viaT)) [] arb + aderiving = for aliasNames $ \aname -> + let arb = ConT ''Arbitrary `AppT` ConT aname + in pure $ StandaloneDerivD (Just NewtypeStrategy) [] arb + ederiving = for enumNames $ \ename -> + let viaT = ConT ''AsLspEnum `AppT` ConT ename + arb = ConT ''Arbitrary `AppT` ConT ename + in pure $ StandaloneDerivD (Just (ViaStrategy viaT)) [] arb + in + mconcat <$> sequence [sderiving, aderiving, ederiving] + ) diff --git a/lsp-types/src/Language/LSP/Protocol/Lens.hs b/lsp-types/src/Language/LSP/Protocol/Lens.hs index f13bc663..5cd88879 100644 --- a/lsp-types/src/Language/LSP/Protocol/Lens.hs +++ b/lsp-types/src/Language/LSP/Protocol/Lens.hs @@ -1,12 +1,8 @@ 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 diff --git a/lsp-types/src/Language/LSP/Protocol/Message/Lens.hs b/lsp-types/src/Language/LSP/Protocol/Message/Lens.hs index 5894049c..8ee97a83 100644 --- a/lsp-types/src/Language/LSP/Protocol/Message/Lens.hs +++ b/lsp-types/src/Language/LSP/Protocol/Message/Lens.hs @@ -4,9 +4,9 @@ module Language.LSP.Protocol.Message.Lens where import Control.Lens.TH -import Language.LSP.Protocol.Internal.Lens import Language.LSP.Protocol.Message.Registration import Language.LSP.Protocol.Message.Types +import Language.LSP.Protocol.Types.Lens makeFieldsNoPrefix ''TRegistration makeFieldsNoPrefix ''TUnregistration diff --git a/lsp-types/src/Language/LSP/Protocol/Meta.hs b/lsp-types/src/Language/LSP/Protocol/Meta.hs new file mode 100644 index 00000000..92527efe --- /dev/null +++ b/lsp-types/src/Language/LSP/Protocol/Meta.hs @@ -0,0 +1,3 @@ +module Language.LSP.Protocol.Meta (module Export) where + +import Language.LSP.Protocol.Internal.Meta as Export diff --git a/lsp-types/src/Language/LSP/Protocol/Types/Lens.hs b/lsp-types/src/Language/LSP/Protocol/Types/Lens.hs index 8c00a575..10a99b73 100644 --- a/lsp-types/src/Language/LSP/Protocol/Types/Lens.hs +++ b/lsp-types/src/Language/LSP/Protocol/Types/Lens.hs @@ -3,9 +3,8 @@ module Language.LSP.Protocol.Types.Lens where -import Control.Lens.TH -import Language.LSP.Protocol.Internal.Lens +import Language.LSP.Protocol.Internal.Meta import Language.LSP.Protocol.Types.SemanticTokens +import Language.LSP.Protocol.Utils.Misc -makeFieldsNoPrefix ''SemanticTokenAbsolute -makeFieldsNoPrefix ''SemanticTokenRelative +$(genLenses (structNames ++ [''SemanticTokenAbsolute, ''SemanticTokenRelative])) diff --git a/lsp-types/src/Language/LSP/Protocol/Types/LspEnum.hs b/lsp-types/src/Language/LSP/Protocol/Types/LspEnum.hs index d5ae081e..bebb86dd 100644 --- a/lsp-types/src/Language/LSP/Protocol/Types/LspEnum.hs +++ b/lsp-types/src/Language/LSP/Protocol/Types/LspEnum.hs @@ -42,17 +42,17 @@ class LspEnum a => LspOpenEnum a where {- | Newtype for @deriving via@ to get standard JSON and 'IsString' instances in terms of the 'LspEnum' class methods. -} -newtype AsLspEnum a b = AsLspEnum a +newtype AsLspEnum a = AsLspEnum a -instance (LspEnum a, EnumBaseType a ~ b, Aeson.ToJSON b) => Aeson.ToJSON (AsLspEnum a b) where +instance (LspEnum a, EnumBaseType a ~ b, Aeson.ToJSON b) => Aeson.ToJSON (AsLspEnum a) 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 +instance (LspEnum a, EnumBaseType a ~ b, Aeson.FromJSON b, Show b) => Aeson.FromJSON (AsLspEnum a) 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 +instance (LspOpenEnum a, EnumBaseType a ~ b, b ~ Text.Text) => IsString (AsLspEnum a) where fromString s = AsLspEnum $ fromOpenEnumBaseType (Text.pack s) diff --git a/lsp-types/src/Language/LSP/Protocol/Utils/Misc.hs b/lsp-types/src/Language/LSP/Protocol/Utils/Misc.hs index bfffe28a..c6fda2f3 100644 --- a/lsp-types/src/Language/LSP/Protocol/Utils/Misc.hs +++ b/lsp-types/src/Language/LSP/Protocol/Utils/Misc.hs @@ -10,9 +10,13 @@ module Language.LSP.Protocol.Utils.Misc ( lspOptionsUntagged, prettyJSON, ViaJSON (..), + genLenses, ) where +import Control.Lens.Internal.FieldTH +import Control.Lens.TH import Control.Monad +import Control.Monad.State import Data.Aeson import Data.Aeson.Text as Aeson import Data.Foldable qualified as F @@ -20,7 +24,7 @@ import Data.Foldable.WithIndex qualified as F import Data.Functor.WithIndex.Instances qualified () import Data.List hiding (group) import Data.Maybe (mapMaybe) -import Language.Haskell.TH +import Language.Haskell.TH as TH import Prettyprinter -- --------------------------------------------------------------------- @@ -133,3 +137,18 @@ newtype ViaJSON a = ViaJSON a instance ToJSON a => Pretty (ViaJSON a) where pretty (ViaJSON a) = prettyJSON $ toJSON a + +{- | Given a list of type names, make a splice that generates the lens typeclass declarations +for all of them. Defined here to avoid stage restrictions. +-} +genLenses :: [TH.Name] -> TH.Q [TH.Dec] +genLenses names = do + let + -- We need to use the internals of the lens TH machinery so that we can do this + -- in one go without generating duplicate classes. + opticMaker :: TH.Name -> HasFieldClasses [TH.Dec] + opticMaker n = do + (TH.TyConI d) <- lift $ TH.reify n + makeFieldOpticsForDec' classUnderscoreNoPrefixFields d + decss <- flip evalStateT mempty $ traverse opticMaker names + pure $ concat decss diff --git a/lsp-types/test/JsonSpec.hs b/lsp-types/test/JsonSpec.hs index c3af4f81..a0ce2cdf 100644 --- a/lsp-types/test/JsonSpec.hs +++ b/lsp-types/test/JsonSpec.hs @@ -5,15 +5,11 @@ {-# LANGUAGE OverloadedLabels #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE StandaloneDeriving #-} -{-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeInType #-} -{-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-} -- 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 @@ -21,12 +17,11 @@ module JsonSpec where import Language.LSP.Protocol.Message import Language.LSP.Protocol.Types +import Language.LSP.Protocol.QuickCheck () + import Data.Aeson qualified as J import Data.List (isPrefixOf) import Data.Row -import Data.Row qualified as R -import Data.Row.Records qualified as R -import Data.Void import Test.Hspec import Test.Hspec.QuickCheck import Test.QuickCheck hiding (Success) @@ -114,129 +109,3 @@ spec = do propertyJsonRoundtrip :: (Eq a, Show a, J.ToJSON a, J.FromJSON a) => a -> Property propertyJsonRoundtrip a = J.Success a === J.fromJSON (J.toJSON a) - --- --------------------------------------------------------------------- - -instance (Arbitrary a, Arbitrary b) => Arbitrary (a |? b) where - arbitrary = oneof [InL <$> arbitrary, InR <$> arbitrary] - shrink = genericShrink - -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 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 {-# OVERLAPPING #-} Arbitrary (Maybe Void) where - arbitrary = pure Nothing - -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 (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 - [ ErrorCodes_ParseError - , ErrorCodes_InvalidRequest - , ErrorCodes_MethodNotFound - , ErrorCodes_InvalidParams - , ErrorCodes_InternalError - , ErrorCodes_ServerNotInitialized - , ErrorCodes_UnknownErrorCode - ] - shrink = genericShrink - -instance Arbitrary LSPErrorCodes where - arbitrary = - elements - [ LSPErrorCodes_RequestFailed - , LSPErrorCodes_ServerCancelled - , LSPErrorCodes_ContentModified - , LSPErrorCodes_RequestCancelled - ] - shrink = genericShrink - --- --------------------------------------------------------------------- - -instance Arbitrary Registration where - arbitrary = Registration <$> arbitrary <*> arbitrary <*> arbitrary - 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 = oneof [pure WatchKind_Change, pure WatchKind_Create, pure WatchKind_Delete] - shrink = genericShrink - --- --------------------------------------------------------------------- --- -instance Arbitrary TextDocumentContentChangeEvent where - arbitrary = TextDocumentContentChangeEvent <$> arbitrary - shrink = genericShrink