nvvm-0.10.0.0: FFI bindings to NVVM
Copyright[2016] Trevor L. McDonell
LicenseBSD
Safe HaskellNone
LanguageHaskell2010

Foreign.NVVM.Error

Description

Error handling

Synopsis

Documentation

data Status Source #

NVVM API function return code

Instances

Instances details
Enum Status Source #

Get the descriptive message string for the given result code

Instance details

Defined in Foreign.NVVM.Error

Eq Status Source # 
Instance details

Defined in Foreign.NVVM.Error

Methods

(==) :: Status -> Status -> Bool #

(/=) :: Status -> Status -> Bool #

Show Status Source # 
Instance details

Defined in Foreign.NVVM.Error

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

nvvmError :: String -> a Source #

Throw an exception. Exceptions may be thrown from pure code, but can only be caught in the IO monad.

nvvmErrorIO :: String -> IO a Source #

Raise an NVVM exception in the IO monad

requireSDK :: Name -> Double -> a Source #

A specially formatted error message