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
15 fprintf(where, "\n"); /* no "Fail: " */
20 OutOfHeapHook (request_size, heap_size)
21 W_ request_size; /* in bytes */
22 W_ heap_size; /* in bytes */
24 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",
30 StackOverflowHook (stack_size)
31 I_ stack_size; /* in bytes */
33 fprintf(stderr, "GHC stack-space overflow: current size %ld bytes.\nUse the `-K<size>' option to increase it.\n", stack_size);
37 /* nothing to add here, really */
39 MallocFailHook (request_size)
40 I_ request_size; /* in bytes */
42 fprintf(stderr, "malloc: failed on request for %lu bytes\n", request_size);
47 PatErrorHdrHook (where)
50 fprintf(where, "\n*** Pattern-matching error within GHC!\n\nThis is a compiler bug; please report it to glasgow-haskell-bugs@dcs.glasgow.ac.uk.\n\nFail: ");
57 fprintf(where, "\n"); /* not "Trace On" */
64 fprintf(where, "\n"); /* not "Trace Off" */