Hello,

I have a very strange problem that may be due to
a cyclic dependency. If I try to evaluate a 
function which selects a labelled field from a very
large algebraic data structure hugs runs
as long as the memory is exhausted. The strange thing
is that I am sure the field contains the empty list.
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.

After compiling it with ghc-4.01 a segmentation fault was
detected. Hugs is more important for me at the moment, 
therefore the mail to this group.

(1) Can I expect always to get a "blackhole"-message in ghc if 
    the program contains a cyclic dependence? 

(2) Has the "funny global thing" problem solved in a way that algebraic
    data structures of arbitrary size can be handled?

(3) Can I hope to have success with debugging if the entire 
    structure is made hyperstrict? 

(4) The large structure represents a state which was taken from
    a state transformer monad. Was it a bad idea to carry large
    structures outside a monad? I did this because the use of
    monads has led to some errors in the past due to a pseudo-
    imperative style.

Unfortunately, I cannot construct a simple example in which this
problem occurs. Is it possible to give more information about
the health of the hugs process when error is called and maybe to avoid the
sequence shown above?

Thanks in advance
------------------------------------------------------------------------------
 Christoph Herrmann
 E-mail:  [EMAIL PROTECTED]
 WWW:     http://brahms.fmi.uni-passau.de/cl/staff/herrmann.html


Reply via email to