[Haskell-cafe] Re: Begginer question

Henning Thielemann iakd0 at clusterf.urz.uni-halle.de
Thu Jan 6 09:15:48 EST 2005


On Thu, 6 Jan 2005 karczma at info.unicaen.fr wrote:

> Actually this is not a "conversion", but an overloading of numerical
> constants. The lexical entity "4" behaves as "fromInteger 4", and the
> type checker uses the fromInteger appropriate to the context. Floating,
> Complex, etc. With 4.0 it will work also (overloaded fromRational). 

Though I think the syntax should distinguish between the polymorphic value
'4' and the bare integer from which it is convert, say '#4', that is '4 =
fromInteger #4'. 



More information about the Haskell-Cafe mailing list