Int8
8-bit signed integers with checked arithmetic
Most operations are available as built-in operators (e.g. 1 + 1
).
toInt
let toInt : Int8 -> Int
Conversion.
fromInt
let fromInt : Int -> Int8
Conversion. Traps on overflow/underflow.
fromIntWrap
let fromIntWrap : Int -> Int8
Conversion. Wraps on overflow/underflow.
fromNat8
let fromNat8 : Nat8 -> Int8
Conversion. Wraps on overflow/underflow.
toNat8
let toNat8 : Int8 -> Nat8
Conversion. Wraps on overflow/underflow.
toText
func toText(x : Int8) : Text
Returns the Text representation of x
.
bittest
func bittest(x : Int8, p : Nat) : Bool
Returns the value of bit p mod 8
in x
, (x & 2^(p mod 8)) == 2^(p mod 8)
.