Set, Map libraries

Jan-Willem Maessen jmaessen at alum.mit.edu
Sat Jun 4 09:15:02 EDT 2005


On Jun 4, 2005, at 1:28 AM, Adrian Hey wrote:
> On Saturday 04 Jun 2005 1:33 am, Jan-Willem Maessen wrote:
>> Replace "4 million" by, say, 2^32 or 2^64 and I think the point 
>> stands.
>>   The set must fit in your addressable memory, and can thus be counted
>> by a similar-sized Int.

And thus, genericLength doesn't make particular sense for these sets.  
There is no risk of overflow.

>>
>> ...
> I'm afraid I still don't really understand point we're debating, so
> can't comment on whether or not it stands (unless the point is
> that you can't deal with sets that won't fit in available memory :-)

Hopefully the extra sentence clarifies the point?  The original debate 
seemed to focus around the need to measure map size with an Integer, 
because they might be Really Big or even infinite.  That's not actually 
feasible, since a map with O(1) size measurement is by definition 
strict.

-Jan-Willem Maessen


More information about the Glasgow-haskell-users mailing list