Tue, 21 May 2002 07:25:49 -0700
I don't understand all the implications of this.
For example, what if we have an instance that
doesn't match C () () now, but may do 'later'
when a type variable has been instantiated.
Overlapping instances are a terrific swamp and while they
are interesting I don't think I'm going to spend a lot of
time on them in the near future, I'm afraid. But perhaps
someone else can..
| -----Original Message-----
| From: Ashley Yakeley [mailto:email@example.com]=20
| Sent: 17 May 2002 10:02
| To: GHC List
| Subject: -fallow-overlapping-instances Request
| Currently -fallow-overlapping-instances only allows=20
| overlapping instances=20
| if one is a strict subset of the other. This is good=20
| (determinate), but=20
| sometimes you really need two instances that partially=20
| overlap. It would=20
| be nice if this could be disambiguated simply with another instance=20
| declaration. For instance:
| class C a b;=09
| instance C a ();
| instance C () a;
| instance C () ();
| As you can see, the first two instances partially overlap,=20
| but the third=20
| one disambiguates. I think it would be nice if GHC=20
| -fallow-overlapping-instances allowed this.
| This would take some of the pain out of overlapping instance=20
| Ashley Yakeley, Seattle WA
| Glasgow-haskell-users mailing list=20
| http://www.haskell.org/mailman/listinfo/glasgow-| haskell-users