
You return the handle in the state, are you saying the complex funtion does some IO on the handle first? I don't see why this excludes doing it the other way round, passing the work function to your complex function as an argument. Keean Peter Simons wrote:
Keean Schupke writes:
The _result_ of a rather complex computation
return a function that returns the handle.
The idea is good. :-) You'll find my other posting explains that a bit more: My main driver doesn't know about the handle; that's just one more entry in the state of the connection handler. So the connection handler cannot return a complex function, because _it_ is the one who wants to use the handle, not the function that called it. What I return is a state which contains the handle, not the handle per se.
Peter
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe