Haskell interface to GMP. Types and instances, and marshalling between Integer
and Rational and the corresponding GMP types, along with raw foreign imports of
GMP functions. Allows FFI to GMP code (whether in GMP itself or in third-party
code that uses GMP).
A simple example illustrating binding to GMP’s next probable-prime function: