| > Please no, no, no!  If Josef had been using the September release,
| > then he wouldn't have had a problem, and I dare say that the same
| > goes for your examples too John.  This issue was specifically
| > addressed in that release.  So please try your examples with that
| > release ... if the problems persist, then you should let us know.
| > But I doubt that you'll see them again.
| > 
| I finally got hold of an installation of the September release and it
| behaves in the exact same way. 

For those of you who don't have the context to understand what Josef's
message is about, he's complaining that he had to increase the value of
Hugs cutoff limit using the -c flag before Hugs would generate a derived
Show instance.  A few other people have reported similar problems in the
past couple of days.

As it happens, increasing the value of the -c flag is *absolutely* the
wrong thing to do.  Well it probably won't hurt too bad really, but the
same value is used elsewhere in Hugs, so if you make it artificially
high, then you will suffer, potentially, in other places.  The best
approach instead is to fix Hugs so that it is more careful, in this
particular case, about flagging an error.

I looked into this and submitted a patch to fix it and several other
bugs that had been reported in an internal version of Hugs.  My message,
dated September 1, is attached below.  I'd assumed that these patches
had made their way into the September release, but now I download a
copy, and find that they did not.

So the problems reported do indeed still exist in the current
distribution, but will hopefully be fixed in the next release.
(Remember, I'm not the maintainer, so I can't guarantee it.)

| I'm still curious about the hint in the errormessage that the problem
| might be undecidable. Can you comment on that?

You might get a better understanding of this if you try to find a value
for the cutoff parameter that will allow the following program to load:

  newtype Fix f = In (f (Fix f))
   deriving Show

  newtype Nat = MkNat (Fix Maybe)
   deriving Show

(Hugs limits the -c value to a maximum of 1024, but that should be enough
to persuade you ...)

Actually, you can take this further and find a bug that somebody else will
have to fix.  I'll post separately about that.

All the best,
Mark


The attached diffs are to fix the following bugs in the 990727 version
of Hugs:

  Reported by    Description
  ----------------------------------------------------------------------
  Various        cutoff value for -c option seems too low.
  Andy           weirdness with :i C if C is a zero parameter class.
  Ross Paterson  Problem with rank 2 parameters and "Showable" class.
  Jeff           Stronger static checking on instances for classes with
                 functional dependencies.

Will these be the last lines of C code that I write for Hugs?  :-)

All the best,
Mark

diffs-990727-to-990901.dat



Reply via email to