You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, as far as I can tell there is no way to use externally sourced prime numbers. If I use primesieve or some other method to make a bunch of prime numbers, but then I want to call sqrtsModPrime or one of its related functions, I cannot do this unless I wrap the number in fromJust $ isPrime p or something like that.
Why?
Just exposing the type constructor would allow users to circumvent the guarantees arithmoi itself has, but this is necessary for neat integration with other libraries. Plus, wrapping primes could be exposed as a function with a name like unsafeWrapPrime so people totally wouldn't use it unless they needed it.
The text was updated successfully, but these errors were encountered:
Because of GHC 9.0 changes, primes in arithmoi require a huge overhaul anyways. I'm painfully slowly fleshing out Math.NumberTheory.Primes as a separate library.
Currently, as far as I can tell there is no way to use externally sourced prime numbers. If I use
primesieve
or some other method to make a bunch of prime numbers, but then I want to callsqrtsModPrime
or one of its related functions, I cannot do this unless I wrap the number infromJust $ isPrime p
or something like that.Why?
Just exposing the type constructor would allow users to circumvent the guarantees arithmoi itself has, but this is necessary for neat integration with other libraries. Plus, wrapping primes could be exposed as a function with a name like
unsafeWrapPrime
so people totally wouldn't use it unless they needed it.The text was updated successfully, but these errors were encountered: