Interesting non-terminating behaviour for recursive classes

Simon Peyton-Jones simonpj at microsoft.com
Mon Dec 6 06:00:14 EST 2004


Excellent point.   Turned out to be a bug in the constraint solver,
which I have fixed.  I've added your programs as tests.  

Now you can do your truly cool application

Thanks for a clear bug report.

Simon

| -----Original Message-----
| From: Ralf Laemmel [mailto:Ralf.Laemmel at cwi.nl]
| Sent: 01 December 2004 23:49
| To: glasgow-haskell-bugs at haskell.org
| Cc: Simon Peyton-Jones
| Subject: Interesting non-terminating behaviour for recursive classes
| 
| Hi Simon and others,
| 
| this is an interesting feature.
| The three attached files are largely the same.
| They don't do too weird stuff except a little bit
| instance-constraint-level recursion among classes.
| (and some use of undecidable instances ...)
| 
| (There are embedded comments in the files.)
| 
| (I used GHC HEAD as of now.)
| 
| LoopOfTheDay1.hs really works great.
| I was surprised that this works (because hugs' type checker
| encounters cut-off limit, likewise for GHC 6.2).
| But GHC HEAD seems to try harder in the area of termination checking
for
| instance compilation and instance selection.
| 
| LoopOfTheDay2.hs does a very minor variation,
| but type checking does not terminate anymore.
| To me this looks like a real bug.
| (Yes, I have enabled undecidable instances but the variation
| point does not introduce any challenge whatsoever as far as I can
see.)
| 
| LoopOfTheDay3.hs again does a minor variation.
| Type checking the set of classes and instances works again,
| but trying to use the classes leads to non-terminating instance
selection.
| 
| I have a truly cool application for this in case it can be made work
| more generally.
| 
| Thanks for looking into it!
| Regards,
| Ralf




More information about the Glasgow-haskell-bugs mailing list