| Copyright | [2016..2023] Trevor L. McDonell |
|---|---|
| License | BSD |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Foreign.NVVM.Error
Description
Error handling
Synopsis
- data Status
- describe :: Status -> String
- resultIfOk :: (Status, a) -> IO a
- nothingIfOk :: Status -> IO ()
- checkStatus :: CInt -> IO ()
- nvvmError :: String -> a
- nvvmErrorIO :: String -> IO a
- requireSDK :: Name -> Double -> a
Documentation
NVVM API function return code
Constructors
| Success | |
| OutOfMemory | |
| ProgramCreationFailure | |
| IRVersionMismatch | |
| InvalidInput | |
| InvalidProgram | |
| InvalidIR | |
| InvalidOption | |
| NoModuleInProgram | |
| CompilationFailure |
resultIfOk :: (Status, a) -> IO a Source #
Return the result of a function on successful execution, otherwise throw an exception.
nothingIfOk :: Status -> IO () Source #
Throw an exception on an unsuccessful return code
checkStatus :: CInt -> IO () Source #
nvvmError :: String -> a Source #
Throw an exception. Exceptions may be thrown from pure code, but can only
be caught in the IO monad.
requireSDK :: Name -> Double -> a Source #
A specially formatted error message