
  -- | obtain pointer to the underlying data if applicable
  array'data'ptr ::
    forall m r.
    (MonadPlus m) =>
    f a ->
    (Storable a => ForeignPtr a -> m r) ->
    m r

data DeviceArray a = (Storable a, EdhXchg a, Typeable a) =>
  DeviceArray
  { device'array'cap :: !Int,
    device'array'ref :: !(ForeignPtr a)