What does unsafePerformIO do to the stack

Bernd Brassel bbr at informatik.uni-kiel.de
Thu Feb 7 09:08:06 EST 2008

There is another point that makes me wonder now. If the update frame for
the recursive call is the problem then my solution with foreign C
functions would produce a bad stack also. But this is not the case.
The code looks now like this:

sim []     = True
sim (_:xs) = yags (sim xs)

ref = cinitialize

yags x = replace (C_Ref ref) x ()

And it is running within 0.15M of stack.
Did your explanation also account for this phenomenon?

Sorry to take that much time off you with this!

More information about the Glasgow-haskell-users mailing list