Re: [Haskell-cafe] Printing of asynchronous exceptions to stderr

2010-11-11 Thread Mitar
Hi! On Wed, Nov 10, 2010 at 4:48 PM, Simon Marlow wrote: > You can use maskUninterruptible in GHC 7, but that is not generally > recommended, Maybe there should be some function like maskUninterruptibleExceptUser which would mask everything except UserInterrupt exception. Or maybe UserInterrupt

Re: Odd behavior of ncurses with -threaded

2010-11-11 Thread Donn Cave
Quoth Simon Hengel , >> > ghc --make -threaded -lcurses Main.hs >> >> I bet, if you switch off the barrage of thread scheduling SIGALRMs, >> +RTS -V0 -RTS , it will work like it's supposed to. > > That helped, thanks! Great, but, beware - I am not fully informed on what it does, beyond the

Re: Odd behavior of ncurses with -threaded

2010-11-11 Thread Bryan O'Sullivan
On Thu, Nov 11, 2010 at 2:32 PM, Edward Z. Yang wrote: > I was under the impression we fixed this: > >http://hackage.haskell.org/trac/ghc/ticket/850 > > That is, we should be using SIGVTALRM, not SIGALRM, these days, except > under certain conditions when your operating system doesn't support

Re: Odd behavior of ncurses with -threaded

2010-11-11 Thread Edward Z. Yang
Excerpts from Donn Cave's message of Thu Nov 11 17:07:20 -0500 2010: > > ghc: 6.12.1 > > linux: 2.6.32 > > ncurses: 5.7 > > Someone probably should. It's tempting to conclude that the bug > is in ncurses, and perhaps it is, and maybe there's nothing to be > done about it anyway, but a langu

Re: Odd behavior of ncurses with -threaded

2010-11-11 Thread Simon Hengel
> > ghc --make -threaded -lcurses Main.hs > > I bet, if you switch off the barrage of thread scheduling SIGALRMs, > +RTS -V0 -RTS , it will work like it's supposed to. That helped, thanks! Cheers, Simon ___ Glasgow-haskell-users mailing list Glas

Re: Odd behavior of ncurses with -threaded

2010-11-11 Thread Donn Cave
Quoth Simon Hengel , ... > This works just fine if I do not use the threaded RTS, say: > > ghc --make -lcurses Main.hs > > However, with > > ghc --make -threaded -lcurses Main.hs I bet, if you switch off the barrage of thread scheduling SIGALRMs, +RTS -V0 -RTS , it will work like it's su

Odd behavior of ncurses with -threaded

2010-11-11 Thread Simon Hengel
Hello, the following program should wait 3 seconds for user input before. If now user input occurs within that time, it just prints -1. {-# LANGUAGE ForeignFunctionInterface #-} module Main where import Foreign import Foreign.C.String import Foreign.C.Types import Foreign

Re: Signal handler scheduling on single-threaded RTS

2010-11-11 Thread Edward Z. Yang
Relatedly, it seems that it takes a nontrivial amount of time for the multithreaded RTS to "realize" that a thread has emitted a signal. I wonder if there's a more direct way an FFI call can say "when I get back to Haskell, immediately start propagating an exception." Edward _

Re: [Glasgow-haskell-users] os x 64-bit?

2010-11-11 Thread Gregory Wright
Hi John, I'll take a look at trac #2965. You should be able to build the 7.0.1-rc2 tarball simply by unpacking it and following the instructions in the README. (In short, configure, make then make install ought to work.) If it doesn't build properly out of the box, I'd be interested in he

Re: [Glasgow-haskell-users] os x 64-bit?

2010-11-11 Thread Simon Marlow
On 11/11/2010 11:17, John Lato wrote: Hi Greg, Thanks very much for all your work on this, and Barney Stratford too. This is great news. I'm doing a lot of numerical work with Doubles at the moment, so progress is quite welcome! FYI, GHC 7.0.1 has -msse2 which makes floating-point arithmeti

Re: [Glasgow-haskell-users] os x 64-bit?

2010-11-11 Thread John Lato
Hi Greg, Thanks very much for all your work on this, and Barney Stratford too. This is great news. I'm doing a lot of numerical work with Doubles at the moment, so progress is quite welcome! I can try building 7.0.1-RC using a 32-bit 6.12.3, although probably not until the weekend. I'll let yo

Re: [Haskell-cafe] Printing of asynchronous exceptions to stderr

2010-11-11 Thread Simon Marlow
On 10/11/2010 17:52, Mitar wrote: Hi! On Wed, Nov 10, 2010 at 4:16 PM, Simon Marlow wrote: The right way to fix it is like this: Optimist. ;-) let run = unblock doSomething `catches` [ Handler (\(_ :: MyTerminateException) -> return ()), Handler (\(e :: S