+getPrimRepSizeInBytes CharRep = 4
+getPrimRepSizeInBytes IntRep = wORD_SIZE
+getPrimRepSizeInBytes WordRep = wORD_SIZE
+getPrimRepSizeInBytes AddrRep = wORD_SIZE
+getPrimRepSizeInBytes FloatRep = wORD_SIZE
+getPrimRepSizeInBytes DoubleRep = dOUBLE_SIZE * wORD_SIZE
+getPrimRepSizeInBytes Int8Rep = 1
+getPrimRepSizeInBytes Int16Rep = 2
+getPrimRepSizeInBytes Int32Rep = 4
+getPrimRepSizeInBytes Int64Rep = 8
+getPrimRepSizeInBytes Word8Rep = 1
+getPrimRepSizeInBytes Word16Rep = 2
+getPrimRepSizeInBytes Word32Rep = 4
+getPrimRepSizeInBytes Word64Rep = 8
+getPrimRepSizeInBytes WeakPtrRep = wORD_SIZE
+getPrimRepSizeInBytes ForeignObjRep = wORD_SIZE
+getPrimRepSizeInBytes StablePtrRep = wORD_SIZE
+getPrimRepSizeInBytes StableNameRep = wORD_SIZE
+getPrimRepSizeInBytes ArrayRep = wORD_SIZE
+getPrimRepSizeInBytes ByteArrayRep = wORD_SIZE
+getPrimRepSizeInBytes other = pprPanic "getPrimRepSizeInBytes" (ppr other)
+
+
+-- Sizes in bytes of things when they are array elements,
+-- so that we can generate the correct indexing code
+-- inside the compiler. This is not the same as the above
+-- getPrimRepSizeInBytes, the rationale behind which is
+-- unclear to me.
+getPrimRepArrayElemSize :: PrimRep -> Int
+getPrimRepArrayElemSize PtrRep = wORD_SIZE
+getPrimRepArrayElemSize IntRep = wORD_SIZE
+getPrimRepArrayElemSize WordRep = wORD_SIZE
+getPrimRepArrayElemSize AddrRep = wORD_SIZE
+getPrimRepArrayElemSize StablePtrRep = wORD_SIZE
+getPrimRepArrayElemSize ForeignObjRep = wORD_SIZE
+getPrimRepArrayElemSize Word8Rep = 1
+getPrimRepArrayElemSize Word16Rep = 2
+getPrimRepArrayElemSize Word32Rep = 4
+getPrimRepArrayElemSize Word64Rep = 8
+getPrimRepArrayElemSize Int8Rep = 1
+getPrimRepArrayElemSize Int16Rep = 2
+getPrimRepArrayElemSize Int32Rep = 4
+getPrimRepArrayElemSize Int64Rep = 8
+getPrimRepArrayElemSize FloatRep = 4
+getPrimRepArrayElemSize DoubleRep = 8
+getPrimRepArrayElemSize other = pprPanic "getPrimRepSizeArrayElemSize" (ppr other)