h"C>Z      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~(c) Herbert Valerio Riedel 2014BSD3ghc-devs@haskell.org provisionalnon-portable (GHC Extensions)None ,3) integer-gmp Construct & value from list of s..This function is used by GHC for constructing & literals. integer-gmpShould rather be called  intToInteger integer-gmp Truncates & to least-significant  integer-gmpAdd two &s integer-gmp Multiply two &s integer-gmp Subtract one & from another. integer-gmpNegate &  integer-gmpCompute absolute value of an &  integer-gmpReturn -1, 0, and 1 depending on whether argument is negative, zero, or positive, respectively integer-gmp Simultaneous  and .Divisor must be non-zero otherwise the GHC runtime will terminate with a division-by-zero fault. integer-gmp Simultaneous  and .Divisor must be non-zero otherwise the GHC runtime will terminate with a division-by-zero fault. integer-gmp Compute greatest common divisor. integer-gmpCompute least common multiple. integer-gmpBitwise AND operation integer-gmpBitwise OR operation integer-gmpBitwise XOR operation  integer-gmpBitwise NOT operation! integer-gmpShift-left operation-Even though the shift-amount is expressed as 6, the result is undefined for negative shift-amounts." integer-gmp Arithmetic shift-right operation-Even though the shift-amount is expressed as 6, the result is undefined for negative shift-amounts.% integer-gmp& for which only n2-th bit is set. Undefined behaviour for negative n values.& integer-gmpArbitrary precision integers. In contrast with fixed-size integral types such as , the &8 type represents the entire infinite range of integers.For more information about this type's representation, see the comments in its implementation.' integer-gmp iff value in  [minBound:: , maxBound::] range integer-gmp"Internal helper type for "signed" *sThis is a useful abstraction for operations which support negative mp_size_t arguments.( integer-gmp iff value in  ]maxBound::, +inf[ range) integer-gmp iff value in ]-inf, minBound::[ range* integer-gmpType representing raw arbitrary-precision NaturalsThis is common type used by Natural and &=. As this type consists of a single constructor wrapping a  it can be unpacked.Essential invariants: size is an exact multiple of  size7limbs are stored in least-significant-limb-first order,6the most-significant limb must be non-zero, except for0" which is represented as a 1-limb.- integer-gmp Count of /1s, must be positive (unless specified otherwise)./ integer-gmpType representing a GMP Limb0 integer-gmp Version of q operating on s1 integer-gmp Version of m operating on s integer-gmp Bits in a / . Same as 64.2 integer-gmp6Test whether all internal invariants are satisfied by & valueReturns 1# if valid, 0# otherwise.This operation is mostly useful for test-suites and/or code which constructs & values directly.5 integer-gmpNot-equal predicate. integer-gmpReturn -1#, 0#, and 1# depending on whether argument is negative, zero, or positive, respectively; integer-gmpSquare & integer-gmpConvert two Int. (resp. high and low bits of a double-word Int) into an IntegerWarning: currently it doesn't handle the case where high=minBound and low=0 (i.e. high:low = 100......00 = minBound for a double-word Int) integer-gmp Construct & from the product of two s> integer-gmpCount number of set bits. For negative arguments returns negative population count of negated argument.? integer-gmpTest if n-th bit is set.@ integer-gmp Compute greatest common divisor.Warning<: result may become negative if (at least) one argument is minBoundA integer-gmp Compute greatest common divisor.I integer-gmpSame as t bn 0#J integer-gmpEquivalent to  . IK integer-gmpCAF representing the value  0 :: BigNatL integer-gmpTest if * value is equal to zero.M integer-gmpCAF representing the value  1 :: BigNatN integer-gmp?Special 0-sized bigNat returned in case of arithmetic underflow x .&. (complement y)d integer-gmpIf divisor is zero, (# N, N #) is returnedg integer-gmpNote: Result of div/0 undefinedi integer-gmpdiv/0 not checkedl integer-gmpExtended euclidean algorithm.For a and b(, compute their greatest common divisor g and the coefficient s satisfying as + bt = g.m integer-gmp"m b e m" computes base b raised to exponent e modulo abs(m).6Negative exponents are supported if an inverse modulo m exists.Warning: It's advised to avoid calling this primitive with negative exponents unless it is guaranteed the inverse exists, as failure to do so will likely cause program abortion due to a divide-by-zero fault. See also q.Future versions of  integer_gmp may not support negative e values anymore.n integer-gmp"n b e m" computes base b raised to exponent e modulo m. It is required that e >= 0 and m is odd.This is a "secure" variant of m using the mpz_powm_sec() function which is designed to be resilient to side channel attacks and is therefore intended for cryptographic applications.This primitive is only available when the underlying GMP library supports it (GMP >= 5). Otherwise, it internally falls back to m*, and a warning will be emitted when used.o integer-gmp Version of m operating on *sp integer-gmp Version of m for  -sized moduliq integer-gmp"q x m" computes the inverse of x modulo m+. If the inverse exists, the return value y will satisfy 0 < y < abs(m), otherwise the result is 0.r integer-gmp Version of q operating on *ss integer-gmp$Return number of limbs contained in *.The result is always >= 1( since even zero is encoded with 1 limb.t integer-gmpExtract n-th (0-based) limb in *. n' must be less than size as reported by s. integer-gmpMay shrink underlying & if needed to satisfy BigNat invariant integer-gmp Shrink MBN integer-gmp Version of  which scans all allocated  MutBigNat# integer-gmpFind most-significant non-zero limb and return its index-position plus one. Start scanning downward from the initial limb-size (i.e. start-index plus one) given as second argument.NB: The normSizeofMutBigNat of K would be 0#u integer-gmp Construct * from existing  containing n /#s in least-significant-first order. If possible &, will be used directly (i.e. shared without cloning the  into a newly allocated one)Note: size parameter (times sizeof(GmpLimb) ) must be less or equal to its .v integer-gmpRead &( (without sign) from memory location at addr in base-256 representation. v addr size msbfSee description of x for more details.w integer-gmp Version of v constructing a * integer-gmp Helper for wx integer-gmpRead &; (without sign) from byte-array in base-256 representation.The call x ba offset size msbfreadssize bytes from the  ba starting at offset$with most significant byte first if msbf is 1#' or least significant byte first if msbf is 0#, andreturns a new &y integer-gmp Version of x constructing a * integer-gmp Helper for yz integer-gmp6Test whether all internal invariants are satisfied by * valueReturns 1# if valid, 0# otherwise.This operation is mostly useful for test-suites and/or code which constructs & values directly.{ integer-gmp Version of nextPrimeInteger operating on *s integer-gmpAbsolute value of  integer-gmpSigned4 limb count. Negative sizes denote negative integers integer-gmp Construct  from  value integer-gmpConvert & into  integer-gmpConvert  into & integer-gmpsign of integer ( if non-negative) integer-gmpabsolute value expressed in 31 bit chunks, least significant first (ideally these would be machine-word s rather than 31-bit truncated s)  !"#$%&)('*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{011None .8| integer-gmp6Calculate the integer logarithm for an arbitrary base.The base must be greater than 1, the second argument, the number whose logarithm is sought, shall be positive, otherwise the result is meaningless.The following property holds base ^ | base m <= m < base ^(| base m + 1)for base > 1 and m > 0.Note: Internally uses } for base 2} integer-gmp-Calculate the integer base 2 logarithm of an &. The calculation is more efficient than for the general case, on platforms with 32- or 64-bit words much more efficient.:The argument must be strictly positive, that condition is not checked.~ integer-gmpCompute base-2 log of This is internally implemented as count-leading-zeros machine instruction.|}~~}|None/ integer-gmpExtended version of }(Assumption: Integer is strictly positiveFirst component of result is log2 n , second is 0# iff n is a power of two.}~~}(c) Herbert Valerio Riedel 2014BSD3ghc-devs@haskell.org provisionalnon-portable (GHC Extensions)None/.  !"#$%&356789:>?.&#$ 65798:  !"?>%3(c) Herbert Valerio Riedel 2014BSD3ghc-devs@haskell.org provisionalnon-portable (GHC Extensions)None 23=Q integer-gmp Version of  operating on s integer-gmp Version of  operating on s integer-gmp Version of  operating on  integer-gmp1Compute number of digits (without sign) in given base.This function wraps mpz_sizeinbase() which has some implementation pecularities to take into account:" 0 base = 1" (see also comment in ).!This function is only defined if base >= 2# and base <= 256#. (Note: the documentation claims that only base <= 62# is supported, however the actual implementation supports up to base 256).If base is a power of 2, the result will be exact. In other cases (e.g. for base = 10#), the result may# be 1 digit too large sometimes." i 2#:" can be used to determine the most significant bit of i. integer-gmp Version of  operating on * integer-gmpDump & (without sign) to addr in base-256 representation.  i addr eSee description of  for more details. integer-gmp Version of  operating on *s. integer-gmp Version of  operating on s. integer-gmpDump & (without sign) to mutable byte-array in base-256 representation.The call  i mba offset msbfwritesthe & i into the  mba starting at offset$with most significant byte first if msbf is 1#' or least significant byte first if msbf is 0#, and returns number of bytes written.Use " i 256#?" to compute the exact number of bytes written in advance for i /= 0 . In case of i == 0, 4 will write and report zero bytes written, whereas  report one byte."It's recommended to avoid calling  for small integers as this function would currently convert those to big integers in msbf to call  mpz_export(). integer-gmp Version of  operating on *s. integer-gmp Version of  operating on s. integer-gmp(Probalistic Miller-Rabin primality test." n k" determines whether n4 is prime and returns one of the following results:2# is returned if n is definitely prime,1# if n is a probable prime, or0# if n is definitely not a prime.The k argument controls how many test rounds are performed for determining a probable prime. For more details, see  http://gmplib.org/manual/Number-Theoretic-Functions.html#index-mpz_005fprobab_005fprime_005fp-360,GMP documentation for `mpz_probab_prime_p()`. integer-gmp Version of  operating on *s integer-gmp Compute next prime greater than n probalistically.=According to the GMP documentation, the underlying function mpz_nextprime() "uses a probabilistic algorithm to identify primes. For practical purposes it's adequate, the chance of a composite passing will be extremely small."  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{&'()2l;mnq4<=*+/.-,zsKMNuPQJItRSTUVXWdghefikjopr`_Z[]\cb^aYLOCBGHEFD@A10{wvyx      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~integer-wired-in GHC.IntegerGHC.Integer.GMP.InternalsGHC.Integer.Logarithms GHC.Integer.Logarithms.InternalsGHC.Integer.Type mkInteger smallInteger integerToWord integerToInt plusInteger timesInteger minusInteger negateInteger eqInteger# neqInteger# absInteger signumInteger leInteger# gtInteger# ltInteger# geInteger#compareInteger quotInteger remInteger divInteger modInteger divModIntegerquotRemIntegerfloatFromIntegerdoubleFromIntegerencodeFloatIntegerencodeDoubleInteger gcdInteger lcmInteger andInteger orInteger xorIntegercomplementInteger shiftLInteger shiftRInteger wordToIntegerdecodeDoubleInteger bitIntegerIntegerS#Jp#Jn#BigNatBN#GmpSize#GmpSizeGmpLimb#GmpLimb recipModWord powModWordisValidInteger# hashIntegerwordToNegInteger neqInteger eqInteger leInteger ltInteger gtInteger geInteger sqrIntegerbigNatToIntegerbigNatToNegIntegerpopCountIntegertestBitIntegergcdIntgcdWord compareBigNatcompareBigNatWord gtBigNatWord#eqBigNat eqBigNat# eqBigNatWord eqBigNatWord# bigNatToWord bigNatToInt zeroBigNat isZeroBigNat oneBigNat nullBigNat isNullBigNat# wordToBigNat wordToBigNat2 plusBigNatplusBigNatWord minusBigNatminusBigNatWord timesBigNat sqrBigNattimesBigNatWord bitBigNat testBitBigNatclearBitBigNat setBitBigNatcomplementBitBigNatpopCountBigNat shiftLBigNat shiftRBigNatorBigNat xorBigNat andBigNat quotRemBigNat quotBigNat remBigNatquotRemBigNatWordquotBigNatWord remBigNatWord gcdBigNatWord gcdBigNat gcdExtInteger powModIntegerpowModSecInteger powModBigNatpowModBigNatWordrecipModIntegerrecipModBigNat sizeofBigNat# indexBigNat#byteArrayToBigNat#importIntegerFromAddrimportBigNatFromAddrimportIntegerFromByteArrayimportBigNatFromByteArrayisValidBigNat#nextPrimeBigNatintegerLogBase# integerLog2# wordLog2#integerLog2IsPowerOf2# roundingMode#nextPrimeWord#testPrimeWord#sizeInBaseWord#sizeInBaseIntegersizeInBaseBigNatexportIntegerToAddrexportBigNatToAddrexportWordToAddrexportIntegerToMutableByteArrayexportBigNatToMutableByteArrayexportWordToMutableByteArraytestPrimeIntegertestPrimeBigNatnextPrimeIntegerghc-prim GHC.TypesIntGHC.PrimInt#SBigNat ByteArray#Word# gmpLimbBitssignumInteger# int2ToIntegertimesInt2Integer word2Int# andnBigNatunsafeRenormFreezeBigNat#unsafeShrinkFreezeBigNat#normSizeofMutBigNat#normSizeofMutBigNat'#sizeofByteArray#importBigNatFromAddr#importBigNatFromByteArray# absSBigNatssizeofSBigNat# intToSBigNat#integerToSBigNatsBigNatToIntegerTrueWordPosBNNegBNS MutBigNatMBN#CInt#CInt GmpBitCnt# GmpBitCnt nextPrime#c_mpn_import_bytearrayc_rscan_nzbyte_bytearrayc_scan_nzbyte_bytearrayc_mpn_import_addrc_rscan_nzbyte_addrc_scan_nzbyte_addrc_mpn_popcount c_mpn_xor_n c_mpn_ior_n c_mpn_andn_n c_mpn_and_n c_mpn_lshiftc_mpn_rshift_2c c_mpn_rshift c_mpn_mod_1c_mpn_divrem_1 c_mpn_tdiv_r c_mpn_tdiv_q c_mpn_tdiv_qr c_mpn_cmp c_mpn_mul c_mpn_sub c_mpn_add c_mpn_mul_1 c_mpn_sub_1 c_mpn_add_1integer_gmp_gcdext# c_mpn_gcd# c_mpn_gcd_1#gcdWord# c_mpn_get_dint_encodeDouble#integer_gmp_invert#integer_gmp_powm_sec#integer_gmp_powm1#integer_gmp_powm#narrowGmpSize# narrowCInt# isNegInteger# unsafePromote neqBigNat# czeroBigNattestBitNegBigNatshiftRNegBigNat gcdExtSBigNat powModSBigNatpowModSBigNatWordpowModSecSBigNatrecipModSBigNatgetSizeofMutBigNat# newBigNat# writeBigNat#unsafeFreezeBigNat#resizeMutBigNat#shrinkMutBigNat#unsafeSnocFreezeBigNat#copyWordArray# copyWordArrayclearWordArray#$>>=>>svoidreturnliftIOrunSfailcmpW#bitWord# testBitWord#popCntI#absI#sgnI#cmpI#minI#fmsslMutableByteArray#