How to find out GHC's memory representations of data types?
问题 Recently, blog entries such as Computing the Size of a Hashmap explained how to reason about space complexities of commonly used container types. Now I'm facing the question of how to actually "see" which memory layout my GHC version chooses (depending on compile flags and target architecture) for weird data types (constructors) such as data BitVec257 = BitVec257 {-# UNPACK #-} !Word64 {-# UNPACK #-} !Word64 {-# UNPACK #-} !Bool {-# UNPACK #-} !Word64 {-# UNPACK #-} !Word64 data BitVec514 =