Commit 9724555f authored by Ben Gamari's avatar Ben Gamari 🐢
Browse files

Describe IP SrcLoc change in release notes

parent 76030748
......@@ -23,6 +23,9 @@ bug-fix release and contains a number of important fixes,
* An infinite loop during program startup when iconv is unavailable hsa been
fixed
* The source location of the caller of a function is now available as an implicit
parameter to allow for better error reporting in the future
A more thorough list of the changes in the release can be found in the release
notes,
......
......@@ -14,6 +14,16 @@
<title>GHC</title>
<itemizedlist>
<listitem>
<para>
The source location of a function's caller can now be made
available to the callee as an implicit parameter. This will
enable better location information in runtime errors (e.g. from
<literal>error</literal> and partial functions like
<literal>head</literal>). For more details see
<xref linkend="special-implicit-params"/>.
</para>
</listitem>
<listitem>
<para>
A bug in the typechecker which could result in strange,
......@@ -247,6 +257,17 @@
features).
</para>
</listitem>
<listitem>
<para>
The source location functionality above required an breaking change
to the GHC API. Namely, the <literal>SrcSpan</literal>s of
<literal>CtLoc</literal> and <literal>TcLclEnv</literal> are now
<literal>RealSrcSpan</literal>s. While usually API changes like this
are avoided in bugfix releases, it was decided that the benefits
offered by the source location functionality outweighed the cost of
a small change to this rarely-used interface.
</para>
</listitem>
</itemizedlist>
</sect3>
</sect2>
......
......@@ -7681,7 +7681,8 @@ inner binding of <literal>?x</literal>, so <literal>(f 9)</literal> will return
</para>
</sect3>
<sect3><title>Special implicit parameters</title>
<sect3 id="special-implicit-params">
<title>Special implicit parameters</title>
<para>
GHC treats implicit parameters of type <literal>GHC.Stack.CallStack</literal>
specially, by resolving them to the current location in the program. Consider:
......
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