Alfredo Paz-Valderrama <[EMAIL PROTECTED]> wrote:
but whe the Thompson's book says:
Literals are not overloaded,
Here is what the Haskell 98 report says, in chapter 3 on page 18:
An integer literal represents th
Alfredo Paz-Valderrama <[EMAIL PROTECTED]>
is confused by / in Haskell.
1 / 2
I get 0.5 by answer, but the / operator signature is:
float -> float -> float
No, it certainly is NOT that. At the Hugs prompt, type
:type (/)
and you will see the
Am Mittwoch, 13. April 2005 06:04 schrieb Alfredo Paz-Valderrama:
> Ok
> but whe the Thompson's book says:
>
>
> Literals are not overloaded, there is no automatic conversion from Int to
> Float. .. we will receive an error message if we type
>
> (floor
On Tue, Apr 12, 2005 at 11:04:14PM -0500, Alfredo Paz-Valderrama wrote:
> but whe the Thompson's book says:
>
>
> Literals are not overloaded, there is no automatic conversion from Int to
> Float.
^^^
My copy says (on p45) "Al
Ok
but whe the Thompson's book says:
Literals are not overloaded, there is no automatic conversion from Int to Float.
.. we will receive an error message if we type
(floor 5.6) + 6.7
since we are trying to add quantities of two different types. We hav
On 2005 April 12 Tuesday 23:12, Alfredo Paz-Valderrama wrote:
> If i write this in hugs:
>
> 1 / 2
>
> I get 0.5 by answer, but the / operator signature is:
>
> float -> float -> float
1 and 2 are overloaded. They can be Integer, Float, etc.
You can think of 2 as meaning (fromInteger 2). FromInte
Hello
I am newly in functional programming and haskell too.
I have many question about operator's signature.
If i write this in hugs:
1 / 2
I get 0.5 by answer, but the / operator signature is:
float -> float -> float
1) Why don't fail?
2) 1 and 2 are not integers?
3) can this fact be sour