[commit: ghc] master: Clarify that declaration splices exist at top level only. (#9880) (53599b3)

git at git.haskell.org git at git.haskell.org
Fri Dec 19 15:02:17 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/53599b3f515227f3407991913781fc8ea79d9638/ghc

>---------------------------------------------------------------

commit 53599b3f515227f3407991913781fc8ea79d9638
Author: Richard Eisenberg <eir at cis.upenn.edu>
Date:   Tue Dec 16 17:21:42 2014 -0500

    Clarify that declaration splices exist at top level only. (#9880)


>---------------------------------------------------------------

53599b3f515227f3407991913781fc8ea79d9638
 docs/users_guide/glasgow_exts.xml | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/docs/users_guide/glasgow_exts.xml b/docs/users_guide/glasgow_exts.xml
index a502262..86ceb06 100644
--- a/docs/users_guide/glasgow_exts.xml
+++ b/docs/users_guide/glasgow_exts.xml
@@ -9015,11 +9015,13 @@ Wiki page</ulink>.
 		    have type <literal>Q Pat</literal></para></listitem>
 		    <listitem><para> a type; the spliced expression must
 		    have type <literal>Q Type</literal></para></listitem>
-		    <listitem><para> a list of declarations; the spliced expression
+		    <listitem><para> a list of declarations at top level; the spliced expression
                     must have type <literal>Q [Dec]</literal></para></listitem>
 		    </itemizedlist>
             Inside a splice you can only call functions defined in imported modules,
-	    not functions defined elsewhere in the same module.</para></listitem>
+	    not functions defined elsewhere in the same module. Note that
+	    declaration splices are not allowed anywhere except at top level
+	      (outside any other declarations).</para></listitem>
 
 	      <listitem><para>
 		  A expression quotation is written in Oxford brackets, thus:



More information about the ghc-commits mailing list