fix build
authorZubin Duggal <zubin@cmi.ac.in>
Tue, 29 Sep 2020 10:13:44 +0000 (15:43 +0530)
committerLuke Lau <luke_lau@icloud.com>
Fri, 9 Oct 2020 12:56:55 +0000 (13:56 +0100)
src/Language/Haskell/LSP/Test.hs
src/Language/Haskell/LSP/Test/Files.hs

index 430ac5b9153df91469590b6f772b14b2aaf6ccc9..6427dd2601ab48bc967007a54c6037e6d98a1470 100644 (file)
@@ -496,8 +496,8 @@ getDocumentSymbols :: TextDocumentIdentifier -> Session (Either [DocumentSymbol]
 getDocumentSymbols doc = do
   ResponseMessage _ rspLid res <- request STextDocumentDocumentSymbol (DocumentSymbolParams Nothing Nothing doc) :: Session DocumentSymbolsResponse
   case res of
-    Right (L (List xs)) -> return (Left xs)
-    Right (R (List xs)) -> return (Right xs)
+    Right (InL (List xs)) -> return (Left xs)
+    Right (InR (List xs)) -> return (Right xs)
     Left err -> throw (UnexpectedResponseError (SomeLspId $ fromJust rspLid) err)
 
 -- | Returns the code actions in the specified range.
@@ -604,8 +604,8 @@ getCompletions doc pos = do
   rsp <- request STextDocumentCompletion (CompletionParams doc pos Nothing Nothing Nothing)
 
   case getResponseResult rsp of
-    L (List items) -> return items
-    R (CompletionList _ (List items)) -> return items
+    InL (List items) -> return items
+    InR (CompletionList _ (List items)) -> return items
 
 -- | Returns the references for the position in the document.
 getReferences :: TextDocumentIdentifier -- ^ The document to lookup in.
@@ -656,9 +656,9 @@ getDeclarationyRequest method paramCons doc pos = do
   let params = paramCons doc pos Nothing Nothing
   rsp <- request method params
   case getResponseResult rsp of
-      L loc -> pure (L [loc])
-      R (L (List locs)) -> pure (L locs)
-      R (R (List locLinks)) -> pure (R locLinks)
+      InL loc -> pure (InL [loc])
+      InR (InL (List locs)) -> pure (InL locs)
+      InR (InR (List locLinks)) -> pure (InR locLinks)
 
 -- | Renames the term at the specified position.
 rename :: TextDocumentIdentifier -> Position -> String -> Session ()
@@ -670,7 +670,7 @@ rename doc pos newName = do
   updateState (FromServerMess SWorkspaceApplyEdit req)
 
 -- | Returns the hover information at the specified position.
-getHover :: TextDocumentIdentifier -> Position -> Session Hover
+getHover :: TextDocumentIdentifier -> Position -> Session (Maybe Hover)
 getHover doc pos =
   let params = HoverParams doc pos Nothing
   in getResponseResult <$> request STextDocumentHover params
index 9a54da1f88f0152e5d06ad887635f92e8514ed88..693dabd4cd5b0737df11fed53b65bf844c51812a 100644 (file)
@@ -67,8 +67,8 @@ mapUris f event =
     fromServerMsg (FromServerMess m@STextDocumentPublishDiagnostics n) = FromServerMess m $ swapUri params n
     fromServerMsg (FromServerRsp m@STextDocumentDocumentSymbol r) =
       let swapUri' :: (List DocumentSymbol |? List SymbolInformation) -> List DocumentSymbol |? List SymbolInformation
-          swapUri' (R si) = R (swapUri location <$> si)
-          swapUri' (L dss) = L dss -- no file locations here
+          swapUri' (InR si) = InR (swapUri location <$> si)
+          swapUri' (InL dss) = InL dss -- no file locations here
       in FromServerRsp m $ r & result %~ (fmap swapUri')
     fromServerMsg (FromServerRsp m@STextDocumentRename r) = FromServerRsp m $ r & result %~ (fmap swapWorkspaceEdit)
     fromServerMsg x = x