You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can automatically provide RPC stubs for any first-order effect, and for any second-order effect that is called with StaticPtrs.
How?
dataRPCcmawhereDoRPC::c->RPCcmc
where c is some type for marshalling, maybe a Data.JSON.Value or a ByteString or something.
We can then transform effects into RPC calls:
runAsRPC:: (ToRPCec, Member (RPCc) r) =>Sem (e ':r) a->Semra
runAsRPC = interpret $fmap fromRPC . doRPC . toRPC
where the marshalling details come generically from the ToRPC instance, possibly built around the one-liner machinery.
This lets you send RPC calls; to respond to them you can do something with an RPC handler that receives RPC messages and then uses intercept to respond to them. I haven't hashed out the details of this bit yet, but it seems super doable.
The text was updated successfully, but these errors were encountered:
Consider this:
We can automatically provide RPC stubs for any first-order effect, and for any second-order effect that is called with
StaticPtr
s.How?
where
c
is some type for marshalling, maybe aData.JSON.Value
or aByteString
or something.We can then transform effects into RPC calls:
where the marshalling details come generically from the
ToRPC
instance, possibly built around theone-liner
machinery.This lets you send RPC calls; to respond to them you can do something with an
RPC
handler that receivesRPC
messages and then usesintercept
to respond to them. I haven't hashed out the details of this bit yet, but it seems super doable.The text was updated successfully, but these errors were encountered: