def Drive.finished

bend-trace-context@0.2.0.0 · trace_context.bend:1014

import bend-trace-context@0.2.0.0/trace_context.bend as TraceContext
import Base

1014# Turn the IO driver's final step into its result.
1015def Drive.finished(~T: Data, ~A: Data, ~result: T -> Result<&2, &2, GenerationError, A>, ~S: Type,
1016  action: IO(S & T)) -> IO(S & Result<&2, &2, GenerationError, A>):
1017  IO.bind(S & T, S & Result<&2, &2, GenerationError, A>, action,
1018    done => IO.pure(S & Result<&2, &2, GenerationError, A>, Drive.outcome(~T, ~A, ~result, S, done)))

Uses (7)

Used by (3)