darcs-2.12.5: a distributed, interactive, smart revision control system

Safe Haskell | Safe
Language | Haskell2010

Darcs.Util.Exception

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

# Documentation

firstJustIO :: [IO (Maybe a)] -> IO (Maybe a) #

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.

catchall :: IO a -> IO a -> IO a #

clarifyErrors :: IO a -> String -> IO a #

prettyException :: SomeException -> String #

prettyError :: IOError -> String #

die :: String -> IO a #

Terminate the program with an error message.