Scalar array inputs #
Parsers over the elements of the arrays of
lean4-scalar-arrays: HasPos instances for
their slice iterators, and a runner named after each array type, such as parseUInt8Array for
UInt8Array. A runner also takes a slice of the array; an array coerces to a slice of all its
elements. Positions are indices in the underlying array, not in the slice. Parser.parseSlice
remains the runner for String.Slice.
These arrays are named UInt8Array and Float64Array because core has ByteArray and
FloatArray. parseFloatArray uses the same iterator as parseFloat64Array, so a parser for one
runs on the other. parseByteArray uses ByteIterator instead, so only a parser that is
polymorphic in the iterator runs on both it and parseUInt8Array.
Positions are indices in the underlying array.
Equations
- ParseIt.instHasPosSliceIteratorUInt8 = { Pos := Nat, pos := fun (it : Std.Iter UInt8) => it.toUInt8Slice.start }
Positions are indices in the underlying array.
Equations
- ParseIt.instHasPosSliceIteratorUInt16 = { Pos := Nat, pos := fun (it : Std.Iter UInt16) => it.toUInt16Slice.start }
Positions are indices in the underlying array.
Equations
- ParseIt.instHasPosSliceIteratorUInt32 = { Pos := Nat, pos := fun (it : Std.Iter UInt32) => it.toUInt32Slice.start }
Positions are indices in the underlying array.
Equations
- ParseIt.instHasPosSliceIteratorUInt64 = { Pos := Nat, pos := fun (it : Std.Iter UInt64) => it.toUInt64Slice.start }
Positions are indices in the underlying array.
Equations
- ParseIt.instHasPosSliceIteratorUSize = { Pos := Nat, pos := fun (it : Std.Iter USize) => it.toUSizeSlice.start }
Positions are indices in the underlying array.
Equations
- ParseIt.instHasPosSliceIteratorInt8 = { Pos := Nat, pos := fun (it : Std.Iter Int8) => it.toInt8Slice.start }
Positions are indices in the underlying array.
Equations
- ParseIt.instHasPosSliceIteratorInt16 = { Pos := Nat, pos := fun (it : Std.Iter Int16) => it.toInt16Slice.start }
Positions are indices in the underlying array.
Equations
- ParseIt.instHasPosSliceIteratorInt32 = { Pos := Nat, pos := fun (it : Std.Iter Int32) => it.toInt32Slice.start }
Positions are indices in the underlying array.
Equations
- ParseIt.instHasPosSliceIteratorInt64 = { Pos := Nat, pos := fun (it : Std.Iter Int64) => it.toInt64Slice.start }
Positions are indices in the underlying array.
Equations
- ParseIt.instHasPosSliceIteratorISize = { Pos := Nat, pos := fun (it : Std.Iter ISize) => it.toISizeSlice.start }
Positions are indices in the underlying array.
Equations
- ParseIt.instHasPosSliceIteratorFloat32 = { Pos := Nat, pos := fun (it : Std.Iter Float32) => it.toFloat32Slice.start }
Positions are indices in the underlying array.
Equations
- ParseIt.instHasPosSliceIteratorFloat = { Pos := Nat, pos := fun (it : Std.Iter Float) => it.toFloatSlice.start }
Run p on the elements of s, an array or a slice of one. Positions are indices in the
array.
Equations
- p.parseUInt8Array s = p.parse (Std.Slice.iter s)
Instances For
Run p on the elements of s, an array or a slice of one. Positions are indices in the
array.
Equations
- p.parseUInt16Array s = p.parse (Std.Slice.iter s)
Instances For
Run p on the elements of s, an array or a slice of one. Positions are indices in the
array.
Equations
- p.parseUInt32Array s = p.parse (Std.Slice.iter s)
Instances For
Run p on the elements of s, an array or a slice of one. Positions are indices in the
array.
Equations
- p.parseUInt64Array s = p.parse (Std.Slice.iter s)
Instances For
Run p on the elements of s, an array or a slice of one. Positions are indices in the
array.
Equations
- p.parseUSizeArray s = p.parse (Std.Slice.iter s)
Instances For
Run p on the elements of s, an array or a slice of one. Positions are indices in the
array.
Equations
- p.parseInt8Array s = p.parse (Std.Slice.iter s)
Instances For
Run p on the elements of s, an array or a slice of one. Positions are indices in the
array.
Equations
- p.parseInt16Array s = p.parse (Std.Slice.iter s)
Instances For
Run p on the elements of s, an array or a slice of one. Positions are indices in the
array.
Equations
- p.parseInt32Array s = p.parse (Std.Slice.iter s)
Instances For
Run p on the elements of s, an array or a slice of one. Positions are indices in the
array.
Equations
- p.parseInt64Array s = p.parse (Std.Slice.iter s)
Instances For
Run p on the elements of s, an array or a slice of one. Positions are indices in the
array.
Equations
- p.parseISizeArray s = p.parse (Std.Slice.iter s)
Instances For
Run p on the elements of s, an array or a slice of one. Positions are indices in the
array.
Equations
- p.parseFloat32Array s = p.parse (Std.Slice.iter s)
Instances For
Run p on the elements of s, an array or a slice of one. Positions are indices in the
array.
Equations
- p.parseFloat64Array s = p.parse (Std.Slice.iter s)
Instances For
Run p on the elements of xs. Positions are array indices.
Equations
- p.parseFloatArray xs = p.parse xs.toFloat64Array.iter