Update haskell-lsp to 0.6
[opengl.git] / src / Language / Haskell / LSP / Test / Files.hs
index f82df65cf6cef89640538575cffb69923c32934e..733a94c160ea94634ef34fc0230ca6f65f4bfe80 100644 (file)
@@ -50,7 +50,7 @@ mapUris f event =
     fromClientMsg (NotWillSaveTextDocument n) = NotWillSaveTextDocument $ swapUri (params . textDocument) n
     fromClientMsg (NotDidSaveTextDocument n) = NotDidSaveTextDocument $ swapUri (params . textDocument) n
     fromClientMsg (NotDidCloseTextDocument n) = NotDidCloseTextDocument $ swapUri (params . textDocument) n
-    fromClientMsg (ReqInitialize r) = ReqInitialize $ params .~ (transformInit (r ^. params)) $ r
+    fromClientMsg (ReqInitialize r) = ReqInitialize $ params .~ transformInit (r ^. params) $ r
     fromClientMsg (ReqDocumentSymbols r) = ReqDocumentSymbols $ swapUri (params . textDocument) r
     fromClientMsg (ReqRename r) = ReqRename $ swapUri (params . textDocument) r
     fromClientMsg x = x
@@ -62,7 +62,9 @@ mapUris f event =
     fromServerMsg (NotPublishDiagnostics n) = NotPublishDiagnostics $ swapUri params n
 
     fromServerMsg (RspDocumentSymbols r) =
-      let newSymbols = fmap (fmap (swapUri location)) $ r ^. result
+      let newSymbols = case r ^. result of
+            Just (DSSymbolInformation si) -> Just (DSSymbolInformation (fmap (swapUri location) si))
+            x -> x
       in RspDocumentSymbols $ result .~ newSymbols $ r
 
     fromServerMsg (RspRename r) =