def copy_written_success
bendtorch-core@0.1.0.0 · src/tensor/transform_PROOF.bend:1779
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
1779def copy_written_success(+input: Shape.Shape, +axes: List<&2, U32>, +plan: Layout.Plan<input, axes>,
1780 pair: Core.Tensor<Layout.output(input, axes, plan)> & Result<&2, &2, Core.Error, Unit>, -source: Core.Tensor<input>,
1781 -successful: {Totality.write_succeeded(Layout.output(input, axes, plan), pair) == True{} : Bool}) ->
1782 Totality.CopySuccess<input, axes, plan,
1783 Transforms.copy_written(input, axes, plan, source => target => (source, Done{target}), source, pair)>:
1784 (target, result) = pair
1785 match result:
1786 case Fail{error}:
1787 Totality.CopySuccess{Empty.absurd({False{} == True{} : Bool}, Arith.clash(successful))}
1788 case Done{unit}:
1789 Totality.CopySuccess{{==}}