Bignums in Haskell

Simon Peyton-Jones simonpj at microsoft.com
Tue Jun 21 10:48:44 EDT 2005


| >> Do any of you have insight into why GHC uses GMP as opposed to
| >> another library for arbitrary precision numbers?
| >
...
| 
| Right - that's three reasons to use it.  Some reasons *not* to use it
| are: it has an awkward license, it's big, it needs updating, and we
run
| into problems when the Haskell program wants to use GMP itself via the
| FFI (it's possible by essentially renaming everything in our local
copy
| of GMP so it doesn't conflict, but we haven't done that).

In fact, we have long wanted to replace GMP with another library for
exactly these reasons.  It's a nice, well-specified, self-contained
project, which is just waiting for someone to step up and do it.  Of
course, we'd only want to replace GMP if the alternative was also fast
and reliable.

If anyone is interested in tackling this, let us know!


Simon


More information about the Glasgow-haskell-users mailing list