Re: [Haskell-cafe] What does the Haskell type system do with show (1+2)?

2006-01-13 Thread Henning Thielemann
On Thu, 12 Jan 2006 [EMAIL PROTECTED] wrote: What does the Haskell type system do with expressions such as these . . . ? show 1 show (1+2) The type of the subexpressions 1 and 1+2 are ambiguous since they have type (Num a) = a. I'm under the assumption before 1+2 is evaluated, the 1 and

[Haskell-cafe] What does the Haskell type system do with show (1+2)?

2006-01-12 Thread Jeff . Harper
What does the Haskell type system do with expressions such as these . . . ? show 1 show (1+2) The type of the subexpressions 1 and 1+2 are ambiguous since they have type (Num a) = a. I'm under the assumption before 1+2 is evaluated, the 1 and 2 must be coerced into a concrete type such as Int,

Re: [Haskell-cafe] What does the Haskell type system do with show (1+2)?

2006-01-12 Thread Jared Updike
http://www.haskell.org/onlinereport/decls.html#default-decls http://www.haskell.org/tutorial/numbers.html#sect10.4 On 1/12/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: What does the Haskell type system do with expressions such as these . . . ? show 1 show (1+2) The type of the