def OverflowingAdd.flag

bend-collections-laws-math@1.0.0.0 · spec/math/fixed.bend:149

import bend-collections-laws-math@1.0.0.0/spec/math/fixed.bend as Fixed
import Base
import bend-collections-laws-math@1.0.0.0/spec/lib/common.bend as C
import bend-collections-laws-math@1.0.0.0/src/math/fixed.bend as F

149def OverflowingAdd.flag(~T: Data, ~val: T -> Nat, ~f: @+x: T -> @+y: T -> F.Over<T>, +w: Nat, +a: T, +b: T) -> Type:
150  {ov_flag(T, f(a, b)) == Bool.not(C.fits(w, Nat.add(val(a), val(b)))) : Bool}

Uses (7)

Used by (4)