Status of GHC runtime dependency on GNU multi precision arithmetic library

Isaac Dupree isaacdupree at
Wed Aug 22 11:40:57 EDT 2007

Stefan O'Rear wrote:
> Another possibility that occured to me recently, is to switch Integer
> to a simpler (perhaps even pure-Haskell) representation, and provide
> (core?  extra?  Hackage?) a hsgmp package.  If you have big numbers,
> switching is easy:
> import Prelude hiding(Integer)
> import Data.Integer.GMP
> type Integer = MPZ

except that lots of things depend on Prelude.Integer, such as class Num 
and Integral, potentially a fixed Enum, and who knows what functions 
that base exports.  IMO there needs to be a standard Integer type for 
library APIs to use (unless making them all class-qualified like 
(Integral a) => is an acceptable substitute?).  This does not fit well 
with different code using different Integers as they please, especially 
not if we want it to be likely/possible to be fast.


More information about the Glasgow-haskell-users mailing list