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

Achim Schneider barsoap at web.de
Thu May 28 11:42:03 EDT 2009

Bulat Ziganshin <bulat.ziganshin at gmail.com> wrote:

> Hello Achim,
> Thursday, May 28, 2009, 1:34:55 AM, you wrote:
> >> Error: type of x is Integer
> >>  while type of read argument should be String
> >> 
> > The problem with this is that the compiler can't know whether or not
> > the type of arguments to read should be a String, as someone could
> > have messed up read's signature.
> i don't understood what you mean, can you give an example?
Error : type of x is String
  while the type of an argument to read should be Integer

, given that, somewhere, you have

read :: Integer -> a

, which is, of course, wrong, and that's the point.

(c) this sig last receiving data processing entity. Inspect headers
for copyright history. All rights reserved. Copying, hiring, renting,
performance and/or quoting of this signature prohibited.

More information about the Haskell-Cafe mailing list