
oleg@pobox.com wrote:
Incidentally, Hugs reports the overlapping errors eagerly. It would still complain about the changed code, because the error is with instances rather with their use.
Thankyou for your patience. I think I'm getting what's going on now. The flags that allow undecidable or overlapping instances don't really mean quite what they say for complete programs (I was wondering how they could :-), but actually mean don't reject modules if it cannot be (easily) be proven that that they are decidable and non-overlapping at the time that module is compiled. Instead you may get some kind of error later on (if it turns out the instances really are undecidable or overlapping). Hence the error, despite [] not being an instance of GT. (Hope I've got that right now). Of course the code I posted is a gross over-simplification of the real code I'm trying to compile, and though using these flags seems to work for this simple module I still get errors for my real code, (haven't quite figured out why yet) which made me wonder if I was doing something wrong that required the use of these flags in the first place. I think I'll try the approach you suggested of doing this for individual GT types and see how I get on. Actually this shouldn't be too bad in my case as the intention is to have GT types and the corresponding GT instances generated automatically in the longer term. Thanks -- Adrian Hey