|
Re: Begginer question: msg#00059lang.haskell.cafe
Maurício comments the remark of Ketil Malde Note that Haskell doesn't automatically convert arguments for you -- When I type this: You should read thoroughly the Haskell documentation. You will learn that Haskell casts EXPLICIT NUMERICAL CONSTANTS, but not variables. 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). Jerzy Karczmarczuk |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Begginer question: 00059, Maurício |
|---|---|
| Next by Date: | Re: Re: Begginer question: 00059, Jules Bean |
| Previous by Thread: | Re: Begginer questioni: 00059, Maurício |
| Next by Thread: | Re: Re: Begginer question: 00059, Henning Thielemann |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |