Module
Wasm.Int64
- Package
- purescript-wasm-base
- Repository
- purs-wasm/purescript-wasm-base
WasmBase Wasm.Int64: native 64-bit integer primitives. On wasm these resolve
to i64.* intrinsics (Intrinsics.qualifiedIntrinsic — Wasm.Int64.*); on the
JS backends to Wasm/Int64.js (BigInt). Int64 is an opaque first-order type.
#fromHiLo Source
fromHiLo :: Int -> Int -> Int64Build a 64-bit value from its high and low 32-bit words, each zero-extended:
(hi << 32) | (lo & 0xffffffff). The words are taken as 32-bit patterns, so a
word whose top bit is set is a negative Int (Int is 32-bit, max 0x7fffffff,
so 0x80000000 is -2147483648). Unlike fromInt, the low word does not
sign-extend into the high half: fromHiLo 0 (-1) is 0x00000000ffffffff, not
0xffffffffffffffff, so full-width constants whose low word has its top bit set
are expressible directly.
#complement Source
complement :: Int64 -> Int64