Moduleghc-internal-10.0.0Haskell2010
GHC.Internal.Bignum.Primitives
Synopsis
- type Bool#
- value &&#
- value ||#
- value notB#
- value testBitI#
- value minI#
- value maxI#
- value sgnI#
- value absI#
- value cmpI#
- value intEncodeDouble#
- value popCntI#
- value andNot#
- value cmpW#
- value bitW#
- value maxW#
- value minW#
- value testBitW#
- value shiftRW#
- value plusWord3#
- value plusWord12#
- value quotRemWord3#
- value wordFromAbsInt#
- value wordLog2#
- value wordLogBase#
- value wordSizeInBase#
- value wordIsPowerOf2#
- value wordEncodeDouble#
- value wordReverseBits#
- value wordReverseBits32#
- value wordReverseBytes#
- value wordFromAddr#
- value wordFromAddrLE#
- value wordFromAddrBE#
- value wordToAddr#
- value wordToAddrLE#
- value wordToAddrBE#
- value wordWriteAddrLE#
- value wordWriteAddrBE#
- value wordFromByteArray#
- value wordFromByteArrayLE#
- value wordFromByteArrayBE#
- value wordToMutableByteArray#
- value wordToMutableByteArrayLE#
- value wordToMutableByteArrayBE#
- value wordWriteMutableByteArrayLE#
- value wordWriteMutableByteArrayBE#
- value raiseUnderflow
- value raiseUnderflow_Word#
- value raiseDivZero
- value raiseDivZero_Word#
- value unexpectedValue
- value unexpectedValue_Int#
- value unexpectedValue_Word#
- value ioWord#
- value ioInt#
- value ioVoid
- value ioBool
- Packageghc-internal-10.0.0
- Exports58
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourcePrimitives.hs
Bool#
Int#
Branchless signum
Branchless abs
Branchless comparison
Encode (# Int# mantissa, Int# exponent #) into a Double#.
(provided by GHC's RTS)
Population count
Word#
Safe right shift for Word#
Add 3 values together
(h,l) <- a + (hb,lb)
2-by-1 large division
Requires: b0 /= 0 a1 >= b0 (not required, but if not q1=0)
Return the absolute value of the Int# in a Word#
Compute base-2 log of Word#
This is internally implemented as count-leading-zeros machine instruction.
Logarithm for an arbitrary base
Indicate if the value is a power of two and which one
Encode (# Word# mantissa, Int# exponent #) into a Double#.
(provided by GHC's RTS)
Reverse bits in a Word#
Reverse bits in the Word32 subwords composing a Word#
Reverse bytes in a Word#
Addr import/export
Read a Word from addr in base-256 representation.
@n is the number of bytes to read.
The endianness is selected with the Bool# parameter: write most significant
byte first (big-endian) if 1# or least significant byte first
(little-endian) if 0#.
Read a Word from addr in base-256 little-endian representation.
@n is the number of bytes to read.
Read a Word from addr in base-256 big-endian representation.
@n is the number of bytes to read.
Write a Word to addr in base-256 representation and
return the number of bytes written.
The endianness is selected with the Bool# parameter: write most significant
byte first (big-endian) if 1# or least significant byte first
(little-endian) if 0#.
Write a Word to addr in base-256 little-endian representation and
return the number of bytes written.
Write a Word to addr in base-256 big-endian representation and
return the number of bytes written.
Write a full word with little-endian encoding
Write a full word with little-endian encoding
ByteArray import/export
Read a Word from ByteArray in base-256 representation.
@n is the number of bytes to read.
The endianness is selected with the Bool# parameter: write most significant
byte first (big-endian) if 1# or least significant byte first
(little-endian) if 0#.
Read a Word from ByteArray in base-256 little-endian representation.
@n is the number of bytes to read.
Read a Word from ByteArray in base-256 big-endian representation.
@n is the number of bytes to read.
Write a Word to MutableByteArray in base-256 representation and
return the number of bytes written.
The endianness is selected with the Bool# parameter: write most significant
byte first (big-endian) if 1# or least significant byte first
(little-endian) if 0#.
The offset is in bytes.
Write a Word to MutableByteArray in base-256 little-endian
representation and return the number of bytes written.
The offset is in bytes.
Write a Word to MutableByteArray in base-256 big-endian representation and
return the number of bytes written.
The offset is in bytes.
Write a full word with little-endian encoding
Write a full word with little-endian encoding
Exception
Raise GHC.Exception.Type.underflowException
Raise GHC.Exception.Type.divZeroException