summaryrefslogtreecommitdiff
path: root/ghc/runtime/hooks/OutOfStk.lc
diff options
context:
space:
mode:
Diffstat (limited to 'ghc/runtime/hooks/OutOfStk.lc')
-rw-r--r--ghc/runtime/hooks/OutOfStk.lc10
1 files changed, 10 insertions, 0 deletions
diff --git a/ghc/runtime/hooks/OutOfStk.lc b/ghc/runtime/hooks/OutOfStk.lc
new file mode 100644
index 0000000000..470562117a
--- /dev/null
+++ b/ghc/runtime/hooks/OutOfStk.lc
@@ -0,0 +1,10 @@
+\begin{code}
+#include "rtsdefs.h"
+
+void
+StackOverflowHook (stack_size)
+ I_ stack_size; /* in bytes */
+{
+ fprintf(stderr, "Stack space overflow: current size %ld bytes.\nUse `+RTS -Ksize' to increase it.\n", stack_size);
+}
+\end{code}