Actually, looking at the docs for UniplateStr[1], isn&#39;t there an error in the following example statement in the Queries section?<div><span class="Apple-style-span" style="font-family: -webkit-sans-serif; font-size: 16px; "><pre style="">
<span class="Apple-style-span" style="font-size: small;">vals x = [Val i | i &lt;- universe x]</span></pre></span><div>Shouldn&#39;t that be:</div><div><br></div><div><span class="Apple-style-span" style="font-family: &#39;courier new&#39;, monospace;">vals x = [i | Val i &lt;- universe x]</span></div>
<div><br></div><div>?</div><div><br></div><div>/jve</div><div><br></div><div>1. <a href="http://hackage.haskell.org/packages/archive/uniplate/1.2.0.3/doc/html/Data-Generics-UniplateStr.html">http://hackage.haskell.org/packages/archive/uniplate/1.2.0.3/doc/html/Data-Generics-UniplateStr.html</a><br>

<br><br><div class="gmail_quote">On Thu, Mar 26, 2009 at 1:47 PM, minh thu <span dir="ltr">&lt;<a href="mailto:noteed@gmail.com">noteed@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
2009/3/26 Vasyl Pasternak &lt;<a href="mailto:vasyl.pasternak@gmail.com">vasyl.pasternak@gmail.com</a>&gt;:<br>
<div class="im">&gt; Hi,<br>
&gt;<br>
&gt; I want to parse haskell file to find all calls to function &#39;foo&#39; and<br>
&gt; gathers a create a list of all<br>
&gt; argumets, which passed to it. E.g. from the following code:<br>
&gt;<br>
&gt; f1 = foo 5<br>
&gt; f2 = foo 8<br>
&gt; f3 = foo 9<br>
&gt;<br>
&gt;  I want to extract a list [5, 8, 9] (suppouse function takes only one argument)<br>
&gt;<br>
&gt; The most obvious way is to use Language.Haskell for this task. The<br>
&gt; parser works pretty good,<br>
&gt; but its output data type is terrible. As I understand, I need to<br>
&gt; extract all objects that looks like<br>
&gt; HsApp (HsVar (UnQual (HsIdent &quot;foo&quot;))) ....<br>
&gt;<br>
&gt; The question is, is there a method to do it quickly or I have to<br>
&gt; process each object of different type<br>
&gt; separately ?<br>
<br>
</div>Have a look at this:<br>
<a href="http://neilmitchell.blogspot.com/2009/03/concise-generic-queries.html" target="_blank">http://neilmitchell.blogspot.com/2009/03/concise-generic-queries.html</a><br>
<br>
Cheers,<br>
<font color="#888888">Thu<br>
</font><div><div></div><div class="h5">_______________________________________________<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>
</div></div></blockquote></div><br></div></div>