Hello Anatoly,<br><br><div class="gmail_quote">On Sat, Apr 11, 2009 at 20:44, Anatoly Yakovenko <span dir="ltr">&lt;<a href="mailto:aeyakovenko@gmail.com">aeyakovenko@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

i am trying to understand how data.data works.  How would i traverse<br>
the subterms of one type and build another type out of them.<br>
something like this:<br>
<br>
&gt; gmapQ (\a -&gt; Right a) (Just &quot;hello&quot;)</blockquote><div><br>I am not sure I understand what you&#39;re trying to do here. However, in general, &#39;gmapQ&#39; is used in combination with &#39;mkQ&#39; or &#39;extQ&#39;. Those are not in Data.Data: you can import Data.Generics to get everything syb-related.<br>

<br><br>Cheers,<br>Pedro<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<br>
&lt;interactive&gt;:1:0:<br>
    Inferred type is less polymorphic than expected<br>
      Quantified type variable `d&#39; escapes<br>
    In the first argument of `gmapQ&#39;, namely `(\ a -&gt; Right a)&#39;<br>
    In the expression: gmapQ (\ a -&gt; Right a) (Just &quot;hello&quot;)<br>
    In the definition of `it&#39;:<br>
        it = gmapQ (\ a -&gt; Right a) (Just &quot;hello&quot;)<br>
<br>
<br>
Thanks,<br>
Anatoly<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>