Hi Sigbjorn,

The looping behavior that you describe is an acknowledged problem in
the Hugs documentation: "Derived Read instances do not work for some
infix constructors.  If an infix constructor has left associativity
and the type appears recursively on the left side of the constructor,
then the read instance will loop."

I think this goes back to the definition of derived reads in an earlier
version of the Haskell report, which also had this problem.  I think
that's why they removed that part of the definition in later version!
We couldn't find as simple a way to fix the problem in Hugs at the time,
so we left it, and just documented the shortcoming.  If you (or anyone
else reading this message) can suggest a simple way to fix this, we'd
be happy to incorporate it into the final Hugs 98 release (although the
deadline for that is now very tight).

All the best,
Mark

Reply via email to