[Haskell-cafe] Re: Why purely in haskell?
Cristian Baboi
cristi at ot.onrc.ro
Fri Jan 11 04:20:39 EST 2008
On Fri, 11 Jan 2008 09:16:12 +0200, Lennart Augustsson
<lennart at augustsson.net> wrote:
> Thank you Duncan, you took the words out of my mouth. :)
> On Jan 10, 2008 5:42 PM, Duncan Coutts <duncan.coutts at worc.ox.ac.uk>
> wrote:
>> >
>> So let's imagine:
>>
>> ones = 1 : ones
>>
>> ones' = repeat 1
>> where repeat n = n : repeat n
>>
>> So you're suggesting that:
>>
>> ones == ones = True
>> but
>> ones' == ones' = _|_
>>
>>
>> Well if that were the case then it is distinguishing two equal values
>> and hence breaking referential transparency. We can fairly trivially
>> prove that ones and ones' are equal so == is not allowed to distinguish
>> them. Fortunately it is impossible to write == above, at least using
>> primitives within the language.
If one can prove ones == ones = True with some method, why that method
cannot be made to work on ones' ?
Are you thinking about repeat (f x) by any chance ?
________ Information from NOD32 ________
This message was checked by NOD32 Antivirus System for Linux Mail Servers.
part000.txt - is OK
http://www.eset.com
More information about the Haskell-Cafe
mailing list