nvvm-0.7.5.2: 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

Enum Status Source #

Get the descriptive message string for the given result code

Eq Status Source # 

Methods

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

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

Show Status Source # 

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