   };
 #endc
 
-
 {-| 
 * 'CLBUILD_PROGRAM_FAILURE', Returned if there is a failure to build the
 program executable.

bitmaskToExecCapability :: CLDeviceExecCapability_ -> [CLDeviceExecCapability]
bitmaskToExecCapability mask = filter (testMask mask . fromIntegral . fromEnum) $ binaryFlags maxBound

-- -----------------------------------------------------------------------------


 * 'CLSUCCESS', Indicates that the function executed successfully.
-}
{#enum CLError {} deriving( Show, Eq ) #}

wrapPError :: (Ptr CLint -> IO a) -> IO (Either CLError a)
wrapPError f = alloca $ \perr -> do
  v <- f perr
  errcode <- peek perr >>= return . toEnum . fromIntegral
  if errcode == CLSUCCESS
    then return $ Right v
    else return $ Left errcode
  
-- -----------------------------------------------------------------------------
#c
enum CLPlatformInfo {
