<div dir="ltr"><br><br><div class="gmail_quote">On Fri, Oct 17, 2008 at 9:26 AM, Achim Schneider <span dir="ltr"><<a href="mailto:barsoap@web.de">barsoap@web.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
> [d| ... |], where the "..." is a list of top-level declarations; the<br>
> 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>
foo = "bar"<br>
bar = "foo"<br>
|]<br>
<br>
nor<br>
<br>
declarations = [d|<br>
[ foo = "bar"<br>
, bar = "foo"<br>
]<br>
|]<br>
<br>
work. I'm trying to automatically generate a bunch of functions out of<br>
an xml file.<br></blockquote><div><br></div><div>Works for me. Note that -fth is needed.</div><div> <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>