Source/Packages

Data.Bytes

packages/foundation/standard/src/Data/Bytes.alpha

1,218 lines172 declarations47.4 KiBSHA-256 beded7f8a171

def · lines 519–561

dataBytesSliceIndex

Full file
519def dataBytesSliceIndex =
520  (lambda unrestricted slice : (family DataBytesSlice) . unrestricted index : Nat .
521    eliminate
522      DataBytesSlice
523      (lambda unrestricted current : (family DataBytesSlice) . family DataBytesIndexResult)
524      slice
525      (branch DataBytesSliceView suffix sliceLength .
526        app
527          (lambda unrestricted suffixLength : Nat .
528            nat-eliminate
529              (lambda unrestricted current : Nat . family DataBytesIndexResult)
530              (constructor
531                DataBytesIndexResult
532                DataBytesIndexFailed
533                (constructor DataBytesErrorCode DataBytesBuilderInvariantViolation)
534                (dataBytesTelemetry suffixLength dataBytesNaturalOne 0 0 0 0 0 suffixLength))
535              (lambda unrestricted validPredecessor : Nat .
536                unrestricted validInduction : (family DataBytesIndexResult) .
537                nat-eliminate
538                  (lambda unrestricted current : Nat . family DataBytesIndexResult)
539                  (constructor
540                    DataBytesIndexResult
541                    DataBytesIndexFailed
542                    (constructor DataBytesErrorCode DataBytesIndexOutOfRange)
543                    (dataBytesTelemetry sliceLength dataBytesNaturalOne 0 0 0 0 index sliceLength))
544                  (lambda unrestricted fitsPredecessor : Nat .
545                    unrestricted fitsInduction : (family DataBytesIndexResult) .
546                    constructor
547                      DataBytesIndexResult
548                      DataBytesIndexSucceeded
549                      (dataBytesByteAtValidated suffix index)
550                      (dataBytesTelemetry
551                        sliceLength
552                        dataBytesNaturalOne
553                        dataBytesNaturalOne
554                        0
555                        dataBytesNaturalOne
556                        0
557                        index
558                        sliceLength))
559                  (naturalLess index sliceLength))
560              (naturalLessOrEqual sliceLength suffixLength))
561          (bytes-length suffix)))

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.