Specific denotations for pure types

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Tue Mar 24 06:36:19 EDT 2009


On Sat, 2009-03-21 at 11:15 -0700, Conal Elliott wrote:
> I'm suggesting that we have well-defined denotations for the pure
> types in Haskell, and that the various Haskell implementations be
> expected to implement those denotations.
> 
> I'm fine with IO continuing to be the (non-denotational) "sin bin"
> until we find more appealing denotationally-founded replacements.
> 
> I didn't answer your question as stated because I don't know what you
> include in "behaviour" for a functional program.  I have operational
> associations with that word.


You're right of course, once we have one machine-dependent type then all
of them are "infected" even simple things like Bool.

The question is what should we do about it, if anything? A certain
amount of machine dependent behaviour would seem to be useful. Even
machine-dependent Int it's not in the H98 standard, implementations
would want to add it as an efficiency extension and then we're back to
the same place because one machine-dependent type infects all types.

It doesn't even need machine dependent compilers. We've got plenty of
libraries that have different "pure" semantics on different platforms.
For example System.FilePath has a bunch of pure functions for
manipulating file paths. We could construct a similar dodgy :: Bool
example using functions from System.FilePath.

As, Ganesh said, I'm not sure what we can actually do, unless you want
to explain the denotation of everything with an extra (MachineInfo ->)
context.

Duncan



More information about the Haskell-prime mailing list