HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduleunix-bytestring-0.4.0.1Haskell2010

Foreign.C.Error.Safe

Provides a variant of the Foreign.C.Error API which returns errors explicitly, instead of throwing exceptions.

Since: 0.3.5

  • 9 values

Primitive handlers

3 declarations
valueeitherErrnoIf
  1. :: (a -> Bool)

    Predicate to apply to the result value of the IO operation.

  2. -> IO a

    The IO operation to be executed.

  3. -> IO (Either Errno a)
#

A variant of throwErrnoIf which returns Either instead of throwing an errno error.

Derived handlers

0 declarations

With predicate (-1 ==)

With predicate (nullPtr ==)