~/bend-docscommunity

camber.bend relies on unsafe/foreign

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

Fixed prepared HTTP applications and bounded affine dependency bundles.

12 imports
import Base
import bend-kit-http@0.40.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.7.3.0/json.bend as Json
import ./response.bend as Response
import ./input.bend as Input
import bend-kit-http@0.40.0.0/completion.bend as TransportCompletion
import ./notices.bend as Notices
import bend-kit-time@0.3.0.1/time.bend as Time
import ./ledger.bend as Book
import bend-kit-bytes@0.3.3.1/bytes.bend as Bytes

Types

type ResponseError source · line 15 · raw

Data

type Counts source · line 53 · raw

Data

type Outcome source · line 56 · raw

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

type CloseResult source · line 62 · raw

Data

type Message source · line 66 · raw

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

type Context source · line 74 · 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 78 · 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 81 · raw

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

type OwnerStep source · line 198 · raw

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

type Group source · line 415 · 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 418 · raw

@-P:Data -> Data

type Route source · line 421 · raw

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

type Endpoint source · line 424 · raw

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

type Application source · line 427 · raw

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

type RegistrationError source · line 430 · raw

Data

type Match source · line 434 · raw

@-P:Data -> Data

type Policy source · line 570 · raw

@-H:Data -> Data

type Metadata source · line 576 · raw

Data

type Error source · line 579 · raw

@-E:Data -> Data

type Step source · line 607 · raw

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

type Completion source · line 612 · raw

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

type BufferedRequest source · line 933 · 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 936 · raw

@-H:Data -> Data

type ServingContext source · line 940 · raw

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

type Server source · line 944 · raw

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

type StartupError source · line 948 · raw

Data

type ServerExit source · line 953 · raw

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

type NoticePayload source · line 991 · raw

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

Definitions

def validate.checked source · line 19 · raw

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

def validate source · line 26 · raw

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

def text source · line 34 · raw

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

def raw source · line 37 · raw

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

def empty source · line 40 · raw

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

def redirect.checked source · line 43 · raw

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

def redirect source · line 50 · raw

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

def owner.context source · line 85 · 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 91 · raw

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

def ledger.snapshot source · line 183 · raw

@counted:Pair(0xcb57e61ee8342688c3d0222ac6da222d/ledger.Counts, 0xcb57e61ee8342688c3d0222ac6da222d/ledger.Ledger) -> Pair(Counts, 0xcb57e61ee8342688c3d0222ac6da222d/ledger.Ledger)

def ledger.counts source · line 188 · raw

@ledger:0xcb57e61ee8342688c3d0222ac6da222d/ledger.Ledger -> Pair(Counts, 0xcb57e61ee8342688c3d0222ac6da222d/ledger.Ledger)

def ledger.must source · line 191 · raw

@booked:Maybe<&1, 0xcb57e61ee8342688c3d0222ac6da222d/ledger.Ledger> -> @text:String -> IO(0xcb57e61ee8342688c3d0222ac6da222d/ledger.Ledger)

def receive.value source · line 205 · 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 212 · raw

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

def submit source · line 317 · 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 325 · 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 337 · 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 346 · raw

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

def inspect.sent source · line 353 · raw

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

def inspect source · line 365 · 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 373 · raw

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

def close.join source · line 385 · 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 393 · 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 404 · 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 437 · raw

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

def minimal source · line 616 · raw

0x354b3c2ee5a660bddb313748129f568d/http.Res

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

def problem.allow source · line 619 · raw

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

def problem.response source · line 624 · raw

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

def problem source · line 628 · raw

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

def metadata.authority source · line 837 · raw

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

def server.config source · line 956 · raw

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

Templates

template json source · line 31 · raw

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

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

template dispose source · line 98 · raw

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

template drain.message source · line 109 · 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 128 · 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 137 · 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 149 · 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 158 · 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 171 · 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 269 · 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 281 · 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 292 · 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 308 · 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 446 · raw

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

template group.find source · line 453 · raw

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

template group.checked source · line 460 · raw

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

template group.policy source · line 467 · raw

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

template groups.policies source · line 474 · 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 484 · raw

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

template groups.valid source · line 491 · raw

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

template routes.policies source · line 499 · 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 506 · 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 516 · 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 527 · raw

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

template groups.prepared source · line 532 · raw

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

template application.table source · line 539 · 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 546 · 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 557 · 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 560 · raw

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

template plain source · line 565 · raw

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

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

template policy source · line 573 · raw

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

template input source · line 585 · 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 590 · raw

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

template execute source · line 600 · raw

@-I:Type -> @-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-decoder:(@_:K -> @_:Match<Policy<H>> -> @_:0x354b3c2ee5a660bddb313748129f568d/http.Req -> Result<&2, &1, Error<E>, I>) -> @-handler:(@_:S -> @_:K -> @_:I -> IO(Pair(S, Result<&2, &1, Error<E>, 0x354b3c2ee5a660bddb313748129f568d/http.Res>))) -> @state:S -> @+config:K -> @selected:Match<Policy<H>> -> @req:0x354b3c2ee5a660bddb313748129f568d/http.Req -> IO(Pair(S, Result<&2, &1, Error<E>, 0x354b3c2ee5a660bddb313748129f568d/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 631 · raw

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

template default.mapper source · line 648 · raw

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

template mapped.checked source · line 651 · raw

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

template mapped.result source · line 658 · raw

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

template failed source · line 666 · raw

@-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0x354b3c2ee5a660bddb313748129f568d/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 678 · raw

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

template before.next source · line 689 · raw

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

template before source · line 698 · 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 710 · raw

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

template transforms source · line 721 · raw

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

template entered.step source · line 739 · raw

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

template scopes source · line 751 · raw

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

template finish.checked source · line 768 · raw

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

template finish source · line 778 · raw

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

template policies.tail source · line 785 · raw

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

template endpoint source · line 793 · raw

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

template framework source · line 803 · raw

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

template choice source · line 813 · 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 -> @_:0x354b3c2ee5a660bddb313748129f568d/http.Res -> IO(Pair(S, Result<&2, &1, Error<E>, 0x354b3c2ee5a660bddb313748129f568d/http.Res>))) -> @-run:(@_:A -> @_:S -> @_:K -> @_:Match<Policy<H>> -> @_:0x354b3c2ee5a660bddb313748129f568d/http.Req -> IO(Pair(S, Result<&2, &1, Error<E>, 0x354b3c2ee5a660bddb313748129f568d/http.Res>))) -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0x354b3c2ee5a660bddb313748129f568d/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:0x354b3c2ee5a660bddb313748129f568d/http.Body -> IO(Completion<S, H>)

template resolved source · line 845 · 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 -> @_:0x354b3c2ee5a660bddb313748129f568d/http.Res -> IO(Pair(S, Result<&2, &1, Error<E>, 0x354b3c2ee5a660bddb313748129f568d/http.Res>))) -> @-run:(@_:A -> @_:S -> @_:K -> @_:Match<Policy<H>> -> @_:0x354b3c2ee5a660bddb313748129f568d/http.Req -> IO(Pair(S, Result<&2, &1, Error<E>, 0x354b3c2ee5a660bddb313748129f568d/http.Res>))) -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0x354b3c2ee5a660bddb313748129f568d/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:0x354b3c2ee5a660bddb313748129f568d/http.Body -> IO(Completion<S, H>)

template dispatch.application source · line 860 · 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 -> @_:0x354b3c2ee5a660bddb313748129f568d/http.Res -> IO(Pair(S, Result<&2, &1, Error<E>, 0x354b3c2ee5a660bddb313748129f568d/http.Res>))) -> @-run:(@_:A -> @_:S -> @_:K -> @_:Match<Policy<H>> -> @_:0x354b3c2ee5a660bddb313748129f568d/http.Req -> IO(Pair(S, Result<&2, &1, Error<E>, 0x354b3c2ee5a660bddb313748129f568d/http.Res>))) -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0x354b3c2ee5a660bddb313748129f568d/http.Res>))) -> @app:Application<A, K, Policy<H>> -> @state:S -> @req:0x354b3c2ee5a660bddb313748129f568d/http.Req -> IO(Completion<S, H>)

template access.disabled source · line 876 · raw

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

template notice.ignore source · line 879 · raw

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

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

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

template notice.result source · line 885 · raw

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

template notices source · line 890 · raw

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

template dispatch.completed source · line 903 · raw

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

template dispatch source · line 917 · 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 -> @_:0x354b3c2ee5a660bddb313748129f568d/http.Res -> IO(Pair(S, Result<&2, &1, Error<E>, 0x354b3c2ee5a660bddb313748129f568d/http.Res>))) -> @-run:(@_:A -> @_:S -> @_:K -> @_:Match<Policy<H>> -> @_:0x354b3c2ee5a660bddb313748129f568d/http.Req -> IO(Pair(S, Result<&2, &1, Error<E>, 0x354b3c2ee5a660bddb313748129f568d/http.Res>))) -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0x354b3c2ee5a660bddb313748129f568d/http.Res>))) -> @-notify:(@_:N -> @_:Policy<H> -> @_:0xcb57e61ee8342688c3d0222ac6da222d/notices.Notice -> IO(Result<&2, &2, E, Unit>)) -> @-report:(@_:N -> @_:E -> IO(Unit)) -> @observer:N -> @access:0xcb57e61ee8342688c3d0222ac6da222d/notices.Access -> @app:Application<A, K, Policy<H>> -> @state:S -> @req:0x354b3c2ee5a660bddb313748129f568d/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 959 · raw

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

template server.bundles source · line 963 · raw

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

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

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

template server.work source · line 977 · 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 -> @_:0x354b3c2ee5a660bddb313748129f568d/http.Res -> IO(Pair(S, Result<&2, &1, Error<E>, 0x354b3c2ee5a660bddb313748129f568d/http.Res>))) -> @-run:(@_:A -> @_:S -> @_:K -> @_:Match<Policy<H>> -> @_:0x354b3c2ee5a660bddb313748129f568d/http.Req -> IO(Pair(S, Result<&2, &1, Error<E>, 0x354b3c2ee5a660bddb313748129f568d/http.Res>))) -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0x354b3c2ee5a660bddb313748129f568d/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 994 · raw

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

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

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

template server.completed source · line 1026 · raw

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

template server.response source · line 1037 · raw

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

template server.handle source · line 1058 · raw

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

template server.started source · line 1075 · 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, 0x354b3c2ee5a660bddb313748129f568d/http.StartupError, 0x354b3c2ee5a660bddb313748129f568d/http.Server<ServingContext<A, S, K, H>>>) -> IO(Result<&2, &1, StartupError, Server<A, S, K, H>>)

template server.prepared source · line 1096 · 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:0x354b3c2ee5a660bddb313748129f568d/http.ServerConfig -> @resources:Pair(List<&1, S>, Nat) -> IO(Result<&2, &1, StartupError, Server<A, S, K, H>>)

template server.valid source · line 1116 · 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:0x354b3c2ee5a660bddb313748129f568d/http.ServerConfig -> @resources:List<&1, S> -> IO(Result<&2, &1, StartupError, Server<A, S, K, H>>)

template server.registered source · line 1128 · 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:0x354b3c2ee5a660bddb313748129f568d/http.ServerConfig -> @resources:List<&1, S> -> IO(Result<&2, &1, StartupError, Server<A, S, K, H>>)

template server.start source · line 1141 · 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 -> @_:0x354b3c2ee5a660bddb313748129f568d/http.Res -> IO(Pair(S, Result<&2, &1, Error<E>, 0x354b3c2ee5a660bddb313748129f568d/http.Res>))) -> @-run:(@_:A -> @_:S -> @_:K -> @_:Match<Policy<H>> -> @_:0x354b3c2ee5a660bddb313748129f568d/http.Req -> IO(Pair(S, Result<&2, &1, Error<E>, 0x354b3c2ee5a660bddb313748129f568d/http.Res>))) -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0x354b3c2ee5a660bddb313748129f568d/http.Res>))) -> @-destroy:(@_:S -> IO(Unit)) -> @registration:Result<&2, &2, RegistrationError, Application<A, K, Policy<H>>> -> @config:0x354b3c2ee5a660bddb313748129f568d/http.ServerConfig -> @resources:List<&1, S> -> IO(Result<&2, &1, StartupError, Server<A, S, K, H>>)

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

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

template server.control source · line 1161 · raw

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

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

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

template server.observer source · line 1172 · raw

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

template server.dependencies source · line 1176 · 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 1181 · raw

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

template server.close source · line 1199 · 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 1206 · raw

@-A:Data -> @-S:Type -> @-K:Data -> @-H:Data -> @-E:Data -> @-done:(@_:0x354b3c2ee5a660bddb313748129f568d/completion.Completion<ApplicationReport<H>> -> IO(Unit)) -> @-observe:(@_:U32 -> @_:0x354b3c2ee5a660bddb313748129f568d/completion.Outcome -> IO(Unit)) -> @-notify:(@_:K -> @_:Policy<H> -> @_:0xcb57e61ee8342688c3d0222ac6da222d/notices.Notice -> IO(Result<&2, &2, E, Unit>)) -> @-report:(@_:K -> @_:E -> IO(Unit)) -> @-access:(@_:K -> 0xcb57e61ee8342688c3d0222ac6da222d/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 1221 · 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 -> @_:0x354b3c2ee5a660bddb313748129f568d/http.Res -> IO(Pair(S, Result<&2, &1, Error<E>, 0x354b3c2ee5a660bddb313748129f568d/http.Res>))) -> @-run:(@_:A -> @_:S -> @_:K -> @_:Match<Policy<H>> -> @_:0x354b3c2ee5a660bddb313748129f568d/http.Req -> IO(Pair(S, Result<&2, &1, Error<E>, 0x354b3c2ee5a660bddb313748129f568d/http.Res>))) -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0x354b3c2ee5a660bddb313748129f568d/http.Res>))) -> @-destroy:(@_:S -> IO(Unit)) -> @-done:(@_:0x354b3c2ee5a660bddb313748129f568d/completion.Completion<ApplicationReport<H>> -> IO(Unit)) -> @-observe:(@_:U32 -> @_:0x354b3c2ee5a660bddb313748129f568d/completion.Outcome -> IO(Unit)) -> @-notify:(@_:K -> @_:Policy<H> -> @_:0xcb57e61ee8342688c3d0222ac6da222d/notices.Notice -> IO(Result<&2, &2, E, Unit>)) -> @-report:(@_:K -> @_:E -> IO(Unit)) -> @-access:(@_:K -> 0xcb57e61ee8342688c3d0222ac6da222d/notices.Access) -> @registration:Result<&2, &2, RegistrationError, Application<A, K, Policy<H>>> -> @config:0x354b3c2ee5a660bddb313748129f568d/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 219 · 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.