2 These routines customise the error messages
3 for various bits of the RTS. They are linked
4 in instead of the defaults.
8 #define W_ unsigned long int
12 ErrorHdrHook (FILE *where)
14 fprintf(where, "\n"); /* no "Fail: " */
19 OutOfHeapHook (W_ request_size, W_ heap_size) /* both in bytes */
21 fprintf(stderr, "GHC's heap exhausted;\nwhile trying to allocate %lu bytes in a %lu-byte heap;\nuse the `-H<size>' option to increase the total heap size.\n",
27 StackOverflowHook (I_ stack_size) /* in bytes */
29 fprintf(stderr, "GHC stack-space overflow: current size %ld bytes.\nUse the `-K<size>' option to increase it.\n", stack_size);
33 PatErrorHdrHook (FILE *where)
35 fprintf(where, "\n*** Pattern-matching error within GHC!\n\nThis is a compiler bug; please report it to glasgow-haskell-bugs@dcs.gla.ac.uk.\n\nFail: ");
39 PreTraceHook (FILE *where)
41 fprintf(where, "\n"); /* not "Trace On" */
45 PostTraceHook (FILE *where)
47 fprintf(where, "\n"); /* not "Trace Off" */