
6 Jan
2005
6 Jan
'05
9:15 a.m.
On Thu, 6 Jan 2005 karczma@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'.