Source/Packages

Model.Word32

packages/foundation/standard/src/Model/Word32.alpha

400 lines41 declarations16.0 KiBSHA-256 cb521ab16bb6

def · lines 156–170

modelWord32ToNatural

Full file
156def modelWord32ToNatural =
157  (lambda unrestricted value : (family ModelWord32) .
158    eliminate
159      ModelWord32
160      (lambda unrestricted current : (family ModelWord32) . Nat)
161      value
162      (branch ModelWord32Value b0 b1 b2 b3 .
163        then (naturalAdd (byte-to-nat b0))
164          (naturalMultiply byteNaturalTwoHundredFiftySix)
165          (naturalAdd (byte-to-nat b1))
166          (naturalMultiply byteNaturalTwoHundredFiftySix)
167          (naturalAdd (byte-to-nat b2))
168          (naturalMultiply byteNaturalTwoHundredFiftySix)
169          byte-to-nat
170          b3))

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.