Use TypeInType
[lsp-test.git] / src / Language / LSP / Test / Session.hs
index 5839a15619a18963296a35d632a1f4233a95944c..aabf04f2b73e18620de2af30cec84055a31a1219 100644 (file)
@@ -6,6 +6,7 @@
 {-# LANGUAGE MultiParamTypeClasses #-}
 {-# LANGUAGE FlexibleContexts #-}
 {-# LANGUAGE RankNTypes #-}
+{-# LANGUAGE TypeInType #-}
 
 module Language.LSP.Test.Session
   ( Session(..)
@@ -134,7 +135,7 @@ data SessionContext = SessionContext
   -- Keep curTimeoutId in SessionContext, as its tied to messageChan
   , curTimeoutId :: MVar Int -- ^ The current timeout we are waiting on
   , requestMap :: MVar RequestMap
-  , initRsp :: MVar InitializeResponse
+  , initRsp :: MVar (ResponseMessage Initialize)
   , config :: SessionConfig
   , sessionCapabilities :: ClientCapabilities
   }
@@ -274,7 +275,10 @@ runSession' serverIn serverOut mServerProc serverHandler config caps rootDir exi
         let cleanup
               | Just sp <- mServerProc = do
                   -- Give the server some time to exit cleanly
+                  -- It makes the server hangs in windows so we have to avoid it
+#ifndef mingw32_HOST_OS
                   timeout msgTimeoutMs (waitForProcess sp)
+#endif
                   cleanupProcess (Just serverIn, Just serverOut, Nothing, sp)
               | otherwise = pure ()
         finally (timeout msgTimeoutMs (runSession' exitServer))