@@ -674,7 +674,7 @@ getDocumentSymbols doc = do
674674 Right (InL xs) -> return (Left xs)
675675 Right (InR (InL xs)) -> return (Right xs)
676676 Right (InR (InR _)) -> return (Right [] )
677- Left err -> throw (UnexpectedResponseError (SomeLspId $ fromJust rspLid) err)
677+ Left err -> throw (UnexpectedResponseError (fromJust rspLid) err)
678678
679679-- | Returns the code actions in the specified range.
680680getCodeActions :: TextDocumentIdentifier -> Range -> Session [Command |? CodeAction ]
@@ -685,7 +685,7 @@ getCodeActions doc range = do
685685 case rsp ^. L. result of
686686 Right (InL xs) -> return xs
687687 Right (InR _) -> return []
688- Left error -> throw (UnexpectedResponseError (SomeLspId $ fromJust $ rsp ^. L. id ) error )
688+ Left error -> throw (UnexpectedResponseError (fromJust $ rsp ^. L. id ) error )
689689
690690{- | Returns the code actions in the specified range, resolving any with
691691 a non empty _data_ field.
@@ -713,7 +713,7 @@ getAllCodeActions doc = do
713713 TResponseMessage _ rspLid res <- request SMethod_TextDocumentCodeAction (CodeActionParams Nothing Nothing doc (diag ^. L. range) ctx)
714714
715715 case res of
716- Left e -> throw (UnexpectedResponseError (SomeLspId $ fromJust rspLid) e)
716+ Left e -> throw (UnexpectedResponseError (fromJust rspLid) e)
717717 Right (InL cmdOrCAs) -> pure (acc ++ cmdOrCAs)
718718 Right (InR _) -> pure acc
719719
@@ -781,7 +781,7 @@ resolveCodeAction ca = do
781781 rsp <- request SMethod_CodeActionResolve ca
782782 case rsp ^. L. result of
783783 Right ca -> return ca
784- Left er -> throw (UnexpectedResponseError (SomeLspId $ fromJust $ rsp ^. L. id ) er)
784+ Left er -> throw (UnexpectedResponseError (fromJust $ rsp ^. L. id ) er)
785785
786786{- | If a code action contains a _data_ field: resolves the code action, then
787787 executes it. Otherwise, just executes it.
@@ -849,7 +849,7 @@ resolveCompletion ci = do
849849 rsp <- request SMethod_CompletionItemResolve ci
850850 case rsp ^. L. result of
851851 Right ci -> return ci
852- Left error -> throw (UnexpectedResponseError (SomeLspId $ fromJust $ rsp ^. L. id ) error )
852+ Left error -> throw (UnexpectedResponseError (fromJust $ rsp ^. L. id ) error )
853853
854854-- | Returns the references for the position in the document.
855855getReferences ::
@@ -937,11 +937,11 @@ getHighlights doc pos =
937937{- | Checks the response for errors and throws an exception if needed.
938938 Returns the result if successful.
939939-}
940- getResponseResult :: (ToJSON (ErrorData m )) => TResponseMessage m -> MessageResult m
940+ getResponseResult :: (Show (ErrorData m )) => TResponseMessage m -> MessageResult m
941941getResponseResult rsp =
942942 case rsp ^. L. result of
943943 Right x -> x
944- Left err -> throw $ UnexpectedResponseError (SomeLspId $ fromJust $ rsp ^. L. id ) err
944+ Left err -> throw $ UnexpectedResponseError (fromJust $ rsp ^. L. id ) err
945945
946946-- | Applies formatting to the specified document.
947947formatDoc :: TextDocumentIdentifier -> FormattingOptions -> Session ()
@@ -984,7 +984,7 @@ resolveCodeLens cl = do
984984 rsp <- request SMethod_CodeLensResolve cl
985985 case rsp ^. L. result of
986986 Right cl -> return cl
987- Left error -> throw (UnexpectedResponseError (SomeLspId $ fromJust $ rsp ^. L. id ) error )
987+ Left error -> throw (UnexpectedResponseError (fromJust $ rsp ^. L. id ) error )
988988
989989-- | Returns the inlay hints in the specified range.
990990getInlayHints :: TextDocumentIdentifier -> Range -> Session [InlayHint ]
@@ -1006,7 +1006,7 @@ resolveInlayHint ih = do
10061006 rsp <- request SMethod_InlayHintResolve ih
10071007 case rsp ^. L. result of
10081008 Right ih -> return ih
1009- Left error -> throw (UnexpectedResponseError (SomeLspId $ fromJust $ rsp ^. L. id ) error )
1009+ Left error -> throw (UnexpectedResponseError (fromJust $ rsp ^. L. id ) error )
10101010
10111011-- | Pass a param and return the response from `prepareCallHierarchy`
10121012prepareCallHierarchy :: CallHierarchyPrepareParams -> Session [CallHierarchyItem ]
@@ -1021,7 +1021,7 @@ outgoingCalls = resolveRequestWithListResp SMethod_CallHierarchyOutgoingCalls
10211021-- | Send a request and receive a response with list.
10221022resolveRequestWithListResp ::
10231023 forall (m :: Method ClientToServer Request ) a .
1024- (ToJSON (ErrorData m ), MessageResult m ~ ([a ] |? Null )) =>
1024+ (Show (ErrorData m ), MessageResult m ~ ([a ] |? Null )) =>
10251025 SMethod m ->
10261026 MessageParams m ->
10271027 Session [a ]
0 commit comments