[commit: ghc] wip/rae: Clarify that declaration splices exist at top level only. (#9880) (383a95f)

git at git.haskell.org git at git.haskell.org
Thu Dec 18 04:33:28 UTC 2014


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

On branch  : wip/rae
Link       : http://ghc.haskell.org/trac/ghc/changeset/383a95f909cca6cfdea43c2b8955bcc432d1709d/ghc

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

commit 383a95f909cca6cfdea43c2b8955bcc432d1709d
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)


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

383a95f909cca6cfdea43c2b8955bcc432d1709d
 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