False "duplicate or overlapping instances" message

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Thu Oct 26 15:24:21 EDT 2000


Thu, 26 Oct 2000 01:29:38 -0700, Simon Peyton-Jones <simonpj at microsoft.com> pisze:

> a') when trying to solve a constraint, search for all solutions,
> and check that in the end there is only one.
> 
> b') never comlain of overlap when declaring instance declarations;
> instead only complain when solving constraints.

I am worried if the following scenario is possible: There are
two modules. Everything is OK. Now one of them adds an innocent
instance. It is perfectly correct in its context, but it happens that
it triggers an ambiguity in the second module. Still neither module
itself is at fault.

Something like this can even happen now: when they define overlapping
instances. Maybe after this "fix" some of these cases won't trigger
errors immediately, but at some unexpected point in the future,
long after these modules were committed as good?

I don't have a concrete case in mind...

-- 
 __("<  Marcin Kowalczyk * qrczak at knm.org.pl http://qrczak.ids.net.pl/
 \__/
  ^^                      SYGNATURA ZASTÊPCZA
QRCZAK





More information about the Glasgow-haskell-bugs mailing list