There&#39;s also ListLike: <a href="http://hackage.haskell.org/package/ListLike" target="_blank">http://hackage.haskell.org/package/ListLike</a><br><br><br>--<br>Markus Läll<br><br><div class="gmail_quote">On Fri, Mar 25, 2011 at 6:32 AM, 吴兴博 <span dir="ltr">&lt;<a href="mailto:wuxb45@gmail.com">wuxb45@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">:) Thanks.<br>
<br>
2011/3/24 Brent Yorgey &lt;<a href="mailto:byorgey@seas.upenn.edu">byorgey@seas.upenn.edu</a>&gt;:<br>
<div><div></div><div class="h5">&gt; On Thu, Mar 24, 2011 at 06:34:57PM +0800, 吴兴博 wrote:<br>
&gt;&gt;<br>
&gt;&gt; 2.<br>
&gt;&gt; f1 :: (Integral a) =&gt; a -&gt; String<br>
&gt;&gt; f2 :: (Integral a) =&gt; String -&gt; a<br>
&gt;&gt;<br>
&gt;&gt; pipe = f1 . f2<br>
&gt;&gt; It is clear that pipe is String -&gt; String,<br>
&gt;<br>
&gt; Actually, this code will give an &quot;ambiguous type&quot; error, since the<br>
&gt; compiler cannot figure out what type &#39;a&#39; should be.  And the type that<br>
&gt; is chosen may make a difference for the behavior.<br>
&gt;<br>
&gt;&gt; but.(1)How can I know what instance that &#39;a&#39; is.<br>
&gt;&gt;     (2)How can I determine what instance of &#39;a&#39; is.<br>
&gt;<br>
&gt; If you know what type you want to use for &#39;a&#39; you can specify it with<br>
&gt; a type annotation, like this:<br>
&gt;<br>
&gt;  pipe = f1 . (f2 :: String -&gt; Int)<br>
&gt;<br>
&gt; -Brent<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Beginners mailing list<br>
&gt; <a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
&gt; <a href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank">http://www.haskell.org/mailman/listinfo/beginners</a><br>
&gt;<br>
<br>
<br>
<br>
</div></div>--<br>
----------------<br>
<font color="#888888">吴兴博<br>
</font><div><div></div><div class="h5"><br>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank">http://www.haskell.org/mailman/listinfo/beginners</a><br>
</div></div></blockquote></div><br>