[Haskell-beginners] fromIntegral

Daniel Fischer daniel.is.fischer at web.de
Sat Oct 2 10:12:00 EDT 2010


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.



More information about the Beginners mailing list