[Haskell-cafe] Basic question concerning data constructors

Benja Fallenstein benja.fallenstein at gmail.com
Wed Jan 2 09:38:56 EST 2008

Hi Yitz,

On Jan 2, 2008 10:34 AM, Yitzchak Gale <gale at sefer.org> wrote:
> No, only countably many. By the type expression Integer -> Integer
> we mean all Haskell functions mapping Integers to Integers.
> There are only countably many of those.
> But that was not the context in this thread. The category
> Hask that we often mention in discussions about Haskell
> the programming language is most certainly a small category.

I don't know. My understanding has been that at least part of the
benefit of denotational semantics is that you can define what an
expression means without referring back to the syntactic construction
or the operational semantics of that expression -- and thus use the
denotational semantics to check whether the operational semantics are
"right." But if you start with "all Haskell functions," you already
have to know what a Haskell function *is*.

I think it should be "allowed" to think of the semantics of Haskell as
being defined independently of the (relatively operational) notion of
"computable function," and then define "computable function" to be
that subset of the functions in the model that you can actually write
in Haskell. And the only explicit non-syntactic constructions of
models for Haskell-like languages that I'm familiar with aren't
countable (they contain all continuous functions, which in the case of
(Integer -> Integer) comes out to all monotonous functions).

So I disagree that the function types of Hask should automatically be
taken to be countable. If you want to assume it for some given
purpose, sure, fine, but IMO that's an additional assumption, not
something inherent in the Haskell language.

- Benja

More information about the Haskell-Cafe mailing list