Rational sequence
Alastair Reid
alastair@reid-consulting-uk.ltd.uk
22 Oct 2002 13:52:01 +0100
Jerzy Karczmarczuk <karczma@info.unicaen.fr> writes:
> Rationals in Hugs were always a bit obscure. What do you think, what
> is the Rational form of 2.3 ? (GHCi says 23/10).
> The answer is:
> 2589569785738035 % 1125899906842624
> (Old Hugs, Feb. 2001)
I'm afraid the new release won't fix this.
Once the release is out the door and things settle down a bit (both in
Hugs and in my personal life), I'd like to cleanup the Hugs' internals
which have gotten quite confused by layer upon layer of backward
compatability code. Practical benefits I hope for are:
- Make Float mean 'C float' and Double mean 'C double'.
Most of the code is actually in Hugs already but it was disabled
because of some long-irrelevant issue involving the foreign
function interface.
- Implement literal constants using Rational (as described by the standard)
instead of using Double (which, of course, usually means 'float').
[This is a separate task from the first which I would be delighted
to have someone else do.]
Along the way, inessential things like compatability with GreenCard 1
(which died about 5 years ago) will die, people using GreenCard 2
(what most people call 'GreenCard') with Hugs will lose the option of
generating Hugs-specific code instead of generating portable FFI code,
deprecated types (like Addr) will disappear, etc.
--
Alastair