[Haskell-cafe] type inference question
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:
>> 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
More information about the Haskell-Cafe