Re: Top level mutable data structures problem

2004-10-22 Thread David Brown
On Fri, Oct 22, 2004 at 05:13:02PM -0700, John Meacham wrote: > > What happens when there are cicular dependencies between modules. Perhaps > > the circular dependency is only because of sharing of types, and there is a > > valid order for the initialization. But, is it easy for the compiler to

Re: Top level mutable data structures problem

2004-10-22 Thread John Meacham
On Thu, Oct 21, 2004 at 12:17:52PM -0700, David Brown wrote: > On Wed, Oct 20, 2004 at 04:38:54PM +0100, Simon Peyton-Jones wrote: > > > * When a program is started, the module initialisation actions of its > > modules run, in an order that respects module dependencies. > > What happens when th

Re: Top level mutable data structures problem

2004-10-21 Thread David Brown
On Wed, Oct 20, 2004 at 04:38:54PM +0100, Simon Peyton-Jones wrote: > * When a program is started, the module initialisation actions of its > modules run, in an order that respects module dependencies. What happens when there are cicular dependencies between modules. Perhaps the circular depen

Re: Top level mutable data structures problem

2004-10-21 Thread David Brown
On Wed, Oct 20, 2004 at 03:46:47PM +0100, Simon Marlow wrote: > 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 te

Re: Top level mutable data structures problem

2004-10-20 Thread Adrian Hey
On Wednesday 20 Oct 2004 4:38 pm, Simon Peyton-Jones wrote: > * "Respecting module dependencies" means that if M imports N (directly >or indirectly) then N's initialisation is done before M's. Hi-boot > recursive >dependencies are not taken into account; that's where any module >loops

Re: Top level mutable data structures problem

2004-10-20 Thread Adrian Hey
On Wednesday 20 Oct 2004 3:46 pm, Simon Marlow wrote: > 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 whethe

Re: Top level mutable data structures problem

2004-10-20 Thread Remi Turk
On Wed, Oct 20, 2004 at 05:54:37PM +0200, Tomasz Zielonka wrote: > On Wed, Oct 20, 2004 at 04:38:54PM +0100, Simon Peyton-Jones wrote: > > b) how much happier your life would be if it were implemented > > Or... How much sadder your life will be if this mechanism will be > abused and overused. Some

Re: Top level mutable data structures problem

2004-10-20 Thread Tomasz Zielonka
On Wed, Oct 20, 2004 at 04:38:54PM +0100, Simon Peyton-Jones wrote: > b) how much happier your life would be if it were implemented Or... How much sadder your life will be if this mechanism will be abused and overused. Someone already noticed that with such and extension main is no longer neccessa

RE: Top level mutable data structures problem

2004-10-20 Thread Simon Peyton-Jones
ife would be if it were implemented Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:glasgow-haskell-users- | [EMAIL PROTECTED] On Behalf Of Simon Marlow | Sent: 20 October 2004 15:47 | To: Adrian Hey; [EMAIL PROTECTED] | Subject: RE: Top level mutable data structures problem |

RE: Top level mutable data structures problem

2004-10-20 Thread Simon Marlow
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 > op