[Haskell-cafe] pointer equality
Steffen Schuldenzucker
sschuldenzucker at uni-bonn.de
Thu Jul 21 14:28:30 CEST 2011
On 07/21/2011 02:15 PM, Alexey Khudyakov wrote:
>> Any examples for hangups of 'smartEq' are greatly appreciated, I couldn't
>> produce any so far.
>>
> Following sequences will hang smartEq. They are both infinite and aperiodic.
> smartEq (fromList primes) (fromList primes)
> smartEq (fromList pidigits) (fromList pidigits)
Err, yeah, of course. I would expect expressions of type ListExp to be
finite as they represent written text.
fromList therefore expects to receive only finite lists.
Defining 'primes' using my method seems to be a bit of a challenge due
to its recursive definition.
More information about the Haskell-Cafe
mailing list