Use ProcessHandle in withServer to allow kill it by client code
[lsp-test.git] / src / Language / Haskell / LSP / Test.hs
index 7e87fcb3b915756b7057a71d0b511eb626b2b588..016abc22cb6b6ea6fb898db0264e3ce4da9594ff 100644 (file)
@@ -149,8 +149,8 @@ runSessionWithConfig config serverExe caps rootDir session = do
                                           caps
                                           (Just TraceOff)
                                           Nothing
-  withServer serverExe (logStdErr config) $ \serverIn serverOut _ ->
-    runSessionWithHandles serverIn serverOut listenServer config caps rootDir exitServer $ do
+  withServer serverExe (logStdErr config) $ \serverIn serverOut serverProc ->
+    runSessionWithHandles serverIn serverOut serverProc listenServer config caps rootDir exitServer $ do
       -- Wrap the session around initialize and shutdown calls
       initRspMsg <- request Initialize initializeParams :: Session InitializeResponse