<div dir="ltr"><br><br><div class="gmail_quote">On Fri, Oct 17, 2008 at 9:26 AM, Achim Schneider <span dir="ltr">&lt;<a href="mailto:barsoap@web.de">barsoap@web.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
&gt; [d| ... |], where the &quot;...&quot; is a list of top-level declarations; the<br>
&gt; quotation has type Q [Dec].<br>
<br>
(<a href="http://www.haskell.org/ghc/docs/latest/html/users_guide/template-haskell.html" target="_blank">http://www.haskell.org/ghc/docs/latest/html/users_guide/template-haskell.html</a>)<br>
<br>
Can someone elaborate on what a list means here? Neither<br>
<br>
declarations = [d|<br>
 &nbsp; &nbsp;foo = &quot;bar&quot;<br>
 &nbsp; &nbsp;bar = &quot;foo&quot;<br>
|]<br>
<br>
nor<br>
<br>
declarations = [d|<br>
 &nbsp; &nbsp;[ foo = &quot;bar&quot;<br>
 &nbsp; &nbsp;, bar = &quot;foo&quot;<br>
 &nbsp; &nbsp;]<br>
|]<br>
<br>
work. I&#39;m trying to automatically generate a bunch of functions out of<br>
an xml file.<br></blockquote><div><br></div><div>Works for me. &nbsp;Note that -fth is needed.</div><div>&nbsp;<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
--<br>
(c) this sig last receiving data processing entity. Inspect headers<br>
for copyright history. All rights reserved. Copying, hiring, renting,<br>
performance and/or quoting of this signature prohibited.<br>
<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</blockquote></div><br></div>