module Utils where import Control.Exception (ArithException, ArrayException, SomeException) import qualified Control.Monad.Catch as C catchArithException :: C.MonadCatch m => m a -> (ArithException -> m a) -> m a catchArithException = C.catch catchArrayException :: C.MonadCatch m => m a -> (ArrayException -> m a) -> m a catchArrayException = C.catch catchSomeException :: C.MonadCatch m => m a -> (SomeException -> m a) -> m a catchSomeException = C.catch