{-# options_haddock prune #-}
module Ribosome.Embed where
import Ribosome.Data.PluginConfig (PluginConfig)
import Ribosome.Data.PluginName (PluginName)
import Ribosome.Host.Data.BootError (BootError)
import Ribosome.Host.Data.HostConfig (LogConfig)
import Ribosome.Host.Data.RpcHandler (RpcHandler)
import Ribosome.Host.Embed (EmbedExtra, interpretEmbedExtra)
import Ribosome.Host.IOStack (IOStack)
import Ribosome.Host.Interpret (HigherOrder)
import Ribosome.Host.Interpreter.Handlers (interpretHandlersNull, withHandlers)
import Ribosome.Host.Interpreter.Host (HostDeps, withHost)
import Ribosome.Host.Interpreter.Process.Embed (interpretProcessCerealNvimEmbed)
import Ribosome.Host.Run (RpcDeps, RpcStack, interpretRpcStack)
import Ribosome.IOStack (BasicPluginStack, runCli)
import Ribosome.Interpreter.Scratch (interpretScratch)
import Ribosome.Interpreter.Settings (interpretSettingsRpc)
import Ribosome.Interpreter.UserError (interpretUserErrorPrefixed)
import Ribosome.Interpreter.VariableWatcher (interpretVariableWatcherNull)
import Ribosome.Plugin.Builtin (BuiltinHandlersDeps, interceptHandlersBuiltin)
import Ribosome.Run (PluginEffects)
type HandlerEffects =
PluginEffects ++ RpcStack ++ EmbedExtra ++ RpcDeps
type EmbedStack c =
HandlerEffects ++ BasicPluginStack c
interpretRpcDeps ::
Members [Reader PluginName, Error BootError, Log, Resource, Race, Async, Embed IO] r =>
InterpretersFor RpcDeps r
interpretRpcDeps :: forall (r :: [(* -> *) -> * -> *]).
Members
'[Reader PluginName, Error BootError, Log, Resource, Race, Async,
Embed IO]
r =>
InterpretersFor RpcDeps r
interpretRpcDeps =
Sem (UserError : r) a -> Sem r a
forall (r :: [(* -> *) -> * -> *]).
Member (Reader PluginName) r =>
InterpreterFor UserError r
interpretUserErrorPrefixed (Sem (UserError : r) a -> Sem r a)
-> (Sem
(Process RpcMessage (Either Text RpcMessage) : UserError : r) a
-> Sem (UserError : r) a)
-> Sem
(Process RpcMessage (Either Text RpcMessage) : UserError : r) a
-> Sem r a
forall b c a. (b -> c) -> (a -> b) -> a -> c
.
Maybe ProcessOptions
-> Maybe (ProcessConfig () () ())
-> InterpreterFor
(Process RpcMessage (Either Text RpcMessage)) (UserError : r)
forall a (r :: [(* -> *) -> * -> *]).
(Serialize a,
Members
'[Error BootError, Log, Resource, Race, Async, Embed IO] r) =>
Maybe ProcessOptions
-> Maybe (ProcessConfig () () ())
-> InterpreterFor (Process a (Either Text a)) r
interpretProcessCerealNvimEmbed Maybe ProcessOptions
forall a. Maybe a
Nothing Maybe (ProcessConfig () () ())
forall a. Maybe a
Nothing
interpretPluginEmbed ::
Members [Log, Reader LogConfig, Reader PluginName] r =>
Members IOStack r =>
InterpretersFor HandlerEffects r
interpretPluginEmbed :: forall (r :: [(* -> *) -> * -> *]).
(Members '[Log, Reader LogConfig, Reader PluginName] r,
Members IOStack r) =>
InterpretersFor HandlerEffects r
interpretPluginEmbed =
Sem (Process RpcMessage (Either Text RpcMessage) : UserError : r) a
-> Sem r a
forall (r :: [(* -> *) -> * -> *]).
Members
'[Reader PluginName, Error BootError, Log, Resource, Race, Async,
Embed IO]
r =>
InterpretersFor RpcDeps r
interpretRpcDeps (Sem
(Process RpcMessage (Either Text RpcMessage) : UserError : r) a
-> Sem r a)
-> (Sem
(Resumable RpcError Scratch
: Resumable SettingError Settings
: Resumable Report VariableWatcher : (Handlers !! Report) : Log
: DataLog LogReport : (Rpc !! RpcError)
: Resumable RpcError (Responses RequestId Response)
: Events (OutChan Event) Event
: PScoped () (EventChan Event) (Consume Event) : Reports
: Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a
-> Sem
(Process RpcMessage (Either Text RpcMessage) : UserError : r) a)
-> Sem
(Resumable RpcError Scratch
: Resumable SettingError Settings
: Resumable Report VariableWatcher : (Handlers !! Report) : Log
: DataLog LogReport : (Rpc !! RpcError)
: Resumable RpcError (Responses RequestId Response)
: Events (OutChan Event) Event
: PScoped () (EventChan Event) (Consume Event) : Reports
: Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a
-> Sem r a
forall b c a. (b -> c) -> (a -> b) -> a -> c
.
Sem
(Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a
-> Sem
(Process RpcMessage (Either Text RpcMessage) : UserError : r) a
forall o (r :: [(* -> *) -> * -> *]).
Members
'[Process RpcMessage o, Error BootError, Log, Resource, Race,
Async, Embed IO]
r =>
InterpretersFor EmbedExtra r
interpretEmbedExtra (Sem
(Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a
-> Sem
(Process RpcMessage (Either Text RpcMessage) : UserError : r) a)
-> (Sem
(Resumable RpcError Scratch
: Resumable SettingError Settings
: Resumable Report VariableWatcher : (Handlers !! Report) : Log
: DataLog LogReport : (Rpc !! RpcError)
: Resumable RpcError (Responses RequestId Response)
: Events (OutChan Event) Event
: PScoped () (EventChan Event) (Consume Event) : Reports
: Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a
-> Sem
(Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a)
-> Sem
(Resumable RpcError Scratch
: Resumable SettingError Settings
: Resumable Report VariableWatcher : (Handlers !! Report) : Log
: DataLog LogReport : (Rpc !! RpcError)
: Resumable RpcError (Responses RequestId Response)
: Events (OutChan Event) Event
: PScoped () (EventChan Event) (Consume Event) : Reports
: Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a
-> Sem
(Process RpcMessage (Either Text RpcMessage) : UserError : r) a
forall b c a. (b -> c) -> (a -> b) -> a -> c
.
Sem
(Log
: DataLog LogReport : (Rpc !! RpcError)
: Resumable RpcError (Responses RequestId Response)
: Events (OutChan Event) Event
: PScoped () (EventChan Event) (Consume Event) : Reports
: Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a
-> Sem
(Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a
forall (r :: [(* -> *) -> * -> *]).
(Members IOStack r, Members RpcDeps r,
Members '[Log, Reader LogConfig] r) =>
InterpretersFor RpcStack r
interpretRpcStack (Sem
(Log
: DataLog LogReport : (Rpc !! RpcError)
: Resumable RpcError (Responses RequestId Response)
: Events (OutChan Event) Event
: PScoped () (EventChan Event) (Consume Event) : Reports
: Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a
-> Sem
(Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a)
-> (Sem
(Resumable RpcError Scratch
: Resumable SettingError Settings
: Resumable Report VariableWatcher : (Handlers !! Report) : Log
: DataLog LogReport : (Rpc !! RpcError)
: Resumable RpcError (Responses RequestId Response)
: Events (OutChan Event) Event
: PScoped () (EventChan Event) (Consume Event) : Reports
: Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a
-> Sem
(Log
: DataLog LogReport : (Rpc !! RpcError)
: Resumable RpcError (Responses RequestId Response)
: Events (OutChan Event) Event
: PScoped () (EventChan Event) (Consume Event) : Reports
: Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a)
-> Sem
(Resumable RpcError Scratch
: Resumable SettingError Settings
: Resumable Report VariableWatcher : (Handlers !! Report) : Log
: DataLog LogReport : (Rpc !! RpcError)
: Resumable RpcError (Responses RequestId Response)
: Events (OutChan Event) Event
: PScoped () (EventChan Event) (Consume Event) : Reports
: Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a
-> Sem
(Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a
forall b c a. (b -> c) -> (a -> b) -> a -> c
.
Sem
((Handlers !! Report)
: Log : DataLog LogReport : (Rpc !! RpcError)
: Resumable RpcError (Responses RequestId Response)
: Events (OutChan Event) Event
: PScoped () (EventChan Event) (Consume Event) : Reports
: Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a
-> Sem
(Log
: DataLog LogReport : (Rpc !! RpcError)
: Resumable RpcError (Responses RequestId Response)
: Events (OutChan Event) Event
: PScoped () (EventChan Event) (Consume Event) : Reports
: Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a
forall (r :: [(* -> *) -> * -> *]).
InterpreterFor (Handlers !! Report) r
interpretHandlersNull (Sem
((Handlers !! Report)
: Log : DataLog LogReport : (Rpc !! RpcError)
: Resumable RpcError (Responses RequestId Response)
: Events (OutChan Event) Event
: PScoped () (EventChan Event) (Consume Event) : Reports
: Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a
-> Sem
(Log
: DataLog LogReport : (Rpc !! RpcError)
: Resumable RpcError (Responses RequestId Response)
: Events (OutChan Event) Event
: PScoped () (EventChan Event) (Consume Event) : Reports
: Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a)
-> (Sem
(Resumable RpcError Scratch
: Resumable SettingError Settings
: Resumable Report VariableWatcher : (Handlers !! Report) : Log
: DataLog LogReport : (Rpc !! RpcError)
: Resumable RpcError (Responses RequestId Response)
: Events (OutChan Event) Event
: PScoped () (EventChan Event) (Consume Event) : Reports
: Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a
-> Sem
((Handlers !! Report)
: Log : DataLog LogReport : (Rpc !! RpcError)
: Resumable RpcError (Responses RequestId Response)
: Events (OutChan Event) Event
: PScoped () (EventChan Event) (Consume Event) : Reports
: Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a)
-> Sem
(Resumable RpcError Scratch
: Resumable SettingError Settings
: Resumable Report VariableWatcher : (Handlers !! Report) : Log
: DataLog LogReport : (Rpc !! RpcError)
: Resumable RpcError (Responses RequestId Response)
: Events (OutChan Event) Event
: PScoped () (EventChan Event) (Consume Event) : Reports
: Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a
-> Sem
(Log
: DataLog LogReport : (Rpc !! RpcError)
: Resumable RpcError (Responses RequestId Response)
: Events (OutChan Event) Event
: PScoped () (EventChan Event) (Consume Event) : Reports
: Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a
forall b c a. (b -> c) -> (a -> b) -> a -> c
.
Sem
(Resumable Report VariableWatcher
: (Handlers !! Report) : Log : DataLog LogReport
: (Rpc !! RpcError)
: Resumable RpcError (Responses RequestId Response)
: Events (OutChan Event) Event
: PScoped () (EventChan Event) (Consume Event) : Reports
: Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a
-> Sem
((Handlers !! Report)
: Log : DataLog LogReport : (Rpc !! RpcError)
: Resumable RpcError (Responses RequestId Response)
: Events (OutChan Event) Event
: PScoped () (EventChan Event) (Consume Event) : Reports
: Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a
forall (r :: [(* -> *) -> * -> *]).
InterpreterFor (Resumable Report VariableWatcher) r
interpretVariableWatcherNull (Sem
(Resumable Report VariableWatcher
: (Handlers !! Report) : Log : DataLog LogReport
: (Rpc !! RpcError)
: Resumable RpcError (Responses RequestId Response)
: Events (OutChan Event) Event
: PScoped () (EventChan Event) (Consume Event) : Reports
: Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a
-> Sem
((Handlers !! Report)
: Log : DataLog LogReport : (Rpc !! RpcError)
: Resumable RpcError (Responses RequestId Response)
: Events (OutChan Event) Event
: PScoped () (EventChan Event) (Consume Event) : Reports
: Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a)
-> (Sem
(Resumable RpcError Scratch
: Resumable SettingError Settings
: Resumable Report VariableWatcher : (Handlers !! Report) : Log
: DataLog LogReport : (Rpc !! RpcError)
: Resumable RpcError (Responses RequestId Response)
: Events (OutChan Event) Event
: PScoped () (EventChan Event) (Consume Event) : Reports
: Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a
-> Sem
(Resumable Report VariableWatcher
: (Handlers !! Report) : Log : DataLog LogReport
: (Rpc !! RpcError)
: Resumable RpcError (Responses RequestId Response)
: Events (OutChan Event) Event
: PScoped () (EventChan Event) (Consume Event) : Reports
: Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a)
-> Sem
(Resumable RpcError Scratch
: Resumable SettingError Settings
: Resumable Report VariableWatcher : (Handlers !! Report) : Log
: DataLog LogReport : (Rpc !! RpcError)
: Resumable RpcError (Responses RequestId Response)
: Events (OutChan Event) Event
: PScoped () (EventChan Event) (Consume Event) : Reports
: Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a
-> Sem
((Handlers !! Report)
: Log : DataLog LogReport : (Rpc !! RpcError)
: Resumable RpcError (Responses RequestId Response)
: Events (OutChan Event) Event
: PScoped () (EventChan Event) (Consume Event) : Reports
: Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a
forall b c a. (b -> c) -> (a -> b) -> a -> c
.
Sem
(Resumable SettingError Settings
: Resumable Report VariableWatcher : (Handlers !! Report) : Log
: DataLog LogReport : (Rpc !! RpcError)
: Resumable RpcError (Responses RequestId Response)
: Events (OutChan Event) Event
: PScoped () (EventChan Event) (Consume Event) : Reports
: Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a
-> Sem
(Resumable Report VariableWatcher
: (Handlers !! Report) : Log : DataLog LogReport
: (Rpc !! RpcError)
: Resumable RpcError (Responses RequestId Response)
: Events (OutChan Event) Event
: PScoped () (EventChan Event) (Consume Event) : Reports
: Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a
forall (r :: [(* -> *) -> * -> *]).
Members '[Rpc !! RpcError, Reader PluginName] r =>
InterpreterFor (Resumable SettingError Settings) r
interpretSettingsRpc (Sem
(Resumable SettingError Settings
: Resumable Report VariableWatcher : (Handlers !! Report) : Log
: DataLog LogReport : (Rpc !! RpcError)
: Resumable RpcError (Responses RequestId Response)
: Events (OutChan Event) Event
: PScoped () (EventChan Event) (Consume Event) : Reports
: Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a
-> Sem
(Resumable Report VariableWatcher
: (Handlers !! Report) : Log : DataLog LogReport
: (Rpc !! RpcError)
: Resumable RpcError (Responses RequestId Response)
: Events (OutChan Event) Event
: PScoped () (EventChan Event) (Consume Event) : Reports
: Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a)
-> (Sem
(Resumable RpcError Scratch
: Resumable SettingError Settings
: Resumable Report VariableWatcher : (Handlers !! Report) : Log
: DataLog LogReport : (Rpc !! RpcError)
: Resumable RpcError (Responses RequestId Response)
: Events (OutChan Event) Event
: PScoped () (EventChan Event) (Consume Event) : Reports
: Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a
-> Sem
(Resumable SettingError Settings
: Resumable Report VariableWatcher : (Handlers !! Report) : Log
: DataLog LogReport : (Rpc !! RpcError)
: Resumable RpcError (Responses RequestId Response)
: Events (OutChan Event) Event
: PScoped () (EventChan Event) (Consume Event) : Reports
: Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a)
-> Sem
(Resumable RpcError Scratch
: Resumable SettingError Settings
: Resumable Report VariableWatcher : (Handlers !! Report) : Log
: DataLog LogReport : (Rpc !! RpcError)
: Resumable RpcError (Responses RequestId Response)
: Events (OutChan Event) Event
: PScoped () (EventChan Event) (Consume Event) : Reports
: Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a
-> Sem
(Resumable Report VariableWatcher
: (Handlers !! Report) : Log : DataLog LogReport
: (Rpc !! RpcError)
: Resumable RpcError (Responses RequestId Response)
: Events (OutChan Event) Event
: PScoped () (EventChan Event) (Consume Event) : Reports
: Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a
forall b c a. (b -> c) -> (a -> b) -> a -> c
.
Sem
(Resumable RpcError Scratch
: Resumable SettingError Settings
: Resumable Report VariableWatcher : (Handlers !! Report) : Log
: DataLog LogReport : (Rpc !! RpcError)
: Resumable RpcError (Responses RequestId Response)
: Events (OutChan Event) Event
: PScoped () (EventChan Event) (Consume Event) : Reports
: Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a
-> Sem
(Resumable SettingError Settings
: Resumable Report VariableWatcher : (Handlers !! Report) : Log
: DataLog LogReport : (Rpc !! RpcError)
: Resumable RpcError (Responses RequestId Response)
: Events (OutChan Event) Event
: PScoped () (EventChan Event) (Consume Event) : Reports
: Events (OutChan RpcMessage) RpcMessage
: PScoped () (EventChan RpcMessage) (Consume RpcMessage)
: Process RpcMessage (Either Text RpcMessage) : UserError : r)
a
forall (r :: [(* -> *) -> * -> *]).
Members
'[Rpc !! RpcError, Reader PluginName, Log, Resource, Embed IO] r =>
InterpreterFor (Resumable RpcError Scratch) r
interpretScratch
embedPlugin ::
Members (HostDeps er) r =>
Members BuiltinHandlersDeps r =>
Sem r a ->
Sem r a
embedPlugin :: forall er (r :: [(* -> *) -> * -> *]) a.
(Members (HostDeps er) r, Members BuiltinHandlersDeps r) =>
Sem r a -> Sem r a
embedPlugin =
Sem r a -> Sem r a
forall (r :: [(* -> *) -> * -> *]) a.
Members BuiltinHandlersDeps r =>
Sem r a -> Sem r a
interceptHandlersBuiltin (Sem r a -> Sem r a) -> (Sem r a -> Sem r a) -> Sem r a -> Sem r a
forall b c a. (b -> c) -> (a -> b) -> a -> c
.
Sem (Host : r) a -> Sem r a
forall er (r :: [(* -> *) -> * -> *]).
Members (HostDeps er) r =>
InterpreterFor Host r
withHost (Sem (Host : r) a -> Sem r a)
-> (Sem r a -> Sem (Host : r) a) -> Sem r a -> Sem r a
forall b c a. (b -> c) -> (a -> b) -> a -> c
.
forall (index :: Nat) (inserted :: [(* -> *) -> * -> *])
(head :: [(* -> *) -> * -> *]) (oldTail :: [(* -> *) -> * -> *])
(tail :: [(* -> *) -> * -> *]) (old :: [(* -> *) -> * -> *])
(full :: [(* -> *) -> * -> *]) a.
(ListOfLength index head, WhenStuck index InsertAtUnprovidedIndex,
old ~ Append head oldTail, tail ~ Append inserted oldTail,
full ~ Append head tail,
InsertAtIndex index head tail oldTail full inserted) =>
Sem old a -> Sem full a
insertAt @0
runEmbedStackCli ::
PluginConfig c ->
Sem (EmbedStack c) () ->
IO ()
runEmbedStackCli :: forall c. PluginConfig c -> Sem (EmbedStack c) () -> IO ()
runEmbedStackCli PluginConfig c
conf =
PluginConfig c
-> Sem
(Reader PluginName
: Reader (CustomConfig c)
: Append
'[Log, Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig]
IOStack)
()
-> IO ()
forall c. PluginConfig c -> Sem (BasicPluginStack c) () -> IO ()
runCli PluginConfig c
conf (Sem
'[Reader PluginName, Reader (CustomConfig c), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO]
()
-> IO ())
-> (Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig c), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO]
()
-> Sem
'[Reader PluginName, Reader (CustomConfig c), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO]
())
-> Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig c), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO]
()
-> IO ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig c), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO]
()
-> Sem
'[Reader PluginName, Reader (CustomConfig c), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO]
()
forall (r :: [(* -> *) -> * -> *]).
(Members '[Log, Reader LogConfig, Reader PluginName] r,
Members IOStack r) =>
InterpretersFor HandlerEffects r
interpretPluginEmbed
runEmbedStack ::
PluginConfig () ->
Sem (EmbedStack ()) () ->
IO ()
runEmbedStack :: PluginConfig () -> Sem (EmbedStack ()) () -> IO ()
runEmbedStack PluginConfig ()
conf =
PluginConfig () -> Sem (BasicPluginStack ()) () -> IO ()
forall c. PluginConfig c -> Sem (BasicPluginStack c) () -> IO ()
runCli PluginConfig ()
conf (Sem
'[Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO]
()
-> IO ())
-> (Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO]
()
-> Sem
'[Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO]
())
-> Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO]
()
-> IO ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO]
()
-> Sem
'[Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO]
()
forall (r :: [(* -> *) -> * -> *]).
(Members '[Log, Reader LogConfig, Reader PluginName] r,
Members IOStack r) =>
InterpretersFor HandlerEffects r
interpretPluginEmbed
runEmbedPluginCli ::
HigherOrder r (EmbedStack c) =>
PluginConfig c ->
InterpretersFor r (EmbedStack c) ->
[RpcHandler (r ++ EmbedStack c)] ->
Sem (r ++ EmbedStack c) () ->
IO ()
runEmbedPluginCli :: forall (r :: [(* -> *) -> * -> *]) c.
HigherOrder r (EmbedStack c) =>
PluginConfig c
-> InterpretersFor r (EmbedStack c)
-> [RpcHandler (r ++ EmbedStack c)]
-> Sem (r ++ EmbedStack c) ()
-> IO ()
runEmbedPluginCli PluginConfig c
conf InterpretersFor r (EmbedStack c)
effs [RpcHandler (r ++ EmbedStack c)]
handlers =
PluginConfig c -> Sem (EmbedStack c) () -> IO ()
forall c. PluginConfig c -> Sem (EmbedStack c) () -> IO ()
runEmbedStackCli PluginConfig c
conf (Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig c), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO]
()
-> IO ())
-> (Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig c), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO])
()
-> Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig c), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO]
())
-> Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig c), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO])
()
-> IO ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
.
Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig c), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO])
()
-> Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig c), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO]
()
InterpretersFor r (EmbedStack c)
effs (Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig c), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO])
()
-> Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig c), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO]
())
-> (Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig c), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO])
()
-> Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig c), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO])
())
-> Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig c), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO])
()
-> Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig c), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO]
()
forall b c a. (b -> c) -> (a -> b) -> a -> c
.
[RpcHandler
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig c), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO])]
-> Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig c), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO])
()
-> Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig c), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO])
()
forall (r :: [(* -> *) -> * -> *]) a.
Members
'[Handlers !! Report, Rpc !! RpcError, Log, Error BootError] r =>
[RpcHandler r] -> Sem r a -> Sem r a
withHandlers [RpcHandler
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig c), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO])]
[RpcHandler (r ++ EmbedStack c)]
handlers (Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig c), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO])
()
-> Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig c), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO])
())
-> (Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig c), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO])
()
-> Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig c), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO])
())
-> Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig c), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO])
()
-> Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig c), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO])
()
forall b c a. (b -> c) -> (a -> b) -> a -> c
.
Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig c), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO])
()
-> Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig c), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO])
()
forall er (r :: [(* -> *) -> * -> *]) a.
(Members (HostDeps er) r, Members BuiltinHandlersDeps r) =>
Sem r a -> Sem r a
embedPlugin
runEmbedPluginIO ::
HigherOrder r (EmbedStack ()) =>
PluginConfig () ->
InterpretersFor r (EmbedStack ()) ->
[RpcHandler (r ++ EmbedStack ())] ->
Sem (r ++ EmbedStack ()) () ->
IO ()
runEmbedPluginIO :: forall (r :: [(* -> *) -> * -> *]).
HigherOrder r (EmbedStack ()) =>
PluginConfig ()
-> InterpretersFor r (EmbedStack ())
-> [RpcHandler (r ++ EmbedStack ())]
-> Sem (r ++ EmbedStack ()) ()
-> IO ()
runEmbedPluginIO PluginConfig ()
conf InterpretersFor r (EmbedStack ())
effs [RpcHandler (r ++ EmbedStack ())]
handlers =
PluginConfig () -> Sem (EmbedStack ()) () -> IO ()
runEmbedStack PluginConfig ()
conf (Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO]
()
-> IO ())
-> (Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO])
()
-> Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO]
())
-> Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO])
()
-> IO ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
.
Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO])
()
-> Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO]
()
InterpretersFor r (EmbedStack ())
effs (Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO])
()
-> Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO]
())
-> (Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO])
()
-> Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO])
())
-> Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO])
()
-> Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO]
()
forall b c a. (b -> c) -> (a -> b) -> a -> c
.
[RpcHandler
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO])]
-> Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO])
()
-> Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO])
()
forall (r :: [(* -> *) -> * -> *]) a.
Members
'[Handlers !! Report, Rpc !! RpcError, Log, Error BootError] r =>
[RpcHandler r] -> Sem r a -> Sem r a
withHandlers [RpcHandler
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO])]
[RpcHandler (r ++ EmbedStack ())]
handlers (Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO])
()
-> Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO])
())
-> (Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO])
()
-> Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO])
())
-> Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO])
()
-> Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO])
()
forall b c a. (b -> c) -> (a -> b) -> a -> c
.
Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO])
()
-> Sem
(Append
r
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO])
()
forall er (r :: [(* -> *) -> * -> *]) a.
(Members (HostDeps er) r, Members BuiltinHandlersDeps r) =>
Sem r a -> Sem r a
embedPlugin
runEmbedPluginIO_ ::
PluginConfig () ->
[RpcHandler (EmbedStack ())] ->
Sem (EmbedStack ()) () ->
IO ()
runEmbedPluginIO_ :: PluginConfig ()
-> [RpcHandler (EmbedStack ())] -> Sem (EmbedStack ()) () -> IO ()
runEmbedPluginIO_ PluginConfig ()
conf [RpcHandler (EmbedStack ())]
handlers =
PluginConfig () -> Sem (EmbedStack ()) () -> IO ()
runEmbedStack PluginConfig ()
conf (Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO]
()
-> IO ())
-> (Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO]
()
-> Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO]
())
-> Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO]
()
-> IO ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
.
[RpcHandler
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO]]
-> Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO]
()
-> Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO]
()
forall (r :: [(* -> *) -> * -> *]) a.
Members
'[Handlers !! Report, Rpc !! RpcError, Log, Error BootError] r =>
[RpcHandler r] -> Sem r a -> Sem r a
withHandlers [RpcHandler
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO]]
[RpcHandler (EmbedStack ())]
handlers (Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO]
()
-> Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO]
())
-> (Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO]
()
-> Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO]
())
-> Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO]
()
-> Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO]
()
forall b c a. (b -> c) -> (a -> b) -> a -> c
.
Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO]
()
-> Sem
'[Resumable RpcError Scratch, Resumable SettingError Settings,
Resumable Report VariableWatcher, Handlers !! Report, Log,
DataLog LogReport, Rpc !! RpcError,
Resumable RpcError (Responses RequestId Response),
Events (OutChan Event) Event,
PScoped () (EventChan Event) (Consume Event), Reports,
Events (OutChan RpcMessage) RpcMessage,
PScoped () (EventChan RpcMessage) (Consume RpcMessage),
Process RpcMessage (Either Text RpcMessage), UserError,
Reader PluginName, Reader (CustomConfig ()), Log,
Tagged "stderr" Log, Tagged "file" Log, Reader LogConfig,
Reader HostConfig, Time Time Date, Error BootError,
UninterruptibleMaskIO, UninterruptibleMaskIO, GatesIO, Race, Async,
Resource, Embed IO, Final IO]
()
forall er (r :: [(* -> *) -> * -> *]) a.
(Members (HostDeps er) r, Members BuiltinHandlersDeps r) =>
Sem r a -> Sem r a
embedPlugin