Re: crash in profiling mode

2002-10-30 Thread Janis Voigtlaender
Simon Marlow wrote: I have a problem with profiling using a freshly installed GHC 5.04 under Solaris. With the following program crash.lhs: Please install 5.04.1 instead, I believe this bug was fixed. Thanks, that indeed solved the problem. Another question: The profiling mode of

Re: Optimisation and unsafePerformIO

2002-10-30 Thread David Sabel
- Original Message - From: Albert Lai [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, October 30, 2002 7:35 AM Subject: Re: Optimisation and unsafePerformIO David Sabel [EMAIL PROTECTED] writes: {-# NOINLINE b #-} b x = if even x then unsafePerformIO getChar else

RE: crash in profiling mode

2002-10-30 Thread Simon Marlow
Another question: The profiling mode of GHC-4.08.2 did also output (in mode +RTS -p) the time spent on garbage collection (as an additional percentage of overall running time). With the programs I tested so far under GHC-5.04.1, I never saw such an indication in a.out.prof, although for the

RE: FFI C++

2002-10-30 Thread Simon Marlow
I am currently trying to create a Haskell interface to a C++ library and cannot get it to work completely. The problem seems to be that the linker must be able to find the code for basic C++ constructs like new and throw. Apparently it is able to do so when compiling an executable, but

RE: compiling big files?

2002-10-30 Thread Simon Marlow
I have occasional problems getting ghc-5.04.1 to compile a very large source file with -O switched on. The source file is generated by another tool, and is rather large at 25762 lines (2776340 bytes). Without -O, the compilation goes normally, taking about 10 minutes or so. With -O,

RE: FFI C++

2002-10-30 Thread Seth Kurtzberg
What is the O/S and compiler? That the C++ new operator is not found is very strange. Throw is another story, as throw doesn't appear in the compiled code with some compilers. On Wed, 2002-10-30 at 04:18, Simon Marlow wrote: I am currently trying to create a Haskell interface to a C++

RE: FFI C++

2002-10-30 Thread Niklas Sörensson
On 30 Oct 2002, Seth Kurtzberg wrote: What is the O/S and compiler? That the C++ new operator is not found is very strange. Throw is another story, as throw doesn't appear in the compiled code with some compilers. We run Solaris + gcc 2.95.3. The exact error message looks like this:

Re: FFI C++

2002-10-30 Thread Wolfgang Thaller
Many platforms have the C++ runtime and the C++ standard library as a static library (probably because the C++ ABI is not as stable as it should be...). I think this applies to both Mac OS and to Windows [mingw32], perhaps it's the same with Solaris. If that is the case, it would explain the

Re: FFI C++

2002-10-30 Thread Seth Kurtzberg
Wolfgang, On Solaris, you can build GNU C++ either way; that is, to use shared libraries or linked libraries. (In fact you can also build it to enable both, and select one or the other at link time.) So, this is certainly worth checking. The easiest way to check it is to run ldd -r on the

Concurrency and interactive input

2002-10-30 Thread Walker Duhon
Hello, I am playing around with concurrency using ghc 5.02.2. What Id like to do is have a bunch of threads do something indefinitely, while one thread monitors stdin for user input (the user input affects the behavior of the other threads in some way). From the documentation I had