-import System.IO
-
-data SessionContext = SessionContext
- {
- serverIn :: Handle,
- rootDir :: FilePath,
- messageChan :: Chan FromServerMessage,
- requestMap :: MVar RequestMap,
- initRsp :: MVar InitializeResponse
- }
-
-newtype SessionState = SessionState
- {
- curReqId :: LspId
- }
-
-type ParserStateReader a s r m = ConduitParser a (StateT s (ReaderT r m))
-
--- | A session representing one instance of launching and connecting to a server.
---
--- You can send and receive messages to the server within 'Session' via 'getMessage',
--- 'sendRequest' and 'sendNotification'.
---
--- @
--- runSession \"path\/to\/root\/dir\" $ do
--- docItem <- getDocItem "Desktop/simple.hs" "haskell"
--- sendNotification TextDocumentDidOpen (DidOpenTextDocumentParams docItem)
--- diagnostics <- getMessage :: Session PublishDiagnosticsNotification
--- @
-type Session = ParserStateReader FromServerMessage SessionState SessionContext IO