Data.Long.FFI
- Package
- purescript-longs
- Repository
- zapph/purescript-longs
#IsLittleEndian Source
#maxUnsignedValue Source
maxUnsignedValue :: Long
Maximum unsigned value
#fromBytes Source
fromBytes :: Fn3 (Array Int) IsUnsigned IsLittleEndian Long
Creates a Long from its byte representation.
#fromBytesLE Source
fromBytesLE :: Fn2 (Array Int) IsUnsigned Long
Creates a Long from its little endian byte representation.
#fromBytesBE Source
fromBytesBE :: Fn2 (Array Int) IsUnsigned Long
Creates a Long from its big endian byte representation.
#fromInt Source
fromInt :: Fn2 Int IsUnsigned Long
Returns a Long representing the given 32 bit integer value.
#fromNumber Source
fromNumber :: Fn2 Number IsUnsigned Long
Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.
#fromString Source
fromString :: EffectFn3 String IsUnsigned Radix Long
Returns a Long representation of the given string, written using the specified radix.
#fromValue Source
fromValue :: Fn2 Foreign IsUnsigned Long
Converts the specified value to a Long using the appropriate from* function for its type.
#unsigned Source
unsigned :: Long -> IsUnsigned
#getHighBits Source
getHighBits :: Long -> Number
Gets the high 32 bits as a signed integer. Note: Use Internal.getNumberBitsToInt to get back Int
#getHighBitsUnsigned Source
getHighBitsUnsigned :: Long -> Number
Gets the high 32 bits as an unsigned integer. Note: Use Internal.getNumberBitsToInt to get back Int
#getLowBits Source
getLowBits :: Long -> Number
Gets the low 32 bits as a signed integer. Use Internal.getNumberBitsToInt to get back Int
#getLowBitsUnsigned Source
getLowBitsUnsigned :: Long -> Number
Gets the low 32 bits as an unsigned integer. Use Internal.getNumberBitsToInt to get back Int
#getNumBitsAbs Source
getNumBitsAbs :: Long -> Int
Gets the number of bits needed to represent the absolute value of this Long.
#greaterThan Source
greaterThan :: Long -> Fn1 Long Boolean
Tests if this Long's value is greater than the specified's.
#greaterThanOrEqual Source
greaterThanOrEqual :: Long -> Fn1 Long Boolean
Tests if this Long's value is greater than or equal the specified's.
#isNegative Source
isNegative :: Long -> Boolean
Tests if this Long's value is negative.
#isPositive Source
isPositive :: Long -> Boolean
Tests if this Long's value is positive.
#lessThanOrEqual Source
lessThanOrEqual :: Long -> Fn1 Long Boolean
Tests if this Long's value is less than or equal the specified's.
#shiftRight Source
shiftRight :: Long -> Fn1 Long Long
Returns this Long with bits arithmetically shifted to the right by the given amount.
#shiftRightUnsigned Source
shiftRightUnsigned :: Long -> Fn1 Long Long
Returns this Long with bits logically shifted to the right by the given amount.
#rotateLeft Source
rotateLeft :: Long -> Fn1 Long Long
Returns this Long with bits rotated to the left by the given amount.
#rotateRight Source
rotateRight :: Long -> Fn1 Long Long
Returns this Long with bits rotated to the right by the given amount.
#toBytes Source
toBytes :: Long -> IsLittleEndian -> Array Int
Converts this Long to its byte representation.
#toUnsigned Source
toUnsigned :: Long -> Long
Converts this Long to unsigned.