Dear all, Thank you very much for your reactions. Neil told me I should have posted this in haskell-cafe, so sorry for the inconvenience. Since my problem has since been solved, I figured I would send this "thanks all, it's solve" e-mail to the list, to close the issue.
The magic answer turned out to be Control.Exception.evaluate as opposed to return. This was the problem: catch (return $ [] !! 0) (error "foo") (which I had oversimplified by omitting the return) gave *** Exception: Prelude.(!!): index too large while catch (evaluate $ [] !! 0) (error "foo") gave *** Exception: bar even when unsafePerformIO was applied to it. Thank you all, but especially the people that suggested this: Martijn & Koen Regards, Philip _______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell