
2 Oct
2010
2 Oct
'10
10:12 a.m.
On Saturday 02 October 2010 07:40:19, Russ Abbott wrote:
I can even write
test = let x = [] y = 1 : x z = 'a' : x in ...
But clearly I can't write tail y == tail z. Does that imply that type inferencing prevents one from writing a True expression?
Since it's not a well typed expression (unless there's a Num instance for Char in scope, in which case it would work), it doesn't have a value, in particular it's not a True expression. Haskell allows you only to write well typed expressions.