RE: -fallow-overlapping-instances Request

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.. Simon | -----Original Message----- | From: Ashley Yakeley [mailto:ashley@semantic.org] | Sent: 17 May 2002 10:02 | To: GHC List | Subject: -fallow-overlapping-instances Request | | | Currently -fallow-overlapping-instances only allows | overlapping instances | if one is a strict subset of the other. This is good | (determinate), but | sometimes you really need two instances that partially | overlap. It would | be nice if this could be disambiguated simply with another instance | declaration. For instance: | | class C a b; | instance C a (); | instance C () a; | instance C () (); | | As you can see, the first two instances partially overlap, | but the third | one disambiguates. I think it would be nice if GHC | -fallow-overlapping-instances allowed this. | | This would take some of the pain out of overlapping instance | resolution... | | -- | Ashley Yakeley, Seattle WA | | _______________________________________________ | Glasgow-haskell-users mailing list | Glasgow-haskell-users@haskell.org | http://www.haskell.org/mailman/listinfo/glasgow-| haskell-users |
participants (1)
-
Simon Peyton-Jones