Top level mutable data structures problem

Simon Marlow simonmar at
Wed Oct 20 10:46:47 EDT 2004

On 20 October 2004 14:36, Adrian Hey wrote:

> [Excuse me for moving this discussion to the ghc mailing list,
> but it seems the appropriate place, seeing as ghc is where
> any solution will happen first in all probability.]
> I've noticed that the neither of the two Simons has expressed an
> opinion re. the discussions on this issue that occurred on the
> Haskell mailing list over the weekend. So I'd like to ask what's
> happening (or likely to happen) about this, if anything?

I liked the original idea.  I'm not sure if I agree with the argument
that allowing fully-fledged IO actions in the initialisation of a module
is unsafe.  I agree that it is a little opaque, in the sense that one
can't easily tell whether a particular init action is going to run or

On the other hand, instances currently have the same "problem": you
can't tell what instances are in scope in your module without looking
through the transitive closure of modules you import, including
libraries, which you might not have source code for.

The proposed scheme wouldn't allow forcing an ordering on init actions
between two modules (eg. initialise the network library, then initialise
the HTTP library).

In any case, we're not going to rush to implement anything.  Discuss it
some more ;-)


More information about the Glasgow-haskell-users mailing list