Commit d2e6a3b5 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Improve documentation of infinite inlining bug

This fixes the documentation suggestion in Trac #10105
parent cabe1748
......@@ -503,7 +503,7 @@ checking for duplicates. The reason for this is efficiency, pure and simple.
<listitem>
<para>GHC's inliner can be persuaded into non-termination
using the standard way to encode recursion via a data type:</para>
using the standard way to encode recursion via a data type:
<programlisting>
data U = MkU (U -> Bool)
......@@ -513,8 +513,18 @@ checking for duplicates. The reason for this is efficiency, pure and simple.
x :: Bool
x = russel (MkU russel)
</programlisting>
<para>We have never found another class of programs, other
The non-termination is reported like this:
<programlisting>
ghc: panic! (the 'impossible' happened)
(GHC version 7.10.1 for x86_64-unknown-linux):
Simplifier ticks exhausted
When trying UnfoldingDone x_alB
To increase the limit, use -fsimpl-tick-factor=N (default 100)
</programlisting>
with the panic being reported no matter how high a <literal>-fsimpl-tick-factor</literal> you supply.
</para>
<para>
We have never found another class of programs, other
than this contrived one, that makes GHC diverge, and fixing
the problem would impose an extra overhead on every
compilation. So the bug remains un-fixed. There is more
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment