def fallible_checked
bendvy-ecs-core@0.1.0.3 · decode_construction.bend:41
import bendvy-ecs-core@0.1.0.3/decode_construction.bend as DecodeConstruction
import Base
import decode_data.bend as D
import bundle_construction.bend as Build
41def fallible_checked(~I:Type,~P:Type,~Custom:Data,~build:I -> D.Raw -> Build.Construction<I,P,Custom>,receipt:D.Receipt<I>) -> Build.Construction<I,P,Error<Custom>>:
42 match receipt:
43 case D.Receipt{owner,D.Rejected{error}}:Build.Invalid{owner,Validation{error}}
44 case D.Receipt{owner,D.Accepted{canonical}}:custom_result(~I,~P,~Custom,build(owner,canonical))