logo       

Re: Re: Begginer question: msg#00061

lang.haskell.cafe

Subject: Re: Re: Begginer question


On Thu, 6 Jan 2005 karczma@xxxxxxxxxxxxxxx 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'.


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise