Curried Tensor and Reference Arguments #
Convert between shape-indexed packs and curried arguments for tensors or any reference family.
Type of a curried function accepting one tensor argument per shape in ss.
For example, Fn α [s₁, s₂] β is Tensor α s₁ → Tensor α s₂ → β.
Instances For
Convert a function on tensor-pack inputs into its curried form.
Instances For
Convert a curried function into a function on tensor-pack inputs.
Instances For
A pack of references indexed by their shapes, analogous to TensorPack.
- nil {Ref : Spec.Shape → Type} : RefList Ref []
- cons {Ref : Spec.Shape → Type} {s : Spec.Shape} {ss : List Spec.Shape} : Ref s → RefList Ref ss → RefList Ref (s :: ss)
Instances For
Append two RefLists.
Instances For
Split a RefList Ref (ss₁ ++ ss₂) into its left and right parts.
Instances For
Split a RefList Ref (ss ++ [τ]) into its prefix and last element.
Instances For
Splitting concatenated references recovers the original state blocks.
The final reference remains separate from the preceding model state.
Reassembling the two state blocks restores every original reference.
Reassociating state blocks changes only their shape-list witness, not their references.
A curried function accepting one Ref s argument per shape in ss.
Instances For
Uncurry a curried reference function to accept a RefList.
Instances For
Curry a reference function that consumes a RefList.
Instances For
Binding the curried arguments preserves the complete reference-list computation.
Apply a tensor-valued CurriedRef to its shape-indexed tensor pack.