<div class="gmail_quote"><div>`undefined` is not a value in any domain. It isn&#39;t a value at all. It&#39;s certainly not part of my monad language or algebra. Up to the semantic level of comparing observable and legally defined behaviors, we can have the identity law. That&#39;s sufficient for the letter of the law, even if not ideal from Haskell&#39;s operational perspective.</div>

<div><br></div><div>Implicit use of laziness or undefined to model and reason about data or algebras is a mistake that mixes semantic layers. Even in Haskell. There&#39;s a reason every robust library for processing signals or streams will model them explicitly.</div>

<div><br></div><div>Regards,</div><div><br></div><div>Dave</div><div class="HOEnZb"><div class="h5"><div><br></div><div><div><div><div><div class="gmail_quote">On Sat, Jan 21, 2012 at 11:22 AM, Roman Cheplyaka <span dir="ltr">&lt;<a href="mailto:roma@ro-che.info" target="_blank">roma@ro-che.info</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">* David Barbour &lt;<a href="mailto:dmbarbour@gmail.com" target="_blank">dmbarbour@gmail.com</a>&gt; <a href="tel:%5B2012-01-21%2011" value="+12012012111" target="_blank">[2012-01-21 11</a>:09:43-0800]<br>


<div>&gt; Logically only has meaning when `=` applies to values in the domain.<br>
&gt; `undefined` is not a value in the domain.<br>
&gt;<br>
&gt; We can define monads - which meet monad laws - even in strict languages.<br>
<br>
</div>In strict languages &#39;undefined&#39; is not a value in the domain indeed, but<br>
it is in non-strict languages, exactly because they are non-strict.<br>
<br>
I think that&#39;s what Robert Harper meant by saying that Haskell doesn&#39;t<br>
have a type of lists, while ML has one [1].<br>
<br>
[1]: <a href="http://existentialtype.wordpress.com/2011/04/24/the-real-point-of-laziness/" target="_blank">http://existentialtype.wordpress.com/2011/04/24/the-real-point-of-laziness/</a><br>
<div><div><br>
--<br>
Roman I. Cheplyaka :: <a href="http://ro-che.info/" target="_blank">http://ro-che.info/</a><br>
</div></div></blockquote></div><br></div></div></div></div>
</div></div></div><br>