-#define CHAR_SIZE_IN_BYTES 1
-#define ADDR_SIZE_IN_BYTES SIZEOF_VOID_P
-#define INT_SIZE_IN_BYTES SIZEOF_LONG
-#define WORD_SIZE_IN_BYTES SIZEOF_LONG
+/* Sizes of Haskell types follow. These sizes correspond to:
+ * - the number of bytes in the primitive type (eg. Int#)
+ * - the number of bytes in the external representation (eg. HsInt)
+ * - the scale offset used by writeFooOffAddr#
+ *
+ * In the heap, the type may take up more space: eg. SIZEOF_INT8 == 1,
+ * but it takes up SIZEOF_HSWORD (4 or 8) bytes in the heap.
+ */
+
+/* First, check some assumptions.. */
+#if SIZEOF_CHAR != 1
+#error GHC untested on this architecture: sizeof(char) != 1
+#endif
+
+#if SIZEOF_SHORT != 2
+#error GHC untested on this architecture: sizeof(short) != 2
+#endif
+
+#if SIZEOF_UNSIGNED_INT != 4
+#error GHC untested on this architecture: sizeof(unsigned int) != 4
+#endif
+
+#define SIZEOF_HSCHAR SIZEOF_WORD32
+#define ALIGNMENT_HSCHAR ALIGNMENT_WORD32
+
+#define SIZEOF_HSINT SIZEOF_VOID_P
+#define ALIGNMENT_HSINT ALIGNMENT_VOID_P
+
+#define SIZEOF_HSWORD SIZEOF_VOID_P
+#define ALIGNMENT_HSWORD ALIGNMENT_VOID_P
+
+#define SIZEOF_HSDOUBLE SIZEOF_DOUBLE
+#define ALIGNMENT_HSDOUBLE ALIGNMENT_DOUBLE