[Haskell-cafe] confusion about 'instance'....
Tillmann Rendel
rendel at rbg.informatik.tu-darmstadt.de
Thu Jan 10 10:45:00 EST 2008
Nicholls, Mark wrote:
> I only have 1 type.
>
> If I say "my name is mark" twice, it doesn't mean I belong to set of
> objects called Mark twice....
Typeclasses define not only sets of types, but a common interface for
these types, too. An analogy would be to say:
I have a name, and it is Marc.
I have a name, and it is John.
From a "set of things" perspective, there is no problem: you belong to
the set of people having a name. But what name should I actually use
when I want to adress you?
Tillmann
More information about the Haskell-Cafe
mailing list