Hi Christoph,
I can't answer your detailed questions, but I can confirm one thing
and offer a suggestion.
| Then, in order to find the bug I just tried to print the
| entire structure using the error function and I got the
| following sequence of messages:
| Program error:
| Program error:
| Program error:
| Program error:
| etc.
|
| Usually, one would expect a single error message.
This kind of thing happens when an error occurs while Hugs is trying
to evaluate the string argument passed to error. The simplest way to
duplicate the behaviour you describe is to evaluate
x where x = error x
at the Hugs prompt. In your case, the error suggests that the data
structure you are trying to print contains some undefined components.
You might find that you can get a little further in tracking down
the problem by using Hugs' own printer (rather than show) and by
asking it to be a bit more forgiving about errors). In more concrete
terms, try the following:
:set -uf
If I do this and then execute the example above, I get a different
output:
Prelude> x where x = error x
{error (error (error (error (error (error (error (error (error (error
(error (error (error (error (error (error (error (error (error (error
(error (error (error (error (error (error (error (error (error (error
(error (error (error ...
Ok, so it still goes on rather a long time(:-), but you do get to see
a bit more about what is going on.
Hope this helps!
Mark