On Mon, Jun 18, 2012 at 4:09 PM, Roman Leshchinskiy <r...@cse.unsw.edu.au> wrote: > ForeignPtrs can be unpacked, just not manually (which is a GHC bug, IMO, I > should report it): > > data Vector a = Vector {-# UNPACK #-} !Int > {-# UNPACK #-} !(ForeignPtr a) > > ByteString just has some room for optimisation here ;-)
I probably just remembered the ByteString optimization incorrectly. My apologies. I think the Addr# field was moved to the top of ForeignPtr (not to the PS constructor itself) to support unpacking. -- Johan _______________________________________________ Haskell-platform mailing list Haskell-platform@projects.haskell.org http://projects.haskell.org/cgi-bin/mailman/listinfo/haskell-platform