[Haskell] Global Variables and IO initializers: A proposal and
semantics
Jules Bean
jules at jellybean.co.uk
Wed Oct 13 02:20:06 EDT 2004
On 12 Oct 2004, at 23:33, John Meacham wrote:
> and via the FFI just a
> foreign import "&global_var" :: Ptr Int
> note that we do not need any foregin code, just an object which
> allocates the space in the bss for global_var, the fact we can access
> and work with such space from haskell, but have no way to allocate it
> is quite telling that there is something missing in the language.
>
Yes, that's weird, isn't it?
>
> The basic idea is that your entire program behaves as if in a giant
> 'mdo' block, ordered in module dependency order.
>
>
I wondered if something like that could work, but I wasn't sure that
mdo allowed recursion in its let-bindings...
Jules
More information about the Haskell
mailing list