packages feed

haskell-lsp-types 0.10.0.0 → 0.11.0.0

raw patch · 5 files changed

+24/−25 lines, 5 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- Language.Haskell.LSP.Types: TextDocumentFoldingRanges :: ClientMethod
- Language.Haskell.LSP.Types.MessageFuncs: fmServerProgressCancelNotification :: ProgressCancelParams -> ProgressCancelNotification
+ Language.Haskell.LSP.Types: TextDocumentFoldingRange :: ClientMethod
- Language.Haskell.LSP.Types: WindowProgressCancel :: ServerMethod
+ Language.Haskell.LSP.Types: WindowProgressCancel :: ClientMethod
- Language.Haskell.LSP.Types: type ProgressCancelNotification = NotificationMessage ServerMethod ProgressCancelParams
+ Language.Haskell.LSP.Types: type ProgressCancelNotification = NotificationMessage ClientMethod ProgressCancelParams

Files

ChangeLog.md view
@@ -1,5 +1,10 @@ # Revision history for haskell-lsp-types +## 0.11.0.0 -- 2019-04-28++* Fix `window/progress/cancel` notification being a from server+  notification when it should be a from client notification+ ## 0.10.0.0 -- 2019-04-22  * Add types for `window/progress` notifications.
haskell-lsp-types.cabal view
@@ -1,5 +1,5 @@ name:                haskell-lsp-types-version:             0.10.0.0+version:             0.11.0.0 synopsis:            Haskell library for the Microsoft Language Server Protocol, data types  description:         An implementation of the types to allow language implementors to
src/Language/Haskell/LSP/Types/Message.hs view
@@ -84,6 +84,8 @@  | WorkspaceDidChangeWatchedFiles  | WorkspaceSymbol  | WorkspaceExecuteCommand+ -- Progress+ | WindowProgressCancel  -- Document  | TextDocumentDidOpen  | TextDocumentDidChange@@ -112,7 +114,7 @@  | TextDocumentRangeFormatting  | TextDocumentOnTypeFormatting  | TextDocumentRename- | TextDocumentFoldingRanges+ | TextDocumentFoldingRange  -- Messages of the form $/message  -- Implementation Dependent, can be ignored  | Misc Text@@ -159,7 +161,8 @@   parseJSON (A.String "textDocument/rangeFormatting")     = return TextDocumentRangeFormatting   parseJSON (A.String "textDocument/onTypeFormatting")    = return TextDocumentOnTypeFormatting   parseJSON (A.String "textDocument/rename")              = return TextDocumentRename-  parseJSON (A.String "textDocument/foldingRanges")       = return TextDocumentFoldingRanges+  parseJSON (A.String "textDocument/foldingRange")        = return TextDocumentFoldingRange+  parseJSON (A.String "window/progress/cancel")           = return WindowProgressCancel   parseJSON (A.String x)                                  = if T.isPrefixOf "$/" x                                                                then return $ Misc (T.drop 2 x)                                                             else mempty@@ -204,9 +207,10 @@   toJSON TextDocumentRangeFormatting     = A.String "textDocument/rangeFormatting"   toJSON TextDocumentOnTypeFormatting    = A.String "textDocument/onTypeFormatting"   toJSON TextDocumentRename              = A.String "textDocument/rename"-  toJSON TextDocumentFoldingRanges       = A.String "textDocument/foldingRanges"+  toJSON TextDocumentFoldingRange        = A.String "textDocument/foldingRange"   toJSON TextDocumentDocumentLink        = A.String "textDocument/documentLink"   toJSON DocumentLinkResolve             = A.String "documentLink/resolve"+  toJSON WindowProgressCancel            = A.String "window/progress/cancel"   toJSON (Misc xs)                       = A.String $ "$/" <> xs  data ServerMethod =@@ -217,7 +221,6 @@   | WindowProgressStart   | WindowProgressReport   | WindowProgressDone-  | WindowProgressCancel   | TelemetryEvent   -- Client   | ClientRegisterCapability@@ -240,7 +243,6 @@   parseJSON (A.String "window/progress/start")           = return WindowProgressStart   parseJSON (A.String "window/progress/report")          = return WindowProgressReport   parseJSON (A.String "window/progress/done")            = return WindowProgressDone-  parseJSON (A.String "window/progress/cancel")          = return WindowProgressCancel   parseJSON (A.String "telemetry/event")                 = return TelemetryEvent   -- Client   parseJSON (A.String "client/registerCapability")       = return ClientRegisterCapability@@ -263,7 +265,6 @@   toJSON WindowProgressStart      = A.String "window/progress/start"   toJSON WindowProgressReport     = A.String "window/progress/report"   toJSON WindowProgressDone       = A.String "window/progress/done"-  toJSON WindowProgressCancel     = A.String "window/progress/cancel"   toJSON TelemetryEvent           = A.String "telemetry/event"   -- Client   toJSON ClientRegisterCapability   = A.String "client/registerCapability"
src/Language/Haskell/LSP/Types/MessageFuncs.hs view
@@ -20,7 +20,6 @@   , fmServerProgressStartNotification   , fmServerProgressReportNotification   , fmServerProgressDoneNotification-  , fmServerProgressCancelNotification   , fmServerTelemetryNotification    -- * Client@@ -149,12 +148,6 @@ fmServerProgressDoneNotification :: J.ProgressDoneParams -> J.ProgressDoneNotification fmServerProgressDoneNotification params   = J.NotificationMessage "2.0" J.WindowProgressDone params---- ------------------------------------------------------------------------fmServerProgressCancelNotification :: J.ProgressCancelParams -> J.ProgressCancelNotification-fmServerProgressCancelNotification params-  = J.NotificationMessage "2.0" J.WindowProgressCancel params  -- ---------------------------------------------------------------------- -- * :arrow_left: [telemetry/event](#telemetry_event)
src/Language/Haskell/LSP/Types/Window.hs view
@@ -255,23 +255,23 @@ data ProgressStartParams =   ProgressStartParams {   -- | A unique identifier to associate multiple progress-  -- notifications with the same progress. +  -- notifications with the same progress.     _id   :: Text   -- | Mandatory title of the progress operation.   -- Used to briefly inform about the kind of operation being-  -- performed. Examples: "Indexing" or "Linking dependencies". +  -- performed. Examples: "Indexing" or "Linking dependencies".   , _title :: Text   -- | Controls if a cancel button should show to allow the user to cancel the   -- long running operation. Clients that don't support cancellation are allowed   -- to ignore the setting.-  , _cancellable :: Maybe Bool +  , _cancellable :: Maybe Bool   -- | Optional, more detailed associated progress   -- message. Contains complementary information to the   -- '_title'. Examples: "3/25 files",   -- "project/src/module2", "node_modules/some_dep". If   -- unset, the previous progress message (if any) is   -- still valid.-  , _message :: Maybe Text +  , _message :: Maybe Text   -- | Optional progress percentage to display (value 100 is considered 100%).   -- If not provided infinite progress is assumed and clients are allowed   -- to ignore the '_percentage' value in subsequent in report notifications.@@ -332,7 +332,7 @@ data ProgressReportParams =   ProgressReportParams {   -- | A unique identifier to associate multiple progress-  -- notifications with the same progress. +  -- notifications with the same progress.     _id   :: Text   -- | Optional, more detailed associated progress   -- message. Contains complementary information to the@@ -340,7 +340,7 @@   -- "project/src/module2", "node_modules/some_dep". If   -- unset, the previous progress message (if any) is   -- still valid.-  , _message :: Maybe Text +  , _message :: Maybe Text   -- | Optional progress percentage to display (value 100 is considered 100%).   -- If infinite progress was indicated in the start notification client   -- are allowed to ignore the value. In addition the value should be steadily@@ -379,7 +379,7 @@ data ProgressDoneParams =   ProgressDoneParams {   -- | A unique identifier to associate multiple progress-  -- notifications with the same progress. +  -- notifications with the same progress.     _id   :: Text   } deriving (Show, Read, Eq) @@ -410,12 +410,12 @@ -}  -- | Parameters for 'ProgressCancelNotification'.--- +-- -- @since 0.10.0.0 data ProgressCancelParams =   ProgressCancelParams {   -- | A unique identifier to associate multiple progress-  -- notifications with the same progress. +  -- notifications with the same progress.     _id   :: Text   } deriving (Show, Read, Eq) @@ -424,6 +424,6 @@ -- | The window/progress/cancel notification is sent from the client to the server -- to inform the server that the user has pressed the cancel button on the progress UX. -- A server receiving a cancel request must still close a progress using the done notification.--- +-- -- @since 0.10.0.0-type ProgressCancelNotification = NotificationMessage ServerMethod ProgressCancelParams+type ProgressCancelNotification = NotificationMessage ClientMethod ProgressCancelParams