doesDirectoryExist always returns False on Mac OS X

2010-12-01 Thread Yitzchak Gale
Just after upgrading some basic packages from
Hackage, doesDirectoryExist began always returning
False. I suspect that this is related to the unix
package, and/or its strange interaction with the
directory package. See:

http://hackage.haskell.org/trac/ghc/ticket/4812

Thanks,
Yitz

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


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

2010-12-01 Thread Simon Marlow

On 01/12/2010 03:02, Mitar wrote:

Hi!

On Thu, Nov 18, 2010 at 2:19 PM, Simon Marlow  wrote:

then it isn't uninterruptible, because the timeout can interrupt it.  If you
can tolerate a timeout exception, then you can tolerate other kinds of async
exception too.


Yes, but semantics are different. I want to tolerate some exception
because they are saying I should do this and this (for example user
interrupt, or timeout) but I do not want others, which somebody else
maybe created and I do not want to care about them.


Surely if you don't care about these other exceptions, then the right 
thing to do is just to propagate them?  Why can't they be dealt with in 
the same way as user interrupt?





My main question is then, why do you want to use maskUninterruptible rather
than just mask?  Can you give a concrete example?


I have written few of them. As I said: timeout and user exceptions.
Timeout is for interrupts with which me as a programmer want to limit
otherwise uninterruptible code, and user exceptions so that users can
limit otherwise uninterruptible code.

But in meanwhile I have find an elegant way to solve my problems (very
old one in fact). ;-)

I have defined such function:

uninterruptible :: IO a ->  IO a
uninterruptible a = *CENSORED*


That is a very scary function indeed.  It just discards all exceptions 
and re-starts the operation.  I definitely do not condone its use.


Cheers,
Simon

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users