+#define hsc_offset(t, f) \
+ printf("(%ld)", (long) offsetof (t, f));
+
+#define hsc_size(t) \
+ printf("(%ld)", (long) sizeof(t));
+
+#define hsc_enum(t, f, print_name, x) \
+ print_name; \
+ printf (" :: %s\n", #t); \
+ print_name; \
+ printf (" = %s ", #f); \
+ if ((x) < 0) \
+ printf ("(%ld)\n", (long)(x)); \
+ else \
+ printf ("%lu\n", (unsigned long)(x));
+
+#define hsc_haskellize(x) \
+ { \
+ const char *s = (x); \
+ int upper = 0; \
+ if (*s != '\0') \
+ { \
+ putchar (tolower (*s)); \
+ ++s; \
+ while (*s != '\0') \
+ { \
+ if (*s == '_') \
+ upper = 1; \
+ else \
+ { \
+ putchar (upper ? toupper (*s) : tolower (*s)); \
+ upper = 0; \
+ } \
+ ++s; \
+ } \
+ } \
+ }