| Safe Haskell | None | 
|---|---|
| Language | Haskell2010 | 
Hackage.Security.Util.Checked
Contents
Description
Checked exceptions
Synopsis
- class Throws e
 - unthrow :: forall a e proxy. proxy e -> (Throws e => a) -> a
 - throwChecked :: (Exception e, Throws e) => e -> IO a
 - catchChecked :: forall a e. Exception e => (Throws e => IO a) -> (e -> IO a) -> IO a
 - handleChecked :: Exception e => (e -> IO a) -> (Throws e => IO a) -> IO a
 - tryChecked :: Exception e => (Throws e => IO a) -> IO (Either e a)
 - checkIO :: Throws IOException => IO a -> IO a
 - throwUnchecked :: Exception e => e -> IO a
 - internalError :: String -> IO a
 
Documentation
Base exceptions
catchChecked :: forall a e. Exception e => (Throws e => IO a) -> (e -> IO a) -> IO a Source #
Catch a checked exception
handleChecked :: Exception e => (e -> IO a) -> (Throws e => IO a) -> IO a Source #
catchChecked with the arguments reversed
tryChecked :: Exception e => (Throws e => IO a) -> IO (Either e a) Source #
Like try, but for checked exceptions
throwUnchecked :: Exception e => e -> IO a Source #
Throw an unchecked exception
This is just an alias for throw, but makes it evident that this is a very
 intentional use of an unchecked exception.
internalError :: String -> IO a Source #
Variation on throwUnchecked for internal errors