HORIZON HASKELLDocslts/ghc-9.14.x45dd5372026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 45dd537 · 2026-10-11

Moduleunix-bytestring-0.4.0.4Haskell2010

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 ==)