<div class="gmail_quote">On Mon, Feb 2, 2009 at 12:39 PM, Ketil Malde <span dir="ltr">&lt;<a href="mailto:ketil@malde.org">ketil@malde.org</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;">
<div class="Ih2E3d">Gregg Reynolds &lt;<a href="mailto:dev@mobileink.com">dev@mobileink.com</a>&gt; writes:<br>
<br>
&gt; This gives a very interesting way of looking at Haskell type<br>
&gt; constructors: a value of (say) Tcon Int is anything that satisfies<br>
&gt; &quot;isA Tcon Int&quot;.<br>
<br>
</div>Reminiscent of arguments between dynamic and static typing camps - as<br>
far as I understand, a &quot;dynamic type&quot; is just a predicate. &nbsp;So<br>
division by zero is a &quot;type error&quot;, since the domain of division is<br>
the type of all numbers except zero.<br>
<br>
In contrast, I&#39;ve always thought of (static) types as disjoint sets of<br>
values.<br>
<div class="Ih2E3d"><br>
&gt; My reasoning is that we can<br>
&gt; define an infinite number of data constructors for it, including at<br>
&gt; least all possible polynomials (by which I mean data constructors of<br>
&gt; any arity taking args of any type).<br>
<br>
</div>I guess I don&#39;t quite understand what you mean by &quot;Tcon Int&quot; above.<br>
Could you give a concrete example of such a type?<br>
<div class="Ih2E3d"></div></blockquote><div><br>Just shorthand for something like &quot;data Tcon a = Dcon a&quot;, applied to Int.&nbsp; Any data constructor expression using an Int will yield a value of type Tcon Int.</div>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d"><br>
&gt; To my naive mind this sounds suspiciously like the set of all sets,<br>
&gt; so it&#39;s too big to be a set.<br>
<br>
</div>I suspect that since types and values are separate domains, you avoid<br>
the complications caused by self reference.<br>
<div class="Ih2E3d"><br>
&gt; In any case, Tcon Int does not depend on any particular constructor,<br>
&gt; just as homo sapiens does not depend on any particular man. &nbsp; So it<br>
&gt; can&#39;t be a set because it doesn&#39;t have its members essentially.<br>
<br>
</div>I don&#39;t follow this argument. &nbsp;Are you saying you can remove a<br>
data constructor from a type, and still have the same type? &nbsp;And<br>
because of this, the values of the type do not constitute a set?<br>
</blockquote><div><br>Yep.&nbsp; Well, that is /if/ you start from the &quot;Open-World Assumption&quot; - see <a href="http://en.wikipedia.org/wiki/Open_World_Assumption">http://en.wikipedia.org/wiki/Open_World_Assumption</a> (very important in ontologies e.g. OWL and Description Logics).&nbsp; Just because we know that e.g. expressions like Dcon 3 yield values of type Tcon Int does not mean that we know that those are the only such expressions.&nbsp; So we can&#39;t really say anything about how big it can be.&nbsp;&nbsp; Who knows, it might actually be a useful distinction for an OWL reasoner in Haskell. <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>
I guess it boils down to how &quot;Tcon Int&quot; does not depend on any<br>
particular constructor.<br>
</blockquote><div><br>That seems like a good way of putting it.<br><br>-g</div></div><br>