[Haskell-cafe] type inference question
Deniz Dogan
deniz.a.m.dogan at gmail.com
Thu Oct 8 06:36:51 EDT 2009
2009/10/8 Cristiano Paris <frodo at theshire.org>:
> On Thu, Oct 8, 2009 at 11:04 AM, minh thu <noteed at gmail.com> wrote:
>> Hi,
>>
>> I'd like to know what are the typing rules used in Haskell (98 is ok).
>>
>> Specifically, I'd like to know what makes
>>
>> let i = \x -> x in (i True, i 1)
>>
>> legal, and not
>>
>> let a = 1 in (a + (1 :: Int), a + (1.0 :: Float))
>>
>> Is it correct that polymorphic functions can be used polymorphically
>> (in multiple places) while non-functions receive a monomorphic type ?
>
> First, "1" IS a constant function so it's in no way special and is a
> value like any other.
I thought all functions in lambda calculus, technically, take exactly
one argument?
--
Deniz Dogan
More information about the Haskell-Cafe
mailing list