Re: [Haskell-cafe] How to check object's identity?

3 Jan
2009
3 Jan
'09
10:51 a.m.
Thanks guys :-)
* Nicolas Pouillard
Excerpts from Xie Hanjian's message of Sat Jan 03 16:28:30 +0100 2009:
Hi,
I tried this in ghci:
Prelude> 1:2:[] == 1:2:[] True
Does this mean (:) return the same object on same input, or (==) is not for identity checking? If the later is true, how can I check two object is the *same* object?
Here (==) is the structural equality. There is generally no exposed function to check for identity of values. This would expose too much of the memory model and the compilation process to give a specification to such a function.
-- Nicolas Pouillard
-- jan=callcc{|jan|jan};jan.call(jan)
5983
Age (days ago)
5983
Last active (days ago)
0 comments
1 participants
participants (1)
-
Xie Hanjian