GHC.Integer.GMP.Internals

# The `Integer` type

data Integer

isValidInteger#

## Basic `Integer` operations

## Additional `Integer` operations

bitInteger

popCountInteger

gcdInteger

gcdExtInteger

lcmInteger

sqrInteger

powModInteger

recipModInteger

## Additional conversion operations to `Integer`

wordToNegInteger

bigNatToInteger

bigNatToNegInteger

# The `BigNat` type

data BigNat

type GmpLimb

type GmpLimb#

type GmpSize

type GmpSize#

##

isValidBigNat#

sizeofBigNat#

zeroBigNat

oneBigNat

nullBigNat

## Conversions to/from `BigNat`

byteArrayToBigNat#

wordToBigNat

wordToBigNat2

bigNatToInt

bigNatToWord

indexBigNat#

## `BigNat` arithmetic operations

plusBigNat

plusBigNatWord

minusBigNat

minusBigNatWord

timesBigNat

timesBigNatWord

sqrBigNat

quotRemBigNat

quotRemBigNatWord

quotBigNatWord

quotBigNat

remBigNat

remBigNatWord

gcdBigNat

gcdBigNatWord

powModBigNat

powModBigNatWord

recipModBigNat

## `BigNat` logic operations

shiftRBigNat

shiftLBigNat

testBitBigNat

andBigNat

xorBigNat

popCountBigNat

orBigNat

bitBigNat

## `BigNat` comparision predicates

isZeroBigNat

isNullBigNat#

compareBigNatWord

compareBigNat

eqBigNatWord

eqBigNatWord#

eqBigNat

eqBigNat#

gtBigNatWord#

# Miscellaneous GMP-provided operations

gcdInt

gcdWord

# Primality tests

testPrimeInteger

testPrimeBigNat

nextPrimeInteger

nextPrimeBigNat

# Import/export functions

## Compute size of serialisation

sizeInBaseBigNat

sizeInBaseInteger

## Export

exportBigNatToAddr

exportIntegerToAddr

exportWordToAddr

exportBigNatToMutableByteArray

exportIntegerToMutableByteArray

exportWordToMutableByteArray

## Import

importBigNatFromAddr

importIntegerFromAddr

importBigNatFromByteArray

importIntegerFromByteArray