
2 Feb
2008
2 Feb
'08
3:03 p.m.
On Sat, Feb 2, 2008 at 11:30 AM, Yitzchak Gale
Alexander Dunlap wrote:
For instances where an exception would be too intrusive, I don't see how it would be too hard to write a wrapper function
In a library that does not have direct access to the IO monad, it would be not just hard - it would be impossible. That is because of type restrictions in the current versions of catch, block, and friends.
You haven't said why something like the following would not be sufficient: readHistoryM :: MonadIO m => String -> m Bool readHistoryM file = liftIO $ do result <- try (readHistory file) return (result == Right ()) -Judah