def loop_pair_success
bendtorch-core@0.1.0.0 · src/tensor/transform_PROOF.bend:1890
import bendtorch-core@0.1.0.0/src/tensor/transform_PROOF.bend as TransformPROOF
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
import bendtorch-core@0.1.0.0/src/tensor/layout.bend as Layout
import bendtorch-core@0.1.0.0/src/tensor/core.bend as Core
import bendtorch-core@0.1.0.0/src/tensor/transforms.bend as Transforms
import bendtorch-core@0.1.0.0/src/storage/arith.bend as Arith
import bendtorch-core@0.1.0.0/src/tensor/transform_totality.bend as Totality
1890def loop_pair_success(+fuel: Nat, +input: Shape.Shape, +axes: List<&2, U32>, +plan: Layout.Plan<input, axes>, +cursor: Nat,
1891 pair: Core.Tensor<input> & Result<&2, &1, Transforms.Error, Core.Tensor<Layout.output(input, axes, plan)>>,
1892 -successful: {Totality.copy_succeeded(input, axes, plan, pair) == True{} : Bool},
1893 rec: @source: Core.Tensor<input> -> @target: Core.Tensor<Layout.output(input, axes, plan)> ->
1894 Totality.CopySuccess<input, axes, plan, Transforms.copy_loop(fuel, input, axes, plan, source, target, cursor)>) ->
1895 Totality.CopySuccess<input, axes, plan, Transforms.copy_next(input, axes, plan,
1896 source => target => Transforms.copy_loop(fuel, input, axes, plan, source, target, cursor), pair)>:
1897 (source, result) = pair
1898 match result:
1899 case Fail{error}:
1900 Totality.CopySuccess{Empty.absurd({False{} == True{} : Bool}, Arith.clash(successful))}
1901 case Done{target}:
1902 rec(source)(target)