 -}
 clEnqueueReadBuffer :: CLCommandQueue -> CLMem -> Bool -> CSize -> CSize 
                        -> Ptr () -> [CLEvent] -> IO (Either CLError CLEvent)
-clEnqueueReadBuffer cq mem check off size dat [] = alloca $ \event -> do
-  errcode <- raw_clEnqueueReadBuffer cq mem (fromBool check) off size dat 0 nullPtr event
-  if errcode == (fromIntegral . fromEnum $ CL_SUCCESS )
-    then fmap Right $ peek event
-    else return . Left . toEnum . fromIntegral $ errcode
-clEnqueueReadBuffer cq mem check off size dat events = allocaArray nevents $ \pevents -> do
-  pokeArray pevents events
-  alloca $ \event -> do
-    errcode <- raw_clEnqueueReadBuffer cq mem (fromBool check) off size dat cnevents pevents event
-    if errcode == (fromIntegral . fromEnum $ CL_SUCCESS )
-      then fmap Right $ peek event
-      else return . Left . toEnum . fromIntegral $ errcode
-    where
-      nevents = length events
-      cnevents = fromIntegral nevents
+clEnqueueReadBuffer cq mem check off size dat = clEnqueue (raw_clEnqueueReadBuffer cq mem (fromBool check) off size dat)
 
 {-| Enqueue commands to write to a buffer object from host memory.Calling
 clEnqueueWriteBuffer to update the latest bits in a region of the buffer object

      props = bitmaskFromFlags xs

-- -----------------------------------------------------------------------------
{-| Enqueue commands to read from a buffer object to host memory. Calling
clEnqueueReadBuffer to read a region of the buffer object with the ptr argument
value set to host_ptr + offset, where host_ptr is a pointer to the memory region

  -- * Memory Commands
  clEnqueueReadBuffer, clEnqueueWriteBuffer,
  -- * Executing Kernels
  clEnqueueNDRangeKernel, clEnqueueTask,
  -- * Flush and Finish
  clFlush, clFinish
  ) where
