From 9724555fe6d741ae6c7612ef5a7f4de9b08f639d Mon Sep 17 00:00:00 2001
From: Ben Gamari <ben@smart-cactus.org>
Date: Tue, 21 Jul 2015 11:43:29 +0200
Subject: [PATCH] Describe IP SrcLoc change in release notes

---
 ANNOUNCE                          |  3 +++
 docs/users_guide/7.10.2-notes.xml | 21 +++++++++++++++++++++
 docs/users_guide/glasgow_exts.xml |  3 ++-
 3 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/ANNOUNCE b/ANNOUNCE
index 85282a2ceab3..7812ebaddd29 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -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,
 
diff --git a/docs/users_guide/7.10.2-notes.xml b/docs/users_guide/7.10.2-notes.xml
index 83a78898a44f..18cbc4870155 100644
--- a/docs/users_guide/7.10.2-notes.xml
+++ b/docs/users_guide/7.10.2-notes.xml
@@ -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>
diff --git a/docs/users_guide/glasgow_exts.xml b/docs/users_guide/glasgow_exts.xml
index adb152b38fa5..fb4837a6c83b 100644
--- a/docs/users_guide/glasgow_exts.xml
+++ b/docs/users_guide/glasgow_exts.xml
@@ -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:
-- 
GitLab