[Haskell-cafe] global variables
wnoise at ofb.net
Thu May 24 16:04:18 EDT 2007
On 2007-05-24, David House wrote:
> On 24/05/07, Adrian Hey <ahey at iee.org> wrote:
>> Or even at compile time (which is why I think it's reasonable to
>> regard operations like newIORef etc.. as not really being "IO"
>> operations at all).
> You can allocate heap space at compile time? (Well, I guess you could,
> but that wouldn't still be usable at run time...) I imagine newIORef
> as mallocing() some room, then returning a pointer to that memory.
> That doesn't seem like something that could be done at compile time.
You can allocate bss or data space at compile time for the executable
you are compiling. (Well, if you read compile as compile and link.
It's a bit fuzzy.)
More information about the Haskell-prime