[Haskell-cafe] Re: [Haskell] Top Level <-
ganesh at earth.li
Mon Sep 1 18:20:37 EDT 2008
On Mon, 1 Sep 2008, Brandon S. Allbery KF8NH wrote:
> On 2008 Sep 1, at 18:08, Ganesh Sittampalam wrote:
>> On Mon, 1 Sep 2008, John Meacham wrote:
>>> for instance, windows dll's have
>>> the ability to share individual variables across all loadings of said
>>> dll. (for better or worse.)
>> Interesting, is this just within a single process?
> Last I checked, it was across processes; that is, every DLL has its own
> (optional) data segment which is private to the DLL but shared across
> all system-wide loaded instances of the DLL. This actually goes back to
> pre-NT Windows.
Sounds like a recipe for fun :-)
>>> Haskell certainly has more advanced scoping capabilities than other
>>> languages so we need a more refined terminology. I think 'IO scope' is the
>>> more precise term, as it implys the scope is that of the IO monad state.
>>> which may or may not correspond to some external 'process scope'.
>> Hmm, to me that implies that if the IO monad stops and restarts, e.g. when
>> a Haskell library is being called from an external library, then the scope
>> stops and starts again (which I presume is not the intention of <- ?)
> It tells me the flow of execution has temporarily exited the scope of the IO
> monad, but can return to it. The state is suspended, not exited.
In that case we could equally call the things "library scope", as that's
the only scope they're visible in unless exported. Anyway, as long as
we're clear on what it means, the name doesn't really matter.
More information about the Haskell-Cafe