Bounded indices (Language Platform PRD §28.2 Numerics, LP-801).
`StdFin n` is a natural strictly below `n`, carried in the TYPE. An index
that cannot exist cannot be built, so an out-of-range access is not a
runtime error to handle: it is a program the checker rejects. The bound is
erased, so nothing here costs anything at runtime.
12family StdFin : Type 0
13index erased stdFinBound : Nat
14constructor StdFinZero
15field erased stdFinZeroBound : Nat
16result (succ stdFinZeroBound)
17constructor StdFinNext
18field erased stdFinNextBound : Nat
19recursive unrestricted stdFinNextPredecessor
20recursive-index stdFinNextBound
21result (succ stdFinNextBound)The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.