[Haskell-cafe] Linking and unsafePerformIO

Jules Bean jules at jellybean.co.uk
Tue Oct 14 12:20:35 EDT 2008


David Roundy wrote:
> On Tue, Oct 14, 2008 at 04:05:23PM +0100, Jules Bean wrote:
>> David Roundy wrote:
>> Constants are mathematical and universal, like pi. That is what the
>> semantics of haskell say.
> 
> Where do the semantics of haskell say this? 

You should better ask 'which semantics?'.

The semantics in which a value of type "Int -> Int" is denoted by a 
mathematical function from Int to Int. In that semantics a value of type 
"Int" denotes a specific Int.  And that denotation is, of course, 
entirely independent of compiler or OS or package or dynamic loading or 
any concern like that.

This is, to my mind the "often assumed but never written down" semantics 
of haskell. It's certainly the semantics *I* want haskell to have.

 > How does it interact with
> fixing bugs (which means changing mathematical and universal constant
> functions--since all functions are constants)?

That's fine. Changing a program changes it denotation.

Running a program on a different interpreter or compiler had better not 
change its denotation, otherwise it [the denotation] is not much use as 
a basis for reasoning.

Jules




More information about the Haskell-Cafe mailing list