[Haskell-cafe] Re: Why does the class called "Real" support only
rationals, and not all reals?
Dan Piponi
dpiponi at gmail.com
Mon Jun 4 13:54:04 EDT 2007
On 6/4/07, DavidA <polyomino at f2s.com> wrote:
> Yes, I'm afraid that you are understanding correctly. Annoying isn't it.
>
> It is well-known (among Haskell mathematicians at least) that the numeric type
> classes in the prelude are broken.
A few days ago I found myself forced to write:
> instance Floating Fixed where ...
where 'Fixed' is a fixed point arithmetic class! :-)
When you find yourself having to make a type an instance of the
complete 'opposite' class you know you have serious problems!
--
Dan
More information about the Haskell-Cafe
mailing list