[Haskell-cafe] Strange type error with associated type synonyms

Bulat Ziganshin bulat.ziganshin at gmail.com
Wed May 27 18:15:05 EDT 2009

Hello Henning,

Thursday, May 28, 2009, 2:06:36 AM, you wrote:

Prelude>> let a = 'a'; b = "b" in a==b

> <interactive>:1:27:
>      Couldn't match expected type `Char' against inferred type `[Char]'
>      ....

> Is the type of 'a' wrong or that of 'b'?

it is not important, well, at least we can live with it. Compiler
should say:

First argument of == should be of type String
while a is of type Char

and then it's user's problem to decide whether he need to fix call or
argument. only some interactive IDE may allow user to select term to
fix and then give him message tuned to this exact term

Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com

More information about the Haskell-Cafe mailing list