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

Moduleghc-internal-9.1003.0Haskell2010

GHC.Internal.Foreign.Marshal.Error

Routines for testing return values and raising a userError exception in case of values indicating an error state.

  • 6 values
valuethrowIf
  1. :: (a -> Bool)

    error condition on the result of the IO action

  2. -> (a -> String)

    computes an error message from erroneous results of the IO action

  3. -> IO a

    the IO action to be executed

  4. -> IO a
#

Execute an IO action, throwing a userError if the predicate yields True when applied to the result returned by the IO action. If no exception is raised, return the result of the computation.

valuevoid :: IO a -> IO ()
#

Deprecated. use Control.Monad.void instead

Discard the return value of an IO action