[commit: ghc] ghc-7.10: Describe IP SrcLoc change in release notes (9724555)
git at git.haskell.org
git at git.haskell.org
Tue Jul 21 10:27:59 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-7.10
Link : http://ghc.haskell.org/trac/ghc/changeset/9724555fe6d741ae6c7612ef5a7f4de9b08f639d/ghc
>---------------------------------------------------------------
commit 9724555fe6d741ae6c7612ef5a7f4de9b08f639d
Author: Ben Gamari <ben at smart-cactus.org>
Date: Tue Jul 21 11:43:29 2015 +0200
Describe IP SrcLoc change in release notes
>---------------------------------------------------------------
9724555fe6d741ae6c7612ef5a7f4de9b08f639d
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 85282a2..7812eba 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 83a7889..18cbc48 100644
--- a/docs/users_guide/7.10.2-notes.xml
+++ b/docs/users_guide/7.10.2-notes.xml
@@ -16,6 +16,16 @@
<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,
inconsistent reduction of type families has been fixed
(issue #10488).
@@ -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 adb152b..fb4837a 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:
More information about the ghc-commits
mailing list