Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Env = Env {
- envOptions :: Options
- envDevMode :: Bool
- envConfig :: Config
- envLogChan :: Chan Text
- envCommandController :: CommandController
- envResponseChan :: Chan Response
- envResponseController :: ResponseController
- createInitEnv :: (MonadIO m, MonadLsp Config m) => Options -> m Env
- type ServerM m = ReaderT Env m
- runServerM :: Env -> ServerM m a -> m a
- writeLog :: (Monad m, MonadIO m) => Text -> ServerM m ()
- writeLog' :: (Monad m, MonadIO m, Show a) => a -> ServerM m ()
- provideCommand :: (Monad m, MonadIO m) => IOTCM -> ServerM m ()
- consumeCommand :: (Monad m, MonadIO m) => Env -> m IOTCM
- waitUntilResponsesSent :: (Monad m, MonadIO m) => ServerM m ()
- signalCommandFinish :: (Monad m, MonadIO m) => ServerM m ()
- sendResponse :: (Monad m, MonadIO m) => Env -> Response -> TCMT m ()
Documentation
Env | |
|
runServerM :: Env -> ServerM m a -> m a Source #
provideCommand :: (Monad m, MonadIO m) => IOTCM -> ServerM m () Source #
Provider
consumeCommand :: (Monad m, MonadIO m) => Env -> m IOTCM Source #
Consumter
waitUntilResponsesSent :: (Monad m, MonadIO m) => ServerM m () Source #
signalCommandFinish :: (Monad m, MonadIO m) => ServerM m () Source #
sendResponse :: (Monad m, MonadIO m) => Env -> Response -> TCMT m () Source #
Sends a Response to the client via "envResponseChan"