HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

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