On Fri, Nov 20, 2009 at 18:31, Jose Iborra wrote:
This is by design, -fbreak-on-exception breaks on any exception, be it captured or not, even on library code.

Ah, that's what I missed. I would've guessed that it only breaks on uncaught exceptions.
 
I am not sure how readFile is implemented internally, but it probably reads from the file until an eoferror is thrown and then captures it gracefully.

That's what I expect, too. I went fishing, but didn't find the exact spot where that happens within a few minutes.
 
There is another debugger flag, -fbreak-on-error, which only breaks on unhandled exceptions.
Is this what you want ?

Probably. Now I see the difference in [1]. Thanks!

[1] http://www.haskell.org/ghc/docs/latest/html/users_guide/flag-reference.html#interactive-mode-options

Regards,
Sean