-- | Lift an 'IO' action into the 'X' monad.  If the action results in an 'IO'
-- exception, log the exception to stderr and continue normal execution.
catchIO :: MonadIO m => IO () -> m ()
catchIO f = io (f `catch` \(SomeException e) -> hPrint stderr e >> hFlush stderr)
catchIO :: MonadIO m => IO () -> m ()
catchIO f = io (f `catch` \(SomeException e) -> hPrint stderr e >> hFlush stderr)
catchIO f = io (f `catch` \(SomeException e) -> hPrint stderr e >> hFlush stderr)