Re: Trivial Haskell Concurrency problem

2000-02-15 Thread Wolfram Kahl
Simon Peyton-Jones [EMAIL PROTECTED] writes: | elegant. If MVar's were instances of Ord as well as Eq, a | neat solution would | be to always get the least MVar first, but they aren't. So | what should one do? But you could make Flag an instance of Ord data Flag =

Re: Trivial Haskell Concurrency problem

2000-02-15 Thread Marcin 'Qrczak' Kowalczyk
Tue, 15 Feb 2000 11:20:45 +0100, George Russell [EMAIL PROTECTED] pisze: In this case it could be filled by having a supply of guaranteed distinct elements from a linear order, which doesn't have to require a central dispatch centre. (For example, you could allocate them on each processor

Re: Trivial Haskell Concurrency problem

2000-02-15 Thread George Russell
Marcin 'Qrczak' Kowalczyk wrote: If the IO monad can maintain a random number generator, it can as well mainain unique Integer supply. The interface is clean. It can, but according to the current specification, it doesn't. Maybe it should. I think Integer is a little too specific - how about

Re: Trivial Haskell Concurrency problem

2000-02-15 Thread Michael Hobbs
George Russell wrote: Does the phrase "Dining Philosophers Problem" ring a bell with anyone? And AFAIK, the existing solutions to that problem requires a knowledge of who all the philosophers are and what they are attempting to do. That gets back to the issue of having a global value that

Re: Trivial Haskell Concurrency problem

2000-02-15 Thread Marcin 'Qrczak' Kowalczyk
Tue, 15 Feb 2000 14:14:09 +0100, George Russell [EMAIL PROTECTED] pisze: I think Integer is a little too specific - how about type Unique implements (Ord,Eq) newUnique:: IO Unique Somebody may want to generate unique idenifiers or unique values of another concrete type. The requirement

Re: Trivial Haskell Concurrency problem

2000-02-15 Thread Tom Pledger
Hi. George Russell writes: I _think_ your (Tom Pledger's) solution can deadlock. Suppose we have two simultaneous calls to lowerFlags (call 1) lowerFlags f1 f2 (call 2) lowerFlags f2 f1 Then we have (initially f1 and f2 are both Up) Call 1 Call

Re: Trivial Haskell Concurrency problem

2000-02-15 Thread Marcin 'Qrczak' Kowalczyk
Tue, 15 Feb 2000 18:57:51 +0100, George Russell [EMAIL PROTECTED] pisze: The requirement could be even stronger, that the integers are increasing, so one can compare relative time of IO events without Absolutely not. If you have 5000 processors, how are they to work out which one did an

Latest GHC (binary distr) and Suse 6.3 linux

2000-02-15 Thread Laszlo Nemeth
Hi, Sorry to bother the list with a purely installation problem, but I downloaded the latest i386-unknown-linux binary, plus happy-1.6 and can't get them run. It installs properly, but when I start the binaries it reports libgmp.so.2: ELF file's phentsize not the expected size libgmp is from

Re: Trivial Haskell Concurrency problem

2000-02-15 Thread Wolfram Kahl
Simon Peyton-Jones [EMAIL PROTECTED] answers my question: | This is something that I have long been wondering about | (perhaps it is just because of my ignorance): | Wouldn't stable pointers be a cheaper and more appropriate means | to get Ord for MVars, STRefs, and IORefs? Could