Module

Data.Long

Package
purescript-longs
Repository
zapph/purescript-longs

#Long Source

#fromLowHighBits Source

fromLowHighBits :: Int -> Int -> Long

Creates a signed Long from low and high bits respresented as Int

#fromInt Source

fromInt :: Int -> Long

Creates a Long from an Int value

#fromString Source

fromString :: String -> Maybe Long

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

#fromStringAs Source

fromStringAs :: Radix -> String -> Maybe Long

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

#lowBits Source

lowBits :: Long -> Int

Get low bits of a Long as an Int

#highBits Source

highBits :: Long -> Int

Get high bits of a Long as an Int

#toInt Source

toInt :: Long -> Maybe Int

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

#toString Source

toString :: Long -> String

Like show, but omits the l suffix.

#toStringAs Source

toStringAs :: Radix -> Long -> String

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

#parity Source

parity :: Long -> Parity

Returns whether a Long is Even or Odd.

#even Source

even :: Long -> Boolean

Returns whether a Long is an even number.

#odd Source

odd :: Long -> Boolean

Returns whether a Long is an odd number.

#quot Source

quot :: Long -> Long -> Long

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 :: Long -> Long -> Long

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 :: Long -> Long Unsigned

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