[Haskell-cafe] Re: haskell question

oleg at pobox.com oleg at pobox.com
Sun Apr 22 20:22:34 EDT 2007

> Is there documentation on the multi-parameter type classes?

Sections 7.4.2. Class declarations, 7.4.3 Functional dependencies and
7.4.4. Instance declarations of the GHC user guide give the short
description of these features. These section refer to a couple of
papers. The best explanation can be found in papers by Mark P. Jones:
(see especially `qualified types').

> i think i see what you've done, but i'd like to read up on it to make
> sure that i understand.

The approach in the previous message was quite close to that used for
representing collections. The type of a particular collection implies
the type of collection's elements. In your case, the type of the agent
implies the type of the processor for that particular agent (and vice
versa). Incidentally, instance declarations can be recursive and
mutually recursive.

More information about the Haskell-Cafe mailing list