Import Debian changes 20180207-1
[hcoop/debian/mlton.git] / runtime / basis / MLton / bug.c
1 #include "platform.h"
2
3 /* print a bug message and exit (2) */
4 void MLton_bug (String8_t msg) {
5 uintmax_t size = GC_getArrayLength ((pointer)msg);
6 fprintf (stderr, "MLton bug: ");
7 fwrite ((const void*)msg, (size_t)size, 1, stderr);
8 fprintf (stderr, "\nPlease send a bug report to MLton@mlton.org.\n");
9 exit (2);
10 }