hint-server-1.0.0: A server process that runs hint.Source codeContentsIndex
Language.Haskell.Interpreter.Server
Contents
Types
Functions
Description
This module provides a server process (implemented using eprocess) that can receive and run actions in the Interpreter monad.
Synopsis
data ServerHandle
start :: IO ServerHandle
stop :: ServerHandle -> IO ()
runIn :: ServerHandle -> InterpreterT IO a -> IO (Either InterpreterError a)
asyncRunIn :: ServerHandle -> InterpreterT IO a -> IO (MVar (Either InterpreterError a))
flush :: ServerHandle -> IO (Either InterpreterError ())
Types
data ServerHandle Source
The server handle. It's returned on process creation and should be used afterwards to send messages to it
Functions
start :: IO ServerHandleSource
Starts the server. Usage: handle <- start
stop :: ServerHandle -> IO ()Source
Stops the server. Usage: stop serverhandle
runInSource
::
=> ServerHandleThe action to be run
-> InterpreterT IO a
-> IO (Either InterpreterError a)
Runs the action. Usage: result <- runIn serverhandle action
asyncRunInSource
::
=> ServerHandleThe action to be run
-> InterpreterT IO a
-> IO (MVar (Either InterpreterError a))
Asynchronically runs an action and returns the MVar that will be filled with the result when it's there. Usage: mvar <- asyncRunIn serverhandle action
flushSource
:: ServerHandleThe handle of the server that will run the action
-> IO (Either InterpreterError ())The meaningful results are stored in the corresponding mvars
Runs all the pending actions (those that where run using asyncRunIn. Usage: flush serverhandle
Produced by Haddock version 2.6.0