Extract the heap representation of Haskell values and thunks