Yes, that web page is a terrible introduction to dependent types. :)<br><br><div><span class="gmail_quote">On 10/6/07, <b class="gmail_sendername">Andrew Coppin</b> &lt;<a href="mailto:andrewcoppin@btinternet.com">andrewcoppin@btinternet.com
</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Dan Piponi wrote:<br>&gt; On 10/6/07, Andrew Coppin &lt;<a href="mailto:andrewcoppin@btinternet.com">
andrewcoppin@btinternet.com</a>&gt; wrote:<br>&gt;<br>&gt;&gt; I&#39;ve seen quite a few people do crazy things to abuse the Haskell type<br>&gt;&gt; system in order to perform arithmetic in types.<br>&gt;&gt;<br>&gt;<br>
&gt; How did you know precisely what I was doing at this moment in time?<br>&gt;<br><br>Birthday paradox?<br><br>&gt;&gt; Stuff the type system<br>&gt;&gt; was never ever intended to do.<br>&gt;&gt;<br>&gt;<br>&gt; There&#39;s &quot;didn&#39;t intended that it be possible to&quot; and there&#39;s &quot;intend
<br>&gt; that it be impossible to&quot;. Hmmm...maybe one of these should be called<br>&gt; cointend.<br>&gt;<br><br>Ouch. You&#39;re making my head hurt...<br><br>&gt;&gt; Well I was just wondering... did anybody ever sit down and come up with
<br>&gt;&gt; a type system that *is* designed for this kind of thing? What would that<br>&gt;&gt; look like? (I&#39;m guessing rather complex!)<br>&gt;&gt;<br>&gt;<br>&gt; Well there are always languages with dependent type systems which
<br>&gt; allow you to have the type depend on a value. In such a language it&#39;s<br>&gt; easier to make types that correspond to some mathematical<br>&gt; constructions, like a separate type for each n-dimensional vector.
<br>&gt; (See <a href="http://www.haskell.org/haskellwiki/Dependent_type.">http://www.haskell.org/haskellwiki/Dependent_type.</a>) But that&#39;s<br>&gt; kind of cheating. I&#39;m guessing you&#39;re talking about a language that
<br>&gt; makes it easier to &quot;fake&quot; your own dependent types without properly<br>&gt; implementing dependent types. If you find one, I could use it right<br>&gt; now - the details of embedding the gaussian integers in Haskell types
<br>&gt; are getting a bit complicated right now...<br>&gt;<br><br>...I have no idea what you just said.<br><br>(The wiki article is pretty special though. An entire raft of dense<br>equations with no attempt to provide any background or describe what any
<br>of this gibberish *is*. Clearly it made sense to the author, but...)<br><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">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br></blockquote></div><br>