> Seems that it would get simpler if association maps were expressed as
> collections of key:=value pairs (with Eq,Ord instances ignoring the
> value component). Association maps would have extra functions, but
> they could be always treated as appropriate collections of such pairs.
>
> Is this idea fundamentally broken for some reason?
I considered this for Edison but rejected in for two reasons.
First, it constrains the implementation, adding an extra level
of indirection to every access. Second, and more seriously, it moves
the unconstrained type variable into the class, which leads to several
potential problems such as more ambiguity messages. Your idea below
would take care of at least some of these problems.
> Seems that an extended form of context could be useful. E.g.
> (forall a. Coll c a) => ...
> means that c is constrained to types for which there exists an
> appropriate instance that works for all types a.
Chris