In the examples below, I’ll use "⊥" in place of "undefined", for brevity.
I’m making the same conventional pun as with “3” when describing an expression and when describing a denotation. Haskell was originally designed when we were stuck with ASCII, but we aren’t any longer.
I do appreciate care in distinguishing syntax from semantics. And I can see how using notation like “3” or “⊥” in both situations might confuse.
Also, I’ve taken care to treat all operational variations of ⊥ in a denotationally consistent way, including non-termination. If you think there’s a denotational inconsistency, could you please say what?
]]>In Haskell, ⊥ doesn’t simply block forever; it raises an exception.
Bit of a nitpick here: ⊥ is not a Haskell expression, but the denotational semantics of undefined. The operational semantics of undefined (at least in GHC) is indeed to raise an exception, but other expressions denoting ⊥ may have other operational semantics (including blocking forever, since the halting problem is undecidable).
Speaking of which, you probably want to catch NonTermination as well :)
]]>