Abstract Collections vs. FunDeps

Wolfgang Jeltsch wolfgang at jeltsch.net
Fri Mar 26 12:14:29 EST 2004

Am Freitag, 26. März 2004 09:19 schrieb Robert Will:
> On Tue, 23 Mar 2004, Malcolm Wallace wrote:
> > Multi-parameter type classes, as used in your proposal, are also a
> > language extension.  Every implementation that supports MPTC also
> > supports fundeps.
> Hair-splitting reply: MPTC are not an extension, but the suppression of a
> restriction.

Then every so-called language extension is the suppression of a restriction 
since it allows Haskell programs which were incorrect before. ;-)

> Not being restricted to one TC parameter is also a simplification in some
> sense...  FunDeps, otoh, are a completely new concept.

But they are often needed or at least useful when MPTCs are used.

> Honest reply: I don't fully understand FunDeps and I don't want to learn
> (now), since the Collections should also be understandable for people less
> intelligent than me.  (This is a design criterion used throughout, and I
> think my not-too-high intelligence has made this one of the Collection's
> success factors!)

Fundeps basics are not so difficult to understand IMHO, at least if you have 
some database background.  A one-parameter type class defines a predicate on 
the types, a multi-parameter type class defines a relation, and a MPTC with 
fundeps defines a relation with functional dependencies just like in 
relational database technology.

> [...]

> Robert


More information about the Libraries mailing list