 
 import Foreign.C
 import Foreign.Ptr
-import Foreign.ForeignPtr
+import Foreign.ForeignPtr hiding (newForeignPtr)
+import Foreign.Concurrent (newForeignPtr)
 import Foreign.Storable (Storable)
 
 import qualified Foreign.Storable as F

module Foreign.CUDA.Marshal
  (
    DevicePtr,

    -- ** Dynamic allocation
    free,

withDevicePtr =  withForeignPtr . castForeignPtr

newDevicePtr   :: Ptr a -> IO (DevicePtr a)
newDevicePtr p =  newForeignPtr p (free_ p)
--newDevicePtr p =  (doAutoRelease free_) >>= \f -> newForeignPtr f p

--
-- Memory copy
