[Haskell-cafe] Re: A type class puzzle

Arie Peterson ariep at xs4all.nl
Tue Oct 31 17:22:43 EST 2006

Greg Buchholz wrote:

> I guess it just looks really strange to my eyes.  For example, "foo"
> and "bar" are legal, but "baz" isn't.  That's what I was thinking of the
> situation, but I guess the type classes iron out the differences.

Ah, but here 'baz' is illegal because of the (somewhat arbitrary)
restriction that different lines of a function binding must have the same
number of "argument patterns". The different instances of 'BuildList' have
unrelated definitions of 'build\'' - at least as far as this restriction
is concerned.

More information about the Haskell-Cafe mailing list