<div class="gmail_quote"><div class="gmail_quote"><div class="im">On Sat, Jan 21, 2012 at 2:24 PM, 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%2012" value="+12012012112" target="_blank">[2012-01-21 12</a>:18:09-0800]<br>
<div>&gt; `undefined` is not a value in any domain. It isn&#39;t a value at all. It&#39;s<br>
&gt; certainly not part of my monad language or algebra. Up to the semantic<br>
&gt; level of comparing observable and legally defined behaviors, we can have<br>
&gt; the identity law. That&#39;s sufficient for the letter of the law, even if not<br>
&gt; ideal from Haskell&#39;s operational perspective.<br>
<br>
</div>First, can we please agree on what kind of semantics we are discussing?<br></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
In the beginning you are talking about domains, so it sounds like<br>
denotational semantics. But then you move to behaviours, and that sounds<br>
like operational semantics.<br></blockquote><div><br></div></div><div>Can you first agree what *layer* of semantics you are discussing? It&#39;s useful to understand programs in layers. Your argument seems to depend on confusing the semantics of the monad abstraction with the semantics of the Haskell representation of the abstraction. </div>

<div><br></div><div>We could even look at underlying layers, such as the implementation of Haskell - including allocation and GC. The important point is that the ONLY relevant layer for monad laws is the monad algebra itself - not the representation in Haskell, and certainly not the representation of Haskell on a Von Neumann machine. Since strictness does not affect the *values* of any elements in the monad&#39;s algebra, it is trivial to meet the monad laws.</div>

<div><br></div><div>My argument did switch from denotational to operational as I crossed layers, but that was a conscious decision on my part.</div><div class="im"><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
If we are talking about the denotational semantics, then we choose a<br>
domain and need to map every legal Haskell expression to something in<br>
that domain.<br></blockquote><div><br></div></div><div>We can discuss denotational semantics of many languages. And we can discuss the representations of those languages in Haskell. And we can discuss the denotational semantics of Haskell. Layers upon layers. Denotational semantics certainly doesn&#39;t imply the Haskell layer.</div>

<div><br></div><div>Regards,</div><div><br></div><div>Dave</div><div><br></div></div>
</div><br>