OPENFPDocsall docsSearch names, modules, packages, or :: a typeCtrl K

GHC 9.10.3

Modulevortex-trace-0.4.0GHC2024

Vortex.Trace

The observable vocabulary. A block's externally visible behaviour is a finite sequence of Said emissions terminated by exactly one Result or Failed; nothing else about evaluation is observable. The wire protocol is show of Reply, one frame per value — Haskell on the wire, recovered client-side with readMaybe.

A verb may instead open a duplex channel (Duplexing), after which the call carries a StreamElem of chunks in each direction — the primitive behind streaming verbs like git. The stream's trailer is an ordinary Reply, so a plain text verb is just a stream with no chunks.

  • 5 types
datadata Reply
#

Constructors

Instances3Eq, Read, Show
  • Eq ReplyDefined in vortex-trace-0.4.0 · Vortex.Trace
  • Read ReplyDefined in vortex-trace-0.4.0 · Vortex.Trace
  • Show ReplyDefined in vortex-trace-0.4.0 · Vortex.Trace
datadata StreamElem b a
#

An element positioned in a stream, generic over the chunk type a and the trailer type b (for a duplex vortex call, a is a raw chunk and b is the closing Reply). The trailer is carried by the terminal constructors, so end-of-stream is never a content-less token. Two terminal forms because the end may arrive fused with the last chunk (FinalElem) or separately after it (StreamElem then NoMoreElems) — a reader cannot know a chunk is the last until it reads past it. (The shape is grapesy's StreamElem; the transport is vortex's own, not gRPC.)

Constructors

Instances6Functor, Foldable, Traversable, Eq, Read, Show
typetype Emit = String -> IO ()
#

Where a running block's Said output goes: stdout for a REPL, a transport frame for a connected wisp.

datadata Command
#

One operation a wisp may call, for capability discovery: the name, its normalised signature, an optional doc, and the theories it uses. Reflected from the DSL's export list, so it is exactly the granted surface. A client gets [Command] back from :commands as show-rendered Haskell (in a Result), readable with readMaybe — so an agent learns the whole typed API in one round trip.

Constructors

Instances3Eq, Read, Show
  • Eq CommandDefined in vortex-trace-0.4.0 · Vortex.Trace
  • Read CommandDefined in vortex-trace-0.4.0 · Vortex.Trace

    The derived reading, which also accepts the three-field record a 0.2.0 host sends (with no effects), so a client reads a host that predates the field during a deploy.

  • Show CommandDefined in vortex-trace-0.4.0 · Vortex.Trace
datadata Call
#

One operation by name, its arguments as show-rendered Haskell values: the wire form of a call for peers that do not elaborate. A shell dispatches it from its table; the reply is the same Reply stream a block produces. This is the D-Bus method call of the stack — and, unlike a block, it needs no GHC on the far side.

Constructors

Instances3Eq, Read, Show
  • Eq CallDefined in vortex-trace-0.4.0 · Vortex.Trace
  • Read CallDefined in vortex-trace-0.4.0 · Vortex.Trace
  • Show CallDefined in vortex-trace-0.4.0 · Vortex.Trace