Re: Force single evaluation?

2006-12-18 Thread Malcolm Wallace
"Axel Jantsch" <[EMAIL PROTECTED]> wrote: > I call a C function from a Haskell program. I am using unsafePerformIO > to use it outside a monad. > > Even though the C function does not have any side effect, I absolutely > don't want to evaluate it more than once for performance reasons. But > my

Force single evaluation?

2006-12-18 Thread Axel Jantsch
Hello, I call a C function from a Haskell program. I am using unsafePerformIO to use it outside a monad. Even though the C function does not have any side effect, I absolutely don't want to evaluate it more than once for performance reasons. But my impression is that it is evaluated several tim