~/bend-docscommunity

camber.bend relies on unsafe/foreign

raw source on the hub · import bend-kit-camber@0.7.0.0/camber.bend as Camber

Fixed prepared HTTP applications and bounded affine dependency bundles.

10 imports
import Base
import bend-kit-http@0.32.0.0/http.bend as Http
import bend-kit-router@0.2.0.0/router.bend as Router
import bend-kit-router@0.2.0.0/target.bend as Target
import bend-kit-json@0.5.1.0/json.bend as Json
import ./response.bend as Response
import ./input.bend as Input
import bend-kit-http@0.32.0.0/completion.bend as TransportCompletion
import ./notices.bend as Notices
import bend-kit-time@0.1.2.1/time.bend as Time

Types

type ResponseError source · line 13 · raw

Data

type Counts source · line 51 · raw

Data

type Outcome source · line 54 · raw

@-E:Data -> @-O:Data -> Data

type CloseResult source · line 60 · raw

Data

type Message source · line 64 · raw

@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> Type

type Context source · line 72 · raw

@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> Data

Copy only this context, never the resources. The inbox bounds queued commands; callers must count blocked submissions inside their transport admission limit.

type Owner source · line 76 · raw

@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> Type

The completion future has one affine owner; request contexts copy only inbox.

type OwnerClose source · line 79 · raw

@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> Type

type OwnerStep source · line 180 · raw

@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> Type

type Group source · line 389 · raw

@-P:Data -> Data

Policies are prepared Data, not callbacks. Later lifecycle stages can consume these root-to-route declarations without splitting patterns or finding groups.

type GroupPlan source · line 392 · raw

@-P:Data -> Data

type Route source · line 395 · raw

@-A:Data -> @-P:Data -> Data

type Endpoint source · line 398 · raw

@-A:Data -> @-P:Data -> Data

type Application source · line 401 · raw

@-A:Data -> @-C:Data -> @-P:Data -> Data

type RegistrationError source · line 404 · raw

Data

type Match source · line 408 · raw

@-P:Data -> Data

type Policy source · line 544 · raw

@-H:Data -> Data

type Metadata source · line 550 · raw

Data

type Error source · line 553 · raw

@-E:Data -> Data

type Step source · line 581 · raw

@-S:Type -> @-E:Data -> Type

type Completion source · line 586 · raw

@-S:Type -> @-H:Data -> Type

type BufferedRequest source · line 907 · raw

Data

The wrapper owns both pipes until its admitted operation really returns. Only disposable HTTP packed buffers cross them, never external handles.

type ApplicationReport source · line 910 · raw

@-H:Data -> Data

type ServingContext source · line 914 · raw

@-A:Data -> @-S:Type -> @-K:Data -> @-H:Data -> Data

type Server source · line 918 · raw

@-A:Data -> @-S:Type -> @-K:Data -> @-H:Data -> Type

type StartupError source · line 922 · raw

Data

type ServerExit source · line 927 · raw

@-A:Data -> @-S:Type -> @-K:Data -> @-H:Data -> Type

type NoticePayload source · line 965 · raw

@-K:Data -> @-H:Data -> Data

Definitions

def validate.checked source · line 17 · raw

@valid:Bool -> @response:0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res -> Result<&2, &1, ResponseError, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>

def validate source · line 24 · raw

@response:0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res -> Result<&2, &1, ResponseError, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>

def text source · line 32 · raw

@status:U32 -> @value:String -> 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res

def raw source · line 35 · raw

@status:U32 -> @body:0x6a946b742ab6f76f0ba5b90b14da52ad/http.Body -> 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res

def empty source · line 38 · raw

@status:U32 -> 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res

def redirect.checked source · line 41 · raw

@valid:Bool -> @status:U32 -> @location:String -> Result<&2, &1, ResponseError, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>

def redirect source · line 48 · raw

@+status:U32 -> @+location:String -> Result<&2, &1, ResponseError, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>

def owner.context source · line 83 · raw

@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @owner:Owner<R, P, I, E, O> -> Pair(Owner<R, P, I, E, O>, Context<R, P, I, E, O>)

def outcome.value source · line 89 · raw

@-E:Data -> @-O:Data -> @result:Result<&2, &2, E, O> -> Outcome<E, O>

def receive.value source · line 185 · raw

@-A:Type -> @value:Maybe<&1, A> -> IO(A)

IO.join closes a one-shot channel; the owner inbox must remain reusable.

def receive source · line 192 · raw

@-A:Type -> @channel:Chan(A) -> IO(A)

def submit source · line 291 · raw

@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @context:Context<R, P, I, E, O> -> @principal:P -> @input:I -> @reply:Chan(Outcome<E, O>) -> IO(Result<&1, &1, Message<R, P, I, E, O>, Unit>)

def call.accepted source · line 299 · raw

@-T:Type -> @-E:Data -> @-O:Data -> @accepted:Result<&1, &1, T, Unit> -> @+reply:Chan(Outcome<E, O>) -> IO(Outcome<E, O>)

def call source · line 311 · raw

@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @context:Context<R, P, I, E, O> -> @principal:P -> @input:I -> IO(Outcome<E, O>)

def inspect.value source · line 320 · raw

@value:Maybe<&1, Counts> -> Maybe<&2, Counts>

def inspect.sent source · line 327 · raw

@-T:Type -> @sent:Result<&1, &1, T, Unit> -> @+reply:Chan(Counts) -> IO(Maybe<&2, Counts>)

def inspect source · line 339 · raw

@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @context:Context<R, P, I, E, O> -> IO(Maybe<&2, Counts>)

def close.sent source · line 347 · raw

@-T:Type -> @sent:Result<&1, &1, T, Unit> -> @+reply:Chan(CloseResult) -> IO(CloseResult)

def close.join source · line 359 · raw

@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @owner:Owner<R, P, I, E, O> -> IO(OwnerClose<R, P, I, E, O>)

def close.completed source · line 367 · raw

@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @result:CloseResult -> @owner:Owner<R, P, I, E, O> -> IO(OwnerClose<R, P, I, E, O>)

def close source · line 378 · raw

@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @owner:Owner<R, P, I, E, O> -> IO(OwnerClose<R, P, I, E, O>)

Stop external admissions before close. Busy preserves live context/capacity; retry after admitted operations finish. Stalled operations remain observable.

def groups.equal source · line 411 · raw

@xs:List<&2, U32> -> @ys:List<&2, U32> -> Bool

def minimal source · line 590 · raw

0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res

Application completion only: no socket write, duration, or peer-receipt claim.

def problem.allow source · line 593 · raw

@add:Bool -> @headers:Map<&2, List<&2, String>> -> @allow:String -> Map<&2, List<&2, String>>

def problem.response source · line 598 · raw

@allow:String -> @response:0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res -> 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res

def problem source · line 602 · raw

@+status:U32 -> @title:String -> @allow:String -> 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res

def metadata.authority source · line 811 · raw

@authority:Maybe<&2, String> -> @meta:Metadata -> Metadata

def server.config source · line 930 · raw

@port:U32 -> 0x6a946b742ab6f76f0ba5b90b14da52ad/http.ServerConfig

Templates

template json source · line 29 · raw

@-T:Type -> @-encode:(@_:T -> 0xc57af2d86db2e94187b6fb2ac4976fc9/json.Val) -> @status:U32 -> @value:T -> 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res

The encoder is an explicit public projection, never record reflection.

template dispose source · line 96 · raw

@-R:Type -> @-destroy:(@_:R -> IO(Unit)) -> @resources:List<&1, R> -> IO(Unit)

template drain.message source · line 107 · raw

@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @-destroy:(@_:R -> IO(Unit)) -> @message:Message<R, P, I, E, O> -> IO(Unit)

Closing Base channels retains buffered messages. Drain them and answer stopped callers, rather than stranding accepted commands behind the close command.

template work.returned source · line 126 · raw

@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @-destroy:(@_:R -> IO(Unit)) -> @accepted:Result<&1, &1, Message<R, P, I, E, O>, Unit> -> IO(Unit)

The resources return through the private owner protocol BEFORE a disposable caller reply. A closed caller reply cannot erase a handle or strand capacity.

template work.return source · line 135 · raw

@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @-destroy:(@_:R -> IO(Unit)) -> @messages:Chan(Message<R, P, I, E, O>) -> @reply:Chan(Outcome<E, O>) -> @result:Pair(R, Result<&2, &2, E, O>) -> IO(Unit)

template work source · line 147 · raw

@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @-handler:(@_:R -> @_:P -> @_:I -> IO(Pair(R, Result<&2, &2, E, O>))) -> @-destroy:(@_:R -> IO(Unit)) -> @resource:R -> @principal:P -> @input:I -> @messages:Chan(Message<R, P, I, E, O>) -> @reply:Chan(Outcome<E, O>) -> IO(Unit)

template drain.step source · line 156 · raw

@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @-destroy:(@_:R -> IO(Unit)) -> @pending:Maybe<&1, Message<R, P, I, E, O>> -> @next:(@_:Unit -> IO(Unit)) -> IO(Unit)

template drain source · line 169 · raw

@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @-destroy:(@_:R -> IO(Unit)) -> @fuel:Nat -> @+messages:Chan(Message<R, P, I, E, O>) -> IO(Unit)

The closed inbox contains at most room buffered messages.

template build.step source · line 243 · raw

@-R:Type -> @-E:Data -> @-destroy:(@_:R -> IO(Unit)) -> @result:Result<&2, &1, E, R> -> @resources:List<&1, R> -> @next:(@_:List<&1, R> -> IO(Result<&2, &1, E, List<&1, R>>)) -> IO(Result<&2, &1, E, List<&1, R>>)

template build source · line 255 · raw

@-K:Data -> @-R:Type -> @-E:Data -> @-create:(@_:K -> @_:Nat -> IO(Result<&2, &1, E, R>)) -> @-destroy:(@_:R -> IO(Unit)) -> @remaining:Nat -> @+config:K -> @resources:List<&1, R> -> IO(Result<&2, &1, E, List<&1, R>>)

template start.ready source · line 266 · raw

@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @-handler:(@_:R -> @_:P -> @_:I -> IO(Pair(R, Result<&2, &2, E, O>))) -> @-destroy:(@_:R -> IO(Unit)) -> @capacity:Nat -> @+room:U32 -> @result:Result<&2, &1, E, List<&1, R>> -> IO(Result<&2, &1, E, Owner<R, P, I, E, O>>)

template start source · line 282 · raw

@-K:Data -> @-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @-create:(@_:K -> @_:Nat -> IO(Result<&2, &1, E, R>)) -> @-handler:(@_:R -> @_:P -> @_:I -> IO(Pair(R, Result<&2, &2, E, O>))) -> @-destroy:(@_:R -> IO(Unit)) -> @config:K -> @+capacity:Nat -> @room:U32 -> IO(Result<&2, &1, E, Owner<R, P, I, E, O>>)

The initializer closes partial handles within a failed bundle; start closes all prior whole bundles. No workers exist until the complete set opens.

template group.pick source · line 420 · raw

@-P:Data -> @same:Bool -> @group:Group<P> -> @later:(@_:Unit -> Maybe<&2, Group<P>>) -> Maybe<&2, Group<P>>

template group.find source · line 427 · raw

@-P:Data -> @groups:List<&2, Group<P>> -> @+id:U32 -> Maybe<&2, Group<P>>

template group.checked source · line 434 · raw

@-P:Data -> @same:Bool -> @policy:P -> Maybe<&2, P>

template group.policy source · line 441 · raw

@-P:Data -> @found:Maybe<&2, Group<P>> -> @ancestors:List<&2, U32> -> Maybe<&2, P>

template groups.policies source · line 448 · raw

@-P:Data -> @ids:List<&2, U32> -> @+declared:List<&2, Group<P>> -> @+ancestors:List<&2, U32> -> Maybe<&2, List<&2, P>>

template groups.unique source · line 458 · raw

@-P:Data -> @found:Maybe<&2, Group<P>> -> Bool

template groups.valid source · line 465 · raw

@-P:Data -> @groups:List<&2, Group<P>> -> @+all:List<&2, Group<P>> -> Bool

template routes.policies source · line 473 · raw

@-P:Data -> @result:Maybe<&2, List<&2, P>> -> @ids:List<&2, U32> -> Result<&2, &2, RegistrationError, List<&2, P>>

template routes.prepare source · line 480 · raw

@-A:Data -> @-P:Data -> @routes:List<&2, Route<A, P>> -> @+groups:List<&2, Group<P>> -> @+root:P -> Result<&2, &2, RegistrationError, List<&2, 0x9606cc4b1afb0de13a7da7c0f6fc3a82/router.Entry<Endpoint<A, P>>>>

template groups.prepare source · line 490 · raw

@-P:Data -> @groups:List<&2, Group<P>> -> @+all:List<&2, Group<P>> -> Result<&2, &2, RegistrationError, List<&2, GroupPlan<P>>>

template groups.select source · line 501 · raw

@-P:Data -> @same:Bool -> @policies:List<&2, P> -> @later:(@_:Unit -> List<&2, P>) -> List<&2, P>

template groups.prepared source · line 506 · raw

@-P:Data -> @plans:List<&2, GroupPlan<P>> -> @+ids:List<&2, U32> -> List<&2, P>

template application.table source · line 513 · raw

@-A:Data -> @-C:Data -> @-P:Data -> @result:Result<&2, &2, 0x9606cc4b1afb0de13a7da7c0f6fc3a82/router.Error, 0x9606cc4b1afb0de13a7da7c0f6fc3a82/router.Table<Endpoint<A, P>>> -> @context:C -> @root:P -> @groups:List<&2, GroupPlan<P>> -> Result<&2, &2, RegistrationError, Application<A, C, P>>

template application.valid source · line 520 · raw

@-A:Data -> @-C:Data -> @-P:Data -> @valid:Bool -> @routes:List<&2, Route<A, P>> -> @+groups:List<&2, Group<P>> -> @context:C -> @+root:P -> Result<&2, &2, RegistrationError, Application<A, C, P>>

template application source · line 531 · raw

@-A:Data -> @-C:Data -> @-P:Data -> @routes:List<&2, Route<A, P>> -> @+groups:List<&2, Group<P>> -> @context:C -> @root:P -> Result<&2, &2, RegistrationError, Application<A, C, P>>

Construction is pure and fallible; no listener or owner is started here.

template describe source · line 534 · raw

@-A:Data -> @-C:Data -> @-P:Data -> @app:Application<A, C, P> -> List<&2, 0x9606cc4b1afb0de13a7da7c0f6fc3a82/router.Description>

template plain source · line 539 · raw

@-handler:(@_:0x6a946b742ab6f76f0ba5b90b14da52ad/http.Req -> IO(0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res)) -> @req:0x6a946b742ab6f76f0ba5b90b14da52ad/http.Req -> IO(Result<&2, &1, ResponseError, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>)

A closed template can run repeatedly; an affine callback registry cannot.

template policy source · line 547 · raw

@-H:Data -> @id:U32 -> @before:List<&2, H> -> @transforms:List<&2, H> -> Policy<H>

template input source · line 559 · raw

@-I:Type -> @-E:Data -> @outcome:Result<&2, &1, U32, I> -> Result<&2, &1, Error<E>, I>

Adapt reusable input status failures to the existing one-pass dispatch mapper.

template execute.decoded source · line 564 · raw

@-I:Type -> @-S:Type -> @-K:Data -> @-E:Data -> @-handler:(@_:S -> @_:K -> @_:I -> IO(Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>))) -> @outcome:Result<&2, &1, Error<E>, I> -> @state:S -> @config:K -> IO(Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>))

template execute source · line 574 · raw

@-I:Type -> @-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-decoder:(@_:K -> @_:Match<Policy<H>> -> @_:0x6a946b742ab6f76f0ba5b90b14da52ad/http.Req -> Result<&2, &1, Error<E>, I>) -> @-handler:(@_:S -> @_:K -> @_:I -> IO(Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>))) -> @state:S -> @+config:K -> @selected:Match<Policy<H>> -> @req:0x6a946b742ab6f76f0ba5b90b14da52ad/http.Req -> IO(Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>))

An executor, not a second dispatcher: call from dispatch's run template, after all applicable before hooks. Only validated typed input reaches business IO.

template default.error source · line 605 · raw

@-E:Data -> @error:Error<E> -> 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res

template default.mapper source · line 622 · raw

@-S:Type -> @-K:Data -> @-E:Data -> @state:S -> @config:K -> @error:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>))

template mapped.checked source · line 625 · raw

@-S:Type -> @-H:Data -> @state:S -> @entered:List<&2, Policy<H>> -> @stopped:Bool -> @result:Result<&2, &1, ResponseError, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res> -> Completion<S, H>

template mapped.result source · line 632 · raw

@-S:Type -> @-E:Data -> @-H:Data -> @entered:List<&2, Policy<H>> -> @stopped:Bool -> @result:Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>) -> Completion<S, H>

template failed source · line 640 · raw

@-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>))) -> @mapped:Bool -> @state:S -> @config:K -> @error:Error<E> -> @entered:List<&2, Policy<H>> -> @stopped:Bool -> IO(Completion<S, H>)

template result source · line 652 · raw

@-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>))) -> @config:K -> @entered:List<&2, Policy<H>> -> @outcome:Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>) -> IO(Completion<S, H>)

template before.next source · line 663 · raw

@-S:Type -> @-E:Data -> @step:Step<S, E> -> @next:(@_:S -> IO(Step<S, E>)) -> IO(Step<S, E>)

template before source · line 672 · raw

@-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-hook:(@_:H -> @_:S -> @_:K -> @_:Metadata -> IO(Step<S, E>)) -> @hooks:List<&2, H> -> @state:S -> @+config:K -> @+meta:Metadata -> IO(Step<S, E>)

template transformed source · line 684 · raw

@-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>))) -> @config:K -> @entered:List<&2, Policy<H>> -> @mapped:Bool -> @outcome:Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>) -> IO(Completion<S, H>)

template transforms source · line 695 · raw

@-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-hook:(@_:H -> @_:S -> @_:K -> @_:0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res -> IO(Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>))) -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>))) -> @hooks:List<&2, H> -> @+config:K -> @completion:Completion<S, H> -> IO(Completion<S, H>)

template entered.step source · line 713 · raw

@-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>))) -> @config:K -> @entered:List<&2, Policy<H>> -> @body:0x6a946b742ab6f76f0ba5b90b14da52ad/http.Body -> @step:Step<S, E> -> @next:(@_:S -> @_:List<&2, Policy<H>> -> @_:0x6a946b742ab6f76f0ba5b90b14da52ad/http.Body -> IO(Completion<S, H>)) -> IO(Completion<S, H>)

template scopes source · line 725 · raw

@-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-before_hook:(@_:H -> @_:S -> @_:K -> @_:Metadata -> IO(Step<S, E>)) -> @-after_hook:(@_:H -> @_:S -> @_:K -> @_:0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res -> IO(Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>))) -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>))) -> @policies:List<&2, Policy<H>> -> @state:S -> @+config:K -> @+meta:Metadata -> @entered:List<&2, Policy<H>> -> @body:0x6a946b742ab6f76f0ba5b90b14da52ad/http.Body -> @next:(@_:S -> @_:List<&2, Policy<H>> -> @_:0x6a946b742ab6f76f0ba5b90b14da52ad/http.Body -> IO(Completion<S, H>)) -> IO(Completion<S, H>)

template finish.checked source · line 742 · raw

@-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>))) -> @state:S -> @config:K -> @entered:List<&2, Policy<H>> -> @mapped:Bool -> @stopped:Bool -> @checked:Result<&2, &1, ResponseError, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res> -> IO(Completion<S, H>)

template finish source · line 752 · raw

@-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>))) -> @config:K -> @completion:Completion<S, H> -> IO(Completion<S, H>)

template policies.tail source · line 759 · raw

@-H:Data -> @policies:List<&2, Policy<H>> -> List<&2, Policy<H>>

template endpoint source · line 767 · raw

@-A:Data -> @-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-run:(@_:A -> @_:S -> @_:K -> @_:Match<Policy<H>> -> @_:0x6a946b742ab6f76f0ba5b90b14da52ad/http.Req -> IO(Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>))) -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>))) -> @action:A -> @state:S -> @+config:K -> @selected:Match<Policy<H>> -> @meta:Metadata -> @entered:List<&2, Policy<H>> -> @body:0x6a946b742ab6f76f0ba5b90b14da52ad/http.Body -> IO(Completion<S, H>)

template framework source · line 777 · raw

@-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>))) -> @+status:U32 -> @allow:String -> @state:S -> @config:K -> @entered:List<&2, Policy<H>> -> @body:0x6a946b742ab6f76f0ba5b90b14da52ad/http.Body -> IO(Completion<S, H>)

template choice source · line 787 · raw

@-A:Data -> @-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-before_hook:(@_:H -> @_:S -> @_:K -> @_:Metadata -> IO(Step<S, E>)) -> @-after_hook:(@_:H -> @_:S -> @_:K -> @_:0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res -> IO(Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>))) -> @-run:(@_:A -> @_:S -> @_:K -> @_:Match<Policy<H>> -> @_:0x6a946b742ab6f76f0ba5b90b14da52ad/http.Req -> IO(Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>))) -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>))) -> @selected:0x9606cc4b1afb0de13a7da7c0f6fc3a82/router.Choice<Endpoint<A, Policy<H>>> -> @target:0x9606cc4b1afb0de13a7da7c0f6fc3a82/target.Target -> @groups:List<&2, GroupPlan<Policy<H>>> -> @state:S -> @+config:K -> @+meta:Metadata -> @entered:List<&2, Policy<H>> -> @body:0x6a946b742ab6f76f0ba5b90b14da52ad/http.Body -> IO(Completion<S, H>)

template resolved source · line 819 · raw

@-A:Data -> @-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-before_hook:(@_:H -> @_:S -> @_:K -> @_:Metadata -> IO(Step<S, E>)) -> @-after_hook:(@_:H -> @_:S -> @_:K -> @_:0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res -> IO(Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>))) -> @-run:(@_:A -> @_:S -> @_:K -> @_:Match<Policy<H>> -> @_:0x6a946b742ab6f76f0ba5b90b14da52ad/http.Req -> IO(Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>))) -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>))) -> @outcome:Result<&2, &2, 0x9606cc4b1afb0de13a7da7c0f6fc3a82/router.Error, 0x9606cc4b1afb0de13a7da7c0f6fc3a82/router.Resolved<Endpoint<A, Policy<H>>>> -> @groups:List<&2, GroupPlan<Policy<H>>> -> @state:S -> @config:K -> @meta:Metadata -> @entered:List<&2, Policy<H>> -> @body:0x6a946b742ab6f76f0ba5b90b14da52ad/http.Body -> IO(Completion<S, H>)

template dispatch.application source · line 834 · raw

@-A:Data -> @-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-before_hook:(@_:H -> @_:S -> @_:K -> @_:Metadata -> IO(Step<S, E>)) -> @-after_hook:(@_:H -> @_:S -> @_:K -> @_:0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res -> IO(Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>))) -> @-run:(@_:A -> @_:S -> @_:K -> @_:Match<Policy<H>> -> @_:0x6a946b742ab6f76f0ba5b90b14da52ad/http.Req -> IO(Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>))) -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>))) -> @app:Application<A, K, Policy<H>> -> @state:S -> @req:0x6a946b742ab6f76f0ba5b90b14da52ad/http.Req -> IO(Completion<S, H>)

template access.disabled source · line 850 · raw

@-K:Data -> @config:K -> 0x2f03974bdfacdfce4ef1eb030eae486d/notices.Access

template notice.ignore source · line 853 · raw

@-N:Data -> @-H:Data -> @-E:Data -> @observer:N -> @policy:Policy<H> -> @notice:0x2f03974bdfacdfce4ef1eb030eae486d/notices.Notice -> IO(Result<&2, &2, E, Unit>)

template notice.error.ignore source · line 856 · raw

@-N:Data -> @-E:Data -> @observer:N -> @error:E -> IO(Unit)

template notice.result source · line 859 · raw

@-N:Data -> @-E:Data -> @-report:(@_:N -> @_:E -> IO(Unit)) -> @observer:N -> @result:Result<&2, &2, E, Unit> -> IO(Unit)

template notices source · line 864 · raw

@-N:Data -> @-H:Data -> @-E:Data -> @-notify:(@_:N -> @_:Policy<H> -> @_:0x2f03974bdfacdfce4ef1eb030eae486d/notices.Notice -> IO(Result<&2, &2, E, Unit>)) -> @-report:(@_:N -> @_:E -> IO(Unit)) -> @entered:List<&2, Policy<H>> -> @+observer:N -> @+notice:0x2f03974bdfacdfce4ef1eb030eae486d/notices.Notice -> IO(Unit)

template dispatch.completed source · line 877 · raw

@-S:Type -> @-N:Data -> @-H:Data -> @-E:Data -> @-notify:(@_:N -> @_:Policy<H> -> @_:0x2f03974bdfacdfce4ef1eb030eae486d/notices.Notice -> IO(Result<&2, &2, E, Unit>)) -> @-report:(@_:N -> @_:E -> IO(Unit)) -> @observer:N -> @access:0x2f03974bdfacdfce4ef1eb030eae486d/notices.Access -> @started:0xe00bbf72c3ff9dc6d7b077524522b3a8/time.Duration -> @completion:Completion<S, H> -> IO(Completion<S, H>)

template dispatch source · line 891 · raw

@-A:Data -> @-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-N:Data -> @-before_hook:(@_:H -> @_:S -> @_:K -> @_:Metadata -> IO(Step<S, E>)) -> @-after_hook:(@_:H -> @_:S -> @_:K -> @_:0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res -> IO(Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>))) -> @-run:(@_:A -> @_:S -> @_:K -> @_:Match<Policy<H>> -> @_:0x6a946b742ab6f76f0ba5b90b14da52ad/http.Req -> IO(Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>))) -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>))) -> @-notify:(@_:N -> @_:Policy<H> -> @_:0x2f03974bdfacdfce4ef1eb030eae486d/notices.Notice -> IO(Result<&2, &2, E, Unit>)) -> @-report:(@_:N -> @_:E -> IO(Unit)) -> @observer:N -> @access:0x2f03974bdfacdfce4ef1eb030eae486d/notices.Access -> @app:Application<A, K, Policy<H>> -> @state:S -> @req:0x6a946b742ab6f76f0ba5b90b14da52ad/http.Req -> IO(Completion<S, H>)

The same application pipeline is used live; only this boundary emits direct notices.

template server.bundles.cons source · line 933 · raw

@-S:Type -> @resource:S -> @counted:Pair(List<&1, S>, Nat) -> Pair(List<&1, S>, Nat)

template server.bundles source · line 937 · raw

@-S:Type -> @resources:List<&1, S> -> Pair(List<&1, S>, Nat)

template server.work.completed source · line 943 · raw

@-S:Type -> @-H:Data -> @response_channel:Chan(0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res) -> @completion:Completion<S, H> -> IO(Pair(S, Result<&2, &2, Unit, ApplicationReport<H>>))

template server.work source · line 951 · raw

@-A:Data -> @-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-before_hook:(@_:H -> @_:S -> @_:K -> @_:Metadata -> IO(Step<S, E>)) -> @-after_hook:(@_:H -> @_:S -> @_:K -> @_:0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res -> IO(Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>))) -> @-run:(@_:A -> @_:S -> @_:K -> @_:Match<Policy<H>> -> @_:0x6a946b742ab6f76f0ba5b90b14da52ad/http.Req -> IO(Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>))) -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>))) -> @state:S -> @app:Application<A, K, Policy<H>> -> @input:BufferedRequest -> IO(Pair(S, Result<&2, &2, Unit, ApplicationReport<H>>))

template server.notified source · line 968 · raw

@-K:Data -> @-H:Data -> @-E:Data -> @-notify:(@_:K -> @_:Policy<H> -> @_:0x2f03974bdfacdfce4ef1eb030eae486d/notices.Notice -> IO(Result<&2, &2, E, Unit>)) -> @-report:(@_:K -> @_:E -> IO(Unit)) -> @-access:(@_:K -> 0x2f03974bdfacdfce4ef1eb030eae486d/notices.Access) -> @-done:(@_:0x6a946b742ab6f76f0ba5b90b14da52ad/completion.Completion<ApplicationReport<H>> -> IO(Unit)) -> @+config:K -> @+notice:0x2f03974bdfacdfce4ef1eb030eae486d/notices.Notice -> @application:ApplicationReport<H> -> @status:U32 -> @outcome:0x6a946b742ab6f76f0ba5b90b14da52ad/completion.Outcome -> IO(Unit)

template server.completed.report source · line 986 · raw

@-K:Data -> @-H:Data -> @-E:Data -> @-notify:(@_:K -> @_:Policy<H> -> @_:0x2f03974bdfacdfce4ef1eb030eae486d/notices.Notice -> IO(Result<&2, &2, E, Unit>)) -> @-report:(@_:K -> @_:E -> IO(Unit)) -> @-access:(@_:K -> 0x2f03974bdfacdfce4ef1eb030eae486d/notices.Access) -> @-done:(@_:0x6a946b742ab6f76f0ba5b90b14da52ad/completion.Completion<ApplicationReport<H>> -> IO(Unit)) -> @config:K -> @duration:0xe00bbf72c3ff9dc6d7b077524522b3a8/time.Duration -> @application:ApplicationReport<H> -> @+status:U32 -> @+outcome:0x6a946b742ab6f76f0ba5b90b14da52ad/completion.Outcome -> IO(Unit)

template server.completed source · line 1000 · raw

@-K:Data -> @-H:Data -> @-E:Data -> @-notify:(@_:K -> @_:Policy<H> -> @_:0x2f03974bdfacdfce4ef1eb030eae486d/notices.Notice -> IO(Result<&2, &2, E, Unit>)) -> @-report:(@_:K -> @_:E -> IO(Unit)) -> @-access:(@_:K -> 0x2f03974bdfacdfce4ef1eb030eae486d/notices.Access) -> @-done:(@_:0x6a946b742ab6f76f0ba5b90b14da52ad/completion.Completion<ApplicationReport<H>> -> IO(Unit)) -> @completion:0x6a946b742ab6f76f0ba5b90b14da52ad/completion.Completion<NoticePayload<K, H>> -> IO(Unit)

template server.response source · line 1011 · raw

@-K:Data -> @-H:Data -> @-done:(@_:0x6a946b742ab6f76f0ba5b90b14da52ad/completion.Completion<NoticePayload<K, H>> -> IO(Unit)) -> @config:K -> @started:0xe00bbf72c3ff9dc6d7b077524522b3a8/time.Duration -> @outcome:Outcome<Unit, ApplicationReport<H>> -> @+body:Chan(0x6a946b742ab6f76f0ba5b90b14da52ad/http.Body) -> @+response:Chan(0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res) -> IO(0x6a946b742ab6f76f0ba5b90b14da52ad/http.Reply)

template server.handle source · line 1032 · raw

@-A:Data -> @-S:Type -> @-K:Data -> @-H:Data -> @-done:(@_:0x6a946b742ab6f76f0ba5b90b14da52ad/completion.Completion<NoticePayload<K, H>> -> IO(Unit)) -> @context:ServingContext<A, S, K, H> -> @req:0x6a946b742ab6f76f0ba5b90b14da52ad/http.Req -> IO(0x6a946b742ab6f76f0ba5b90b14da52ad/http.Reply)

template server.started source · line 1049 · raw

@-A:Data -> @-S:Type -> @-K:Data -> @-H:Data -> @-work:(@_:S -> @_:Application<A, K, Policy<H>> -> @_:BufferedRequest -> IO(Pair(S, Result<&2, &2, Unit, ApplicationReport<H>>))) -> @-destroy:(@_:S -> IO(Unit)) -> @+context:Context<S, Application<A, K, Policy<H>>, BufferedRequest, Unit, ApplicationReport<H>> -> @room:U32 -> @capacity:Nat -> @started:Pair(List<&1, S>, Result<&2, &1, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.StartupError, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Server<ServingContext<A, S, K, H>>>) -> IO(Result<&2, &1, StartupError, Server<A, S, K, H>>)

template server.prepared source · line 1070 · raw

@-A:Data -> @-S:Type -> @-K:Data -> @-H:Data -> @-work:(@_:S -> @_:Application<A, K, Policy<H>> -> @_:BufferedRequest -> IO(Pair(S, Result<&2, &2, Unit, ApplicationReport<H>>))) -> @-destroy:(@_:S -> IO(Unit)) -> @app:Application<A, K, Policy<H>> -> @+config:0x6a946b742ab6f76f0ba5b90b14da52ad/http.ServerConfig -> @resources:Pair(List<&1, S>, Nat) -> IO(Result<&2, &1, StartupError, Server<A, S, K, H>>)

template server.valid source · line 1090 · raw

@-A:Data -> @-S:Type -> @-K:Data -> @-H:Data -> @-work:(@_:S -> @_:Application<A, K, Policy<H>> -> @_:BufferedRequest -> IO(Pair(S, Result<&2, &2, Unit, ApplicationReport<H>>))) -> @-destroy:(@_:S -> IO(Unit)) -> @valid:Bool -> @app:Application<A, K, Policy<H>> -> @config:0x6a946b742ab6f76f0ba5b90b14da52ad/http.ServerConfig -> @resources:List<&1, S> -> IO(Result<&2, &1, StartupError, Server<A, S, K, H>>)

template server.registered source · line 1102 · raw

@-A:Data -> @-S:Type -> @-K:Data -> @-H:Data -> @-work:(@_:S -> @_:Application<A, K, Policy<H>> -> @_:BufferedRequest -> IO(Pair(S, Result<&2, &2, Unit, ApplicationReport<H>>))) -> @-destroy:(@_:S -> IO(Unit)) -> @registration:Result<&2, &2, RegistrationError, Application<A, K, Policy<H>>> -> @+config:0x6a946b742ab6f76f0ba5b90b14da52ad/http.ServerConfig -> @resources:List<&1, S> -> IO(Result<&2, &1, StartupError, Server<A, S, K, H>>)

template server.start source · line 1115 · raw

@-A:Data -> @-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-before_hook:(@_:H -> @_:S -> @_:K -> @_:Metadata -> IO(Step<S, E>)) -> @-after_hook:(@_:H -> @_:S -> @_:K -> @_:0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res -> IO(Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>))) -> @-run:(@_:A -> @_:S -> @_:K -> @_:Match<Policy<H>> -> @_:0x6a946b742ab6f76f0ba5b90b14da52ad/http.Req -> IO(Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>))) -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>))) -> @-destroy:(@_:S -> IO(Unit)) -> @registration:Result<&2, &2, RegistrationError, Application<A, K, Policy<H>>> -> @config:0x6a946b742ab6f76f0ba5b90b14da52ad/http.ServerConfig -> @resources:List<&1, S> -> IO(Result<&2, &1, StartupError, Server<A, S, K, H>>)

template server.control.result source · line 1128 · raw

@-A:Data -> @-S:Type -> @-K:Data -> @-H:Data -> @controlled:Pair(0x6a946b742ab6f76f0ba5b90b14da52ad/http.Server<ServingContext<A, S, K, H>>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.ServerControl) -> @owner:Owner<S, Application<A, K, Policy<H>>, BufferedRequest, Unit, ApplicationReport<H>> -> Pair(Server<A, S, K, H>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.ServerControl)

template server.control source · line 1135 · raw

@-A:Data -> @-S:Type -> @-K:Data -> @-H:Data -> @server:Server<A, S, K, H> -> Pair(Server<A, S, K, H>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.ServerControl)

template server.observer.result source · line 1139 · raw

@-A:Data -> @-S:Type -> @-K:Data -> @-H:Data -> @observed:Pair(0x6a946b742ab6f76f0ba5b90b14da52ad/http.Server<ServingContext<A, S, K, H>>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.ServerStats) -> @owner:Owner<S, Application<A, K, Policy<H>>, BufferedRequest, Unit, ApplicationReport<H>> -> Pair(Server<A, S, K, H>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.ServerStats)

template server.observer source · line 1146 · raw

@-A:Data -> @-S:Type -> @-K:Data -> @-H:Data -> @server:Server<A, S, K, H> -> Pair(Server<A, S, K, H>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.ServerStats)

template server.dependencies source · line 1150 · raw

@-A:Data -> @-S:Type -> @-K:Data -> @-H:Data -> @server:Server<A, S, K, H> -> Pair(Server<A, S, K, H>, Context<S, Application<A, K, Policy<H>>, BufferedRequest, Unit, ApplicationReport<H>>)

template server.run source · line 1155 · raw

@-A:Data -> @-S:Type -> @-K:Data -> @-H:Data -> @-E:Data -> @-done:(@_:0x6a946b742ab6f76f0ba5b90b14da52ad/completion.Completion<ApplicationReport<H>> -> IO(Unit)) -> @-observe:(@_:U32 -> @_:0x6a946b742ab6f76f0ba5b90b14da52ad/completion.Outcome -> IO(Unit)) -> @-notify:(@_:K -> @_:Policy<H> -> @_:0x2f03974bdfacdfce4ef1eb030eae486d/notices.Notice -> IO(Result<&2, &2, E, Unit>)) -> @-report:(@_:K -> @_:E -> IO(Unit)) -> @-access:(@_:K -> 0x2f03974bdfacdfce4ef1eb030eae486d/notices.Access) -> @server:Server<A, S, K, H> -> IO(ServerExit<A, S, K, H>)

template server.close source · line 1173 · raw

@-A:Data -> @-S:Type -> @-K:Data -> @-H:Data -> @server:Server<A, S, K, H> -> IO(ServerExit<A, S, K, H>)

Without starting the run loop, the caller still explicitly drains transport and joins application cleanup. A stop request alone is never completion.

template serve.started source · line 1180 · raw

@-A:Data -> @-S:Type -> @-K:Data -> @-H:Data -> @-E:Data -> @-done:(@_:0x6a946b742ab6f76f0ba5b90b14da52ad/completion.Completion<ApplicationReport<H>> -> IO(Unit)) -> @-observe:(@_:U32 -> @_:0x6a946b742ab6f76f0ba5b90b14da52ad/completion.Outcome -> IO(Unit)) -> @-notify:(@_:K -> @_:Policy<H> -> @_:0x2f03974bdfacdfce4ef1eb030eae486d/notices.Notice -> IO(Result<&2, &2, E, Unit>)) -> @-report:(@_:K -> @_:E -> IO(Unit)) -> @-access:(@_:K -> 0x2f03974bdfacdfce4ef1eb030eae486d/notices.Access) -> @started:Result<&2, &1, StartupError, Server<A, S, K, H>> -> IO(Result<&2, &1, StartupError, ServerExit<A, S, K, H>>)

template serve source · line 1195 · raw

@-A:Data -> @-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-before_hook:(@_:H -> @_:S -> @_:K -> @_:Metadata -> IO(Step<S, E>)) -> @-after_hook:(@_:H -> @_:S -> @_:K -> @_:0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res -> IO(Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>))) -> @-run:(@_:A -> @_:S -> @_:K -> @_:Match<Policy<H>> -> @_:0x6a946b742ab6f76f0ba5b90b14da52ad/http.Req -> IO(Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>))) -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0x6a946b742ab6f76f0ba5b90b14da52ad/http.Res>))) -> @-destroy:(@_:S -> IO(Unit)) -> @-done:(@_:0x6a946b742ab6f76f0ba5b90b14da52ad/completion.Completion<ApplicationReport<H>> -> IO(Unit)) -> @-observe:(@_:U32 -> @_:0x6a946b742ab6f76f0ba5b90b14da52ad/completion.Outcome -> IO(Unit)) -> @-notify:(@_:K -> @_:Policy<H> -> @_:0x2f03974bdfacdfce4ef1eb030eae486d/notices.Notice -> IO(Result<&2, &2, E, Unit>)) -> @-report:(@_:K -> @_:E -> IO(Unit)) -> @-access:(@_:K -> 0x2f03974bdfacdfce4ef1eb030eae486d/notices.Access) -> @registration:Result<&2, &2, RegistrationError, Application<A, K, Policy<H>>> -> @config:0x6a946b742ab6f76f0ba5b90b14da52ad/http.ServerConfig -> @resources:List<&1, S> -> IO(Result<&2, &1, StartupError, ServerExit<A, S, K, H>>)

Owners that need readiness/control use server.start then server.run instead.

Unsafe

unsafe owner source · line 199 · raw

@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @-handler:(@_:R -> @_:P -> @_:I -> IO(Pair(R, Result<&2, &2, E, O>))) -> @-destroy:(@_:R -> IO(Unit)) -> @+messages:Chan(Message<R, P, I, E, O>) -> @+room:U32 -> @step:OwnerStep<R, P, I, E, O> -> IO(Unit)

Only idle close ends this loop. Busy close never waits on a stalled handler. @unsafe is solely the lifecycle receive loop, not a termination/proof claim.