Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Interpreters for Handlers
.
Synopsis
- interpretHandlersNull :: InterpreterFor (Handlers !! Report) r
- noHandlers :: InterpreterFor (Handlers !! Report) r
- handlersByName :: [RpcHandler r] -> Map RpcMethod (RpcHandlerFun r)
- runHandler :: Map RpcMethod (RpcHandlerFun r) -> RpcMethod -> [Object] -> Handler r (Maybe Object)
- withHandlers :: Members [Handlers !! Report, Rpc !! RpcError, Log, Error BootError] r => [RpcHandler r] -> Sem r a -> Sem r a
- interpretHandlers :: Members [Rpc !! RpcError, Log, Error BootError] r => [RpcHandler r] -> InterpreterFor (Handlers !! Report) r
Documentation
interpretHandlersNull :: InterpreterFor (Handlers !! Report) r Source #
Interpret Handlers
by performing no actions.
noHandlers :: InterpreterFor (Handlers !! Report) r Source #
Interpret Handlers
by performing no actions.
handlersByName :: [RpcHandler r] -> Map RpcMethod (RpcHandlerFun r) Source #
Create a method-indexed Map
from a set of RpcHandler
s.
runHandler :: Map RpcMethod (RpcHandlerFun r) -> RpcMethod -> [Object] -> Handler r (Maybe Object) Source #
Execute the handler corresponding to an RpcMethod
, if it exists.
withHandlers :: Members [Handlers !! Report, Rpc !! RpcError, Log, Error BootError] r => [RpcHandler r] -> Sem r a -> Sem r a Source #
Add a set of RpcHandler
s to the plugin.
This can be used multiple times and has to be terminated by interpretHandlersNull
, which is done automatically when
using the plugin main functions.