Adrian Hey wrote:

If userInit is exported, it could reasonably be described as "global",
but this doesn't matter because as far as users are concerned it's just
a perfectly ordinary side-effectful, state manipulating IO function that
works it's magic by unknown means. There's no reason for them to know
or care that the some of the state it manipulates is top-level Haskell
state rather than "real world" state,

I suppose you are right... After all I can always produce a replacement
for the MVar library that includes the indirection I want...

and there's no possibility of
anybody getting at the underlying MVar and accidently corrupting it.
The only way it can be got at is by executing userInit.


Keean.
_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to