[Haskell-cafe] about integer and float operations

Manlio Perillo manlio_perillo at libero.it
Wed Feb 4 16:22:31 EST 2009


Manlio Perillo ha scritto:
> [...]
> 
> I personally prefer the Python solution, where we have two operators 
> with the same behaviour over all the numbers.
> 
> In Haskell, something like
> 
> (/) :: (Num a, Real b) => a -> a -> b

This should be
(/) :: (Num a, Fractional b) => a -> a -> b

but I'm not sure it is correct.

> (//) :: (Num a, Integral b) => a -> a -> b
> 


Manlio Perillo


More information about the Haskell-Cafe mailing list