Source/Packages

Std.Word

packages/foundation/standard/src/Std/Word.alpha

1,783 lines192 declarations64.2 KiBSHA-256 27bf8c3f30ee

def · lines 1412–1423

stdU16ToU32

Full file
U16 divides as U32 (zero-extend, divide, keep the low bytes: both results are bounded by the operands, so the narrow never drops a set bit).
1412def stdU16ToU32 =
1413  (lambda unrestricted value : (family StdU16) .
1414    (eliminate
1415      StdU16
1416      (lambda unrestricted current : (family StdU16) . (family ModelWord32))
1417      value
1418      (branch
1419        StdU16Of
1420        low
1421        high
1422        .
1423        (constructor ModelWord32 ModelWord32Value low high (byte 0) (byte 0)))))

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.