Hello,
I defined a simple function as below:
mytriple :: a -> b -> a -> (a,b,a);
mytriple x y z = (x,y,z);
Then I checked 'mytriple' type variables signatures, so I declared a mytriple values in a 'wrong way':
____ should be to the same type of the 1st argument
/
λ:t2 = mytriple 1 'a' 'b'
error:
'No instance for (Num Char) arising from the literal '1'
'In the first argument of mytriple', namely '1'
In the expression: mytriple 1 'a' 'b'
In an equation for 't2': t2 = mytriple 1 'a' 'b'
Ok, this is exactly what I aspected, but I do not understand the error.
What means the sentence : 'No instance for (Num Char) arising from the literal '1'.'
How is evaluated a function, in order to check that the params are type variables signatures?
Why the error message refers to the 1st arguments?
Thanks
Conrad