~/bend-docscommunity

signed.bend checks

raw source on the hub · import element-ints@0.1.0.0/signed.bend as Signed

1 import
import Base

Definitions

def bias source · line 8 · raw

@+v:U32 -> U32

def s_ge source · line 16 · raw

@+a:U32 -> @+b:U32 -> Bool

The comparison is annotated : U32, and from Bend 2.0.21 a name inside that annotation is looked for in the U32 namespace first — so a bare bias(a) there resolves to U32.bias, which does not exist. Binding the values first keeps them in this module's scope, and compiles on every version. See wiki/docs/upgrading-bend.md.

def s_lt source · line 21 · raw

@+a:U32 -> @+b:U32 -> Bool

def s_le source · line 26 · raw

@+a:U32 -> @+b:U32 -> Bool

def s_gt source · line 31 · raw

@+a:U32 -> @+b:U32 -> Bool

def is_neg source · line 36 · raw

@+v:U32 -> Bool

def show_i source · line 39 · raw

@+v:U32 -> String