\begin{code} #include "rtsdefs.h" void IOErrorHdrHook (StgInt fd) { const char msg[]="\nI/O error: "; write(fd, msg, sizeof(msg)-1); } \end{code}