Addr# field in ForeignPtr

2011-06-01 Thread Roman Leshchinskiy
to the middle of a memory block. For instance, Storable vectors are currently defined as: data Vector a = Vector {-# UNPACK #-} !(Ptr a) {-# UNPACK #-} !Int {-# UNPACK #-} !(ForeignPtr a) If I could use the Addr# field of the ForeignPtr, I could get rid

Re: Addr# field in ForeignPtr

2011-06-01 Thread Simon Marlow
. data Vector a = Vector {-# UNPACK #-} !(Ptr a) {-# UNPACK #-} !Int {-# UNPACK #-} !(ForeignPtr a) If I could use the Addr# field of the ForeignPtr, I could get rid of the Ptr. Good idea! Cheers, Simon