[Haskell-cafe] bug in number reading?
lemming at henning-thielemann.de
Mon Sep 29 02:34:47 EDT 2008
On Sun, 28 Sep 2008, Brandon S. Allbery KF8NH wrote:
> On 2008 Sep 28, at 18:42, Jason Dusek wrote:
>> Maybe I'm missing something, but this doesn't seem right...
>> :; ghc -e '10e4'
>> Warning: Defaulting the following constraint(s) to type `Double'
>> `Fractional a' arising from a use of `it' at <interactive>:1:0-3
>> In the first argument of `print', namely `it'
>> In the expression: print it
>> In a stmt of a 'do' expression: print it
>> it :: forall t. (Fractional t) =>
> Looks right to me. Remember that the translation of that is 10 * 10^4.
Btw. is there a reason why exponential notation always requires Fractional
not Num? I guess 10e4 is translated to 10 * 10^^4, not 10 * 10^4, but the
latter one would be more convenient, and (^^) could be used only for
More information about the Haskell-Cafe