On 8/5/06, Frederik Eaton <[EMAIL PROTECTED]> wrote:
Also, note that my proposal differs in that thread local variables are
not writable, but can only be changed by calling (e.g. in my API)
'withIOParam'.
[snip]
and if some library I use decides
to fork a thread behind the scenes, it won't change my program's
behavior.

Yes, but if it passes your action to another pre-existing thread, it will.

What people seem to want is dynamic scoping. Why not implement that
instead of messing around with yucky thread stuff?

data IODynamicRef a

getDynamicRef :: IODynamicRef a -> IO a
setDynamicRef :: IODynamicRef a -> a -> IO b -> IO b

--
Taral <[EMAIL PROTECTED]>
"You can't prove anything."
   -- Gödel's Incompetence Theorem
_______________________________________________
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to