[Haskell-cafe] ACIO versus Execution Contexts

Benjamin Franksen benjamin.franksen at bessy.de
Tue Nov 30 16:19:00 EST 2004


On Tuesday 30 November 2004 11:41, Adrian Hey wrote:
> In particular, the purpose of top level <- bindings IMO is *not* to
> provide "global variables" (though they could be abused this way).
> ...
> If you consider the example..
>
>  userInit <- oneShot realInit
>
> ..the top level MVar created is not global. It doesn't even scope over
> an entire module, it's buried in a closure. 
> ...
> Even when you do have top level IORefs (or 
> more complex mutable data structures) scoping over an entire module,

I don't get it: How can they be top-level without scoping over an entire 
module? I mean, the proposal was to have

x <- action

at the top-level, right? Then how can it not be visible in the whole module? 
What scope *does* it have, in your opinion?

Ben


More information about the Haskell-Cafe mailing list