instance declarations
David Feuer
dfeuer@cs.brown.edu
Fri, 7 Dec 2001 13:56:49 -0500 (EST)
I am curious about a couple things regarding instance declarations.
1. Why can't they be hidden in module imports/exports? Is this an
implementation issue (I guess I could see it as a problem with the
dictionary-passing approach...)? It seems kind of bad that instances are
not allowed to overlap, but can't be hidden.
2. Why can't you simultaneously declare a type to be an instance of
multiple classes? i.e, why can't you write the following?
class C1 t where
a::t->t
class C1 t => C2 t where
b::t->t
instance C1 t, C2 t where
a=...
b=...