Proposal: Better power for Rational

Daniel Fischer at
Mon Oct 4 11:04:51 EDT 2010

On Monday 04 October 2010 16:47:27, Simon Peyton-Jones wrote:
> In general, it's an implementation matter where to put these functions,
> rather than a major design choice.  If one module is getting big and
> clumsy, then maybe splitting it into two would help.

Yes, I just was a bit uncertain because my favoured way involves several 
packages, so I thought I'd rather ask for a general okay before producing a 
number of patches and then get told "Duh, that's not cricket."

> However, as you say we need to think about integer-simple too, so we
> should perhaps think about adding the same new functions to the
> 'integer-gmp' and 'integer-simple' packages.  Then you would not need
> #ifdefs in GHC.Float, would you?  
> s

Right, putting the log-related stuff in the integer-* packages would make 
it work without #ifdefs.
I would only need one for toRational if using Int64 instead of Int incurs a 
performance penalty on 64-bit systems.
Does anybody have knowledge about that?


More information about the Libraries mailing list