File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
lsp-test/src/Language/LSP/Test
lsp-types/src/Language/LSP/Types Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 38
38
import Control.Applicative
39
39
import Control.Concurrent hiding (yield )
40
40
import Control.Exception
41
- import Control.Lens hiding (List )
41
+ import Control.Lens hiding (List , Empty )
42
42
import Control.Monad
43
43
import Control.Monad.IO.Class
44
44
import Control.Monad.Except
@@ -304,7 +304,7 @@ updateStateC = awaitForever $ \msg -> do
304
304
where
305
305
respond :: (MonadIO m , HasReader SessionContext m ) => FromServerMessage -> m ()
306
306
respond (FromServerMess SWindowWorkDoneProgressCreate req) =
307
- sendMessage $ ResponseMessage " 2.0" (Just $ req ^. LSP. id ) (Right () )
307
+ sendMessage $ ResponseMessage " 2.0" (Just $ req ^. LSP. id ) (Right Empty )
308
308
respond (FromServerMess SWorkspaceApplyEdit r) = do
309
309
sendMessage $ ResponseMessage " 2.0" (Just $ r ^. LSP. id ) (Right $ ApplyWorkspaceEditResponseBody True Nothing )
310
310
respond _ = pure ()
Original file line number Diff line number Diff line change @@ -197,7 +197,7 @@ type family ResponseResult (m :: Method f Request) :: Type where
197
197
-- Server
198
198
-- Window
199
199
ResponseResult WindowShowMessageRequest = Maybe MessageActionItem
200
- ResponseResult WindowWorkDoneProgressCreate = ()
200
+ ResponseResult WindowWorkDoneProgressCreate = Empty
201
201
-- Capability
202
202
ResponseResult ClientRegisterCapability = Empty
203
203
ResponseResult ClientUnregisterCapability = Empty
@@ -233,7 +233,7 @@ deriving instance Eq (MessageParams m) => Eq (NotificationMessage m)
233
233
deriving instance Show (MessageParams m ) => Show (NotificationMessage m )
234
234
235
235
instance (FromJSON (MessageParams m ), FromJSON (SMethod m )) => FromJSON (NotificationMessage m ) where
236
- parseJSON = genericParseJSON lspOptions
236
+ parseJSON = genericParseJSON lspOptions . addNullField " params "
237
237
instance (ToJSON (MessageParams m )) => ToJSON (NotificationMessage m ) where
238
238
toJSON = genericToJSON lspOptions
239
239
toEncoding = genericToEncoding lspOptions
Original file line number Diff line number Diff line change @@ -620,7 +620,7 @@ withProgressBase indefinite title cancellable f = do
620
620
-- An error ocurred when the client was setting it up
621
621
-- No need to do anything then, as per the spec
622
622
Left _err -> pure ()
623
- Right () -> pure ()
623
+ Right Empty -> pure ()
624
624
625
625
-- Send the begin and done notifications via 'bracket_' so that they are always fired
626
626
res <- withRunInIO $ \ runInBase ->
You can’t perform that action at this time.
0 commit comments