<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Type manipulation: Tricks of the trade</title>
	<atom:link href="http://blog.ezyang.com/2010/02/type-manipulation-tricks-of-the-trade/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ezyang.com/2010/02/type-manipulation-tricks-of-the-trade/</link>
	<description>Existential Pontification and Generalized Abstract Digressions</description>
	<lastBuildDate>Sun, 05 Feb 2012 23:02:11 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Edward Z. Yang</title>
		<link>http://blog.ezyang.com/2010/02/type-manipulation-tricks-of-the-trade/comment-page-1/#comment-183</link>
		<dc:creator>Edward Z. Yang</dc:creator>
		<pubDate>Sun, 14 Mar 2010 21:14:14 +0000</pubDate>
		<guid isPermaLink="false">http://ezyang.scripts.mit.edu/blog/?p=194#comment-183</guid>
		<description>As zygoloid on #haskell points out, this inference is completely normal once you stop treating -&gt; as infix:

&lt;pre&gt;   f a1
== (c1 -&gt; c2) -&gt; h c1 -&gt; h c2
== (c1 -&gt; c2) -&gt; (h c1 -&gt; h c2)
== (-&gt;) (c1 -&gt; c2) (h c1 -&gt; h c2)&lt;/pre&gt;

So &lt;code&gt;f = (-&gt;) (c1 -&gt; c2), and a1 = (h c1 -&gt; h c2)&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>As zygoloid on #haskell points out, this inference is completely normal once you stop treating -> as infix:</p>
<pre>   f a1
== (c1 -> c2) -> h c1 -> h c2
== (c1 -> c2) -> (h c1 -> h c2)
== (->) (c1 -> c2) (h c1 -> h c2)</pre>
<p>So <code>f = (->) (c1 -> c2), and a1 = (h c1 -> h c2)</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: roy_hu</title>
		<link>http://blog.ezyang.com/2010/02/type-manipulation-tricks-of-the-trade/comment-page-1/#comment-176</link>
		<dc:creator>roy_hu</dc:creator>
		<pubDate>Sat, 13 Mar 2010 09:30:08 +0000</pubDate>
		<guid isPermaLink="false">http://ezyang.scripts.mit.edu/blog/?p=194#comment-176</guid>
		<description>Great post, and very thought provoking. Most of the equations are solved by Hindley-Milner-style type unification. The type inference of fmap fmap fmap is a bit magical to me. How exactly does the compiler solve f a1 == (c1 -&gt; c2) -&gt; h c1 -&gt; h c2 ? I don&#039;t think it&#039;s because the compiler has some built-in knowledge of functors, because you can define a new class Functor&#039; and the type is inferenced the same way. Is there a general theory behind &quot;higher-order type inference&quot;?</description>
		<content:encoded><![CDATA[<p>Great post, and very thought provoking. Most of the equations are solved by Hindley-Milner-style type unification. The type inference of fmap fmap fmap is a bit magical to me. How exactly does the compiler solve f a1 == (c1 -&gt; c2) -&gt; h c1 -&gt; h c2 ? I don&#8217;t think it&#8217;s because the compiler has some built-in knowledge of functors, because you can define a new class Functor&#8217; and the type is inferenced the same way. Is there a general theory behind &#8220;higher-order type inference&#8221;?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

