Re-implement `powModInteger` (#9281)
authorHerbert Valerio Riedel <hvr@gnu.org>
Sat, 29 Nov 2014 11:18:25 +0000 (12:18 +0100)
committerHerbert Valerio Riedel <hvr@gnu.org>
Sat, 29 Nov 2014 17:39:07 +0000 (18:39 +0100)
commitd0d4674281a80e4148a82f833948c2b4c3051eab
treee4e5d62ae7a5dc4c0784f825cc9d9bbbc4d95459
parenta809eaba4bab96e94f2dc8fe6b617c5c6f8fd565
Re-implement `powModInteger`  (#9281)

This also exposes the following type-specialised modular exponentiation
variants of `powModInteger` useful for implementing a `powModNatural`
operation.

  powModBigNat     :: BigNat -> BigNat -> BigNat -> BigNat
  powModBigNatWord :: BigNat -> BigNat -> Word#  -> Word#
  powModWord       :: Word#  -> Word#  -> Word#  -> Word#

`powModInteger` has been available since `integer-gmp-0.5.1`
(added via 4d516855241b70eb687d95e3c121428de885e83e)
libraries/integer-gmp2/cbits/wrappers.c
libraries/integer-gmp2/include/HsIntegerGmp.h.in
libraries/integer-gmp2/src/GHC/Integer/GMP/Internals.hs
libraries/integer-gmp2/src/GHC/Integer/Type.hs
testsuite/tests/lib/integer/integerGmpInternals.hs