[Haskell] Re: threading mutable state through callbacks

2004-10-07 Thread Jules Bean
[snip oleg's paper which looks interesting, and which I will read] On 8 Oct 2004, at 02:44, [EMAIL PROTECTED] wrote: The example is writing JNI functions in Haskell. Incidentally, the example illustrates passing of the implicit state (JNIEnv pointer) _around_ the exception handler. The problem is t

[Haskell] Re: threading mutable state through callbacks

2004-10-07 Thread oleg
Jules Bean wrote: > Unfortunately, it's not going to work. It's not going to work because > some of the procedures take callbacks, and the callbacks are values of > type IO (). I can see two solutions to this: > > a) revert to using an IORef, and use lexical scoping to define my > callbacks in a l