Functions missing from integer-gmp-1.1
Summary
I've been trying to build mod
package with GHC 9.0 to test changes to integer-gmp-1.1
. It seems that many functions are missing:
bigNatWord :: BigNat -> Word#
.wordToBigNat2 :: Word# -> Word# -> BigNat
.minusBigNat
(whileplusBigNat
andtimesBigNat
are present).minusBigNatWord
(whileplusBigNatWord
andtimesBigNatWord
are present).-
recipModInteger :: Integer -> Integer -> Integer
.
Expected behavior
I would expect these functions to be retained. At the moment this is a huge breaking change for mod
and its downstream dependencies, which is not straightforward to fix without performance regressions. I read through migration notes, but they do not seem to provide a clear migration guide for this case. Certainly, first four functions are not GMP specific, and I would argue that even recipModInteger
is not as specific as other examples mentioned ("prime test, secure powmod, etc."). While implementing prime testing for native
backend would be tedious (and secure powmod probably impossible), I'm happy to submit an implementation of modular inversion, if needed.
Environment
- GHC version used: 9.0.1-alpha1