summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorEric Mertens <emertens@gmail.com>2014-10-07 08:48:37 -0500
committerAustin Seipp <austin@well-typed.com>2014-10-07 08:48:38 -0500
commitadcb9dbc0bfb6a7dd3f4f746e2f8cd620745db75 (patch)
tree5ebde7824e00cfaf08c4ab39e15f8e45d992862e /docs
parent2ee252783b732649f6075b769bd6b964e3823400 (diff)
downloadhaskell-adcb9dbc0bfb6a7dd3f4f746e2f8cd620745db75.tar.gz
Add support for LINE pragma in template-haskell
Summary: Provide a way to generate {-# LINE #-} pragmas when generating Decs in Template Haskell. This allows more meaningful line numbers to be reported in compile-time errors for dynamically generated code. Test Plan: Run test suite Reviewers: austin, hvr Reviewed By: austin Subscribers: hvr, simonmar, ezyang, carter, thomie Differential Revision: https://phabricator.haskell.org/D299
Diffstat (limited to 'docs')
-rw-r--r--docs/users_guide/7.10.1-notes.xml3
-rw-r--r--docs/users_guide/glasgow_exts.xml5
2 files changed, 7 insertions, 1 deletions
diff --git a/docs/users_guide/7.10.1-notes.xml b/docs/users_guide/7.10.1-notes.xml
index d319cc5289..a02c4b06ce 100644
--- a/docs/users_guide/7.10.1-notes.xml
+++ b/docs/users_guide/7.10.1-notes.xml
@@ -101,7 +101,8 @@
<itemizedlist>
<listitem>
<para>
- TODO FIXME
+ Added support for generating LINE pragma declarations
+ (<xref linkend="line-pragma"/>).
</para>
</listitem>
</itemizedlist>
diff --git a/docs/users_guide/glasgow_exts.xml b/docs/users_guide/glasgow_exts.xml
index 04e603aac7..dd98f5ab66 100644
--- a/docs/users_guide/glasgow_exts.xml
+++ b/docs/users_guide/glasgow_exts.xml
@@ -10500,6 +10500,11 @@ happen.
42 in the original. GHC will adjust its error messages to refer
to the line/file named in the <literal>LINE</literal>
pragma.</para>
+
+ <para><literal>LINE</literal> pragmas generated from Template Haskell set
+ the file and line position for the duration of the splice and are limited
+ to the splice. Note that because Template Haskell splices abstract syntax,
+ the file positions are not automatically advanced.</para>
</sect2>
<sect2 id="rules">