Module

Data.Int64

Package
purescript-int64
Repository
purescript-contrib/purescript-int64

Signed 2’s-complement 64-bit integers.

#fromLowHighBits Source

fromLowHighBits :: Int -> Int -> Int64

Creates an Int64 from low and high bits represented as Int.

#fromInt Source

fromInt :: Int -> Int64

Creates an Int64 from an Int value.

#fromNumber Source

fromNumber :: Number -> Maybe Int64

Creates an Int64 from a Number value. The number must already be an integer and fall within the valid range of values for the Int64 type otherwise Nothing is returned.

#fromString Source

fromString :: String -> Maybe Int64

Reads an Int64 from a String value. The number must parse as an integer and fall within the valid range of values for the Int64 type, otherwise Nothing is returned.

#fromStringAs Source

fromStringAs :: Radix -> String -> Maybe Int64

Like fromString, but the integer can be specified in a different base.

#lowBits Source

lowBits :: Int64 -> Int

Get the low (least significant) bits of an Int64 as an Int.

#highBits Source

highBits :: Int64 -> Int

Get the high (most significant) bits of an Int64 as an Int.

#toInt Source

toInt :: Int64 -> Maybe Int

Creates an Int if the Int64 value is within the range of Int64.

#toNumber Source

toNumber :: Int64 -> Number

Creates a Number value from a Int64. Values not within Number.MIN_SAFE_INTEGER and Number.MAX_SAFE_INTEGER will lose precision.

#toString Source

toString :: Int64 -> String

Like show, but omits the l suffix.

#toStringAs Source

toStringAs :: Radix -> Int64 -> String

Like toStringAs, but the integer can be specified in a different base.

#parity Source

parity :: Int64 -> Parity

Returns whether a Int64 is Even or Odd.

#even Source

even :: Int64 -> Boolean

Returns whether a Int64 is an even number.

#odd Source

odd :: Int64 -> Boolean

Returns whether a Int64 is an odd number.

#quot Source

quot :: Int64 -> Int64 -> Int64

The quot function provides truncating long division (see the documentation for the EuclideanRing class). It is identical to div in the EuclideanRing Int instance if the dividend is positive, but will be slightly different if the dividend is negative.

#rem Source

rem :: Int64 -> Int64 -> Int64

The rem function provides the remainder after truncating long division (see the documentation for the EuclideanRing class). It is identical to mod in the EuclideanRing Int instance if the dividend is positive, but will be slightly different if the dividend is negative.

#toUnsigned Source

toUnsigned :: Int64 -> UInt64

Converts to a UInt64 by reading the bits as a 64 bit unsigned integer.

#and Source

and :: Int64 -> Int64 -> Int64

Bitwise AND.

#(.&.) Source

Operator alias for Data.Int64.and (left-associative / precedence 10)

#or Source

or :: Int64 -> Int64 -> Int64

Bitwise OR.

#(.|.) Source

Operator alias for Data.Int64.or (left-associative / precedence 10)

#xor Source

xor :: Int64 -> Int64 -> Int64

Bitwise XOR.

#(.^.) Source

Operator alias for Data.Int64.xor (left-associative / precedence 10)

#shl Source

shl :: Int64 -> Int64 -> Int64

Bitwise shift left.

#shr Source

shr :: Int64 -> Int64 -> Int64

Bitwise shift right.

#zshr Source

zshr :: Int64 -> Int64 -> Int64

Bitwise zero-fill shift right.

#complement Source

complement :: Int64 -> Int64

Bitwise NOT.

Re-exports from Data.Int64.Internal

#Int64 Source

type Int64 = Long' Signed

Signed two’s-complement 64-bit integer.