ghc/ghci version 5.04 under SunOS 5.8

2002-08-01 Thread Christian Maeder
Hi, ghci seems to use a lot of cpu-time without doing something at the prompt. Furthermore ghc -O2 ... still creates binaries that yield a Bus Error with gcc-3.1. Can't that be fixed? Cheers, Christian ___ Glasgow-haskell-bugs mailing list [EMAIL

RE: ghc/ghci version 5.04 under SunOS 5.8

2002-08-01 Thread Simon Marlow
ghci seems to use a lot of cpu-time without doing something at the prompt. Hmmm, you're right. I hadn't noticed that. I'll look into it for 5.04.1. Furthermore ghc -O2 ... still creates binaries that yield a Bus Error with gcc-3.1. Can't that be fixed? It has already been fixed, and

orphan modules

2002-08-01 Thread Hal Daume III
in the ghc docs, section 4.9.8, it says You can identify an orphan module by looking in its interface file, M.hi. If there is a ``!'' on the first line, GHC considers it an orphan module. which i don't think is true anymore since .hi files are binary now... -- Hal Daume III Computer science

how to catch GHC no threads to run exception?

2002-08-01 Thread paul
My program runs 3 threads, and after a few minutes' execution all threads come to a state that they all wait on some MVars, then the program halts with an error: test: no threads to run: infinite loop or deadlock? (test is my program name) My problem is that this behavior is actually desired,

Re: how to catch GHC no threads to run exception?

2002-08-01 Thread Volker Stolz
In local.haskell, you wrote: test: no threads to run: infinite loop or deadlock? My problem is that this behavior is actually desired, but how do I catch this exception and do some bookkeeping (closing external IO, etc.) and then a proper exit? You can wrap the `takeMVar' with

Re: monads, modules, sandboxes

2002-08-01 Thread Alastair Reid
Richard Uhtenwoldt [EMAIL PROTECTED] writes: Similar ideas are already in circulation --since the 70s in the research OS community in fact-- but dressed not in the guise of the monad but rather in the guise of something called a capability as in capability OSes like GNOSSIS, KeyKOS,

can't write instance Storable

2002-08-01 Thread Hal Daume III
Okay, I'm dumb and can't figure this out. I'm migrating hMPI from GHC 4.08 to GHC 5.04 (fun fun) and am having trouble writing an instance of Storable. The relevant information is: import Foreign.Storable type MPI_Rank_Type = Int newtype MPI_Rank = MPI_Rank MPI_Rank_Type deriving (Eq)

idiom for different implementations of same idea

2002-08-01 Thread Hal Daume III
Hi all, I'm looking for some advice on what's the cleanest way to implement something. The basic idea is that I have a task to solve, T. There are many steps to solving this task, but they can be broken down into a small list of elementary steps: - prepareData - initialize - doThingOne

Re: idiom for different implementations of same idea

2002-08-01 Thread Dylan Thurston
On Thu, Aug 01, 2002 at 02:34:00PM -0700, Hal Daume III wrote: ... Now, I want in my executable my user to be able to say -model=0 and so on in the command line and for it to use the appropriate model. Each of these models will go in a separate module. One way to do this would be to

Re: idiom for different implementations of same idea

2002-08-01 Thread Hal Daume III
One way to do this would be to import all of the models qualified and then if they choose Model0, pass to the go function Model0.prepareData, Model0.initialize, etc. This is fine, simple, good. But it doesn't enforce at all the types of the functions. I don't understand what you mean

idiom for different implementations of same idea

2002-08-01 Thread Tom Pledger
Hal Daume III writes: | Hi all, | | I'm looking for some advice on what's the cleanest way to implement | something. : | where the main driver does something like: | | prepareData | initialize | iterate until converged | doThingOne | doThingTwo | getResults | |

Re: idiom for different implementations of same idea

2002-08-01 Thread Dr. Harald Holtmann
Hal Daume III writes: Hi all, I'm looking for some advice on what's the cleanest way to implement something. The basic idea is that I have a task to solve, T. There are many steps to solving this task, but they can be broken down into a small list of elementary steps: - prepareData

Re: slightly ot: data structure question

2002-08-01 Thread Andrew J Bromage
G'day all. On Mon, Jul 29, 2002 at 02:50:55PM -0700, Hal Daume III wrote: I need a data structure which is a map from Ints to Doubles; the distribution of the Ints is in the range say 0-2 and a map will contain somewhere around 100-200 elements. I need to be able to query *very*

Re: can't write instance Storable

2002-08-01 Thread Fergus Henderson
On 01-Aug-2002, Hal Daume III [EMAIL PROTECTED] wrote: Okay, I'm dumb and can't figure this out. I'm migrating hMPI from GHC 4.08 to GHC 5.04 (fun fun) and am having trouble writing an instance of Storable. The relevant information is: import Foreign.Storable type MPI_Rank_Type = Int

Re: how to catch GHC no threads to run exception?

2002-08-01 Thread paul
On Thu, Aug 01, 2002 at 11:27:06AM +0200, Volker Stolz wrote: In local.haskell, you wrote: test: no threads to run: infinite loop or deadlock? My problem is that this behavior is actually desired, but how do I catch this exception and do some bookkeeping (closing external IO, etc.) and