Source/Packages

Std.Byte

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

108 lines19 declarations3.5 KiBSHA-256 bd71181271d6

def · lines 84–108

byteAddWithCarry

Full file
84def byteAddWithCarry =
85  (lambda unrestricted left : Byte . unrestricted right : Byte . unrestricted carry : Nat .
86    eliminate
87      ByteAddResult
88      (lambda unrestricted current : (family ByteAddResult) . family ByteAddResult)
89      (byteAdd left right)
90      (branch
91        ByteAddResultValue
92        firstLow
93        firstCarry
94        .
95        eliminate
96          ByteAddResult
97          (lambda unrestricted current : (family ByteAddResult) . family ByteAddResult)
98          (byteAdd firstLow (nat-to-byte carry))
99          (branch
100            ByteAddResultValue
101            secondLow
102            secondCarry
103            .
104            constructor
105              ByteAddResult
106              ByteAddResultValue
107              secondLow
108              (naturalAdd firstCarry secondCarry))))

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.