Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- firstJustIO :: [IO (Maybe a)] -> IO (Maybe a)
- catchall :: IO a -> IO a -> IO a
- clarifyErrors :: IO a -> String -> IO a
- prettyException :: SomeException -> String
- prettyError :: IOError -> String
- die :: String -> IO a
- handleOnly :: Exception e => (e -> Bool) -> IO a -> IO a -> IO a
- handleOnlyIOError :: IO a -> IO a -> IO a
- catchDoesNotExistError :: IO a -> IO a -> IO a
- handleDoesNotExistError :: IO a -> IO a -> IO a
- ifIOError :: a -> IO a -> IO a
- ifDoesNotExistError :: a -> IO a -> IO a
Documentation
firstJustIO :: [IO (Maybe a)] -> IO (Maybe a) Source #
The firstJustIO is a slight modification to firstJustM: the entries in the list must be IO monad operations and the firstJustIO will silently turn any monad call that throws an exception into Nothing, basically causing it to be ignored.
prettyError :: IOError -> String Source #
handleOnly :: Exception e => (e -> Bool) -> IO a -> IO a -> IO a Source #
Handle only a those exceptions for which the predicate succeeds.