Re: overloading operators
Ross Paterson <[email protected]> Wed, 13 Apr 2005 10:26:14 +0100
| Newsgroups | gmane.comp.lang.haskell.hugs.user |
|---|---|
| Message-ID | <[email protected]> |
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.