Add documentEdit and friends helper functions
[opengl.git] / src / Language / Haskell / LSP / Test / Session.hs
index ee6d871e070220fb8b866c7cb9512790731d0e2f..6599cbdef746b1aa659b7ea92ab6665639654e28 100644 (file)
@@ -60,8 +60,8 @@ type Session = ParserStateReader FromServerMessage SessionState SessionContext I
 -- | Stuff you can configure for a 'Session'.
 data SessionConfig = SessionConfig
   {
-    capabilities :: ClientCapabilities, -- ^ Specific capabilities the client should advertise.
-    timeout :: Int -- ^ Maximum time to wait for a request in seconds.
+    capabilities :: ClientCapabilities -- ^ Specific capabilities the client should advertise. Default is yes to everything.
+  , timeout :: Int -- ^ Maximum time to wait for a request in seconds. Defaults to 60.
   }
 
 instance Default SessionConfig where
@@ -91,7 +91,7 @@ data SessionState = SessionState
 
 type ParserStateReader a s r m = ConduitParser a (StateT s (ReaderT r m))
 
-type SessionProcessor = ConduitT FromServerMessage FromServerMessage (StateT SessionState (ReaderT SessionContext IO))
+type SessionProcessor = ConduitM FromServerMessage FromServerMessage (StateT SessionState (ReaderT SessionContext IO))
 
 runSession :: Chan FromServerMessage -> SessionProcessor () -> SessionContext -> SessionState -> Session a -> IO (a, SessionState)
 runSession chan preprocessor context state session = runReaderT (runStateT conduit state) context