ribosome-host-0.9.9.9: Neovim plugin host for Polysemy
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ribosome.Host.Interpreter.Handlers

Description

Interpreters for Handlers.

Synopsis

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 RpcHandlers.

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 RpcHandlers 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.

interpretHandlers :: Members [Rpc !! RpcError, Log, Error BootError] r => [RpcHandler r] -> InterpreterFor (Handlers !! Report) r Source #

Interpret Handlers with a set of RpcHandlers.