[Haskell-cafe] Re: Why purely in haskell?
jules at jellybean.co.uk
Fri Jan 11 05:28:03 EST 2008
Achim Schneider wrote:
> The list instance for Eq might eg. know something about the structure
> of the lists and be smart enough not to get caught in the recursion of x
> = 1:1:x and y = 1:1:1:y so it could successfully compare x == y to
> True in six compares.
This would not be "something about the structure of lists"
This would be "somethign about the structure of thunks". Thunks are not
supposed to be observable. If you augment the language to make thunks
observable and comparable, you will break referential transparency.
More information about the Haskell-Cafe