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.qualifiedIntrinsicWasm.Int64.*); on the JS backends to Wasm/Int64.js (BigInt). Int64 is an opaque first-order type.

#Int64 Source

data Int64

#fromInt Source

#fromHiLo Source

fromHiLo :: Int -> Int -> Int64

Build 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.

#lowBits Source

#hiBits Source

#complement Source

#shl Source

shl :: Int64 -> Int -> Int64

#shr Source

shr :: Int64 -> Int -> Int64

#zshr Source

zshr :: Int64 -> Int -> Int64

#rotl Source

rotl :: Int64 -> Int -> Int64

#rotr Source

rotr :: Int64 -> Int -> Int64