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

GHC 9.14.1 · lts/ghc-9.14.x · 7a6c33e · 2026-10-12

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