[Hugs-users] overloading operators
Ross Paterson
ross at soi.city.ac.uk
Wed Apr 13 05:26:14 EDT 2005
On Tue, Apr 12, 2005 at 11:04:14PM -0500, Alfredo Paz-Valderrama wrote:
> but whe the Thompson's book says:
>
> --------------------------------------------
> Literals are not overloaded, there is no automatic conversion from Int to Float.
^^^^^^^^^^^^^^^^^^^^^^^^^^^
My copy says (on p45) "Although literals are overloaded," and the point
is explained in the previous paragraph.
Note though that fromInt should be replaced by the Haskell 98 function
fromIntegral.
More information about the Hugs-Users
mailing list