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