[Haskell-cafe] Re: Wikipedia on first-class object

Jonathan Cast jonathanccast at fastmail.fm
Fri Dec 28 18:57:49 EST 2007

On 28 Dec 2007, at 2:08 AM, Cristian Baboi wrote:

> On Thu, 27 Dec 2007 20:46:24 +0200, Jonathan Cast  
> <jonathanccast at fastmail.fm> wrote:
>> Preference doesn't come into it.  By definition, the denotations  
>> of Haskell functions are monotone continous functions on pointed  
>> complete partial orders.
>> You seem to think that _|_ is defined in terms of operational  
>> semantics.  Haskell hasn't got an operational semantics, just a  
>> denotational semantics that implementations must produce an  
>> operational semantics to match with.  _|_ is a denotational idea,  
>> defined in terms of partial orders and least upper bounds.  An  
>> infinite list is the least upper bound of an infinite set of  
>> partial lists, and the value of any function (such as \x -> x ==  
>> x) applied to it is the least upper bound of the values of that  
>> function applied to those partial lists.
>> By definition.
> Questions:
> The fact that Haskell functions are monotone continous functions on  
> pointed complete partial orders imply this ?
> - every domain in Haskell is a "pointed complete partial order",  
> including domains of functions ?


> - the "structure" of a domain is preserved in the result when you  
> apply a Haskell function to it ?

The structure is preserved by every function, but that's a global  
property, not really something that applies to a particular  
application f x.

> - every domain can be enumerated ?

There exist models of Haskell where the domain representing every  
type is recursively enumerable, yes.   But the critical thing for  
finding a printing function is enumerating each value /once/, which  
is harder to do.  (I'm not aware of a way to do it).


More information about the Haskell-Cafe mailing list