def serve.stream.abort
import bend-kit-http@0.38.2.0/http.bend as Httpimport Base
6636# The application consumes its real affine state on unsuccessful upload paths.
6637# An abort that does not return remains admitted work, not a fabricated drain.
6638def serve.stream.abort(~S: Type, ~abort: S -> StreamAbort -> IO(Unit),
6639 reason: StreamAbort, state: Maybe<&1, S & Bool>) -> IO(Unit):
6640 match state:
6641 case None{}: IO.pure(Unit, Unit{})
6642 case Some{pair}:
6643 (value, dropped) = pair
6644 abort(value, reason)