On Sun, May 02, 2010 at 12:10:23AM +0200, Sebastian Fischer wrote:
>
> although,  don't_launch_first  is a non-terminating computation. Without 
> black-hole detection this code would never 'launch missiles'.
>
> Is the above output intended?

Yes.

>     go_ahead :: SomeException -> IO ()
>     go_ahead _ = putStr "go ahead, "

Note that catching all exceptions is rarely the right thing to do. See
    
http://www.haskell.org/ghc/docs/6.12.2/html/libraries/base-4.2.0.1/Control-Exception.html#4
for more details.

> The idea behind black-hole detection is that one bottom is as good as  
> another [1]. Consequently, exception handling may not distinguish  
> between non-termination and other errors.

Pure code can't distinguish, but exception handling code in IO can.


Thanks
Ian

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

Reply via email to