
Dear GHC developers, Can you, please, provide Map.genericSize :: Map -> Integer in addition to Map.size :: Map -> Int ? For I use `Map.size', a bit, and need its variant which is both O(1) and Integer (because Int is less reliable). Probably, this is not hard to arrange. The same request is for Data.Set. What do you think of this? ----------------- Serge Mechveliani mechvel@botik.ru

Map (and Set) use (unboxed) Int internally. So bigger Maps and Sets are not possible. Christian Serge D. Mechveliani schrieb:
Dear GHC developers,
Can you, please, provide Map.genericSize :: Map -> Integer
in addition to Map.size :: Map -> Int ?
For I use `Map.size', a bit, and need its variant which is both O(1) and Integer (because Int is less reliable).
Probably, this is not hard to arrange. The same request is for Data.Set.
What do you think of this?
----------------- Serge Mechveliani mechvel@botik.ru

Hello Christian, Friday, September 29, 2006, 1:02:07 PM, you wrote:
Map (and Set) use (unboxed) Int internally. So bigger Maps and Sets are not possible.
interfaces has their own lives :) someone can write DiskMap library which allows to old more data but has the same interface as Data.Map -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com

"Bulat" == Bulat Ziganshin
writes:
Bulat> Hello Christian, Bulat> Friday, September 29, 2006, 1:02:07 PM, you wrote:
Map (and Set) use (unboxed) Int internally. So bigger Maps and Sets are
not possible.
Bulat> interfaces has their own lives :) someone can write DiskMap Bulat> library which allows to old more data but has the same Bulat> interface as Data.Map It's a job for a collections framework, isn't it? -- WBR, Max Vasin.

On Fri, 2006-09-29 at 11:02 +0200, Christian Maeder wrote:
Map (and Set) use (unboxed) Int internally. So bigger Maps and Sets are not possible.
Furthermore, unlike lists which can be bigger than can fit in memory, Data.Map and .Set are strict structures, so you can never have more than 2^32 elements on a 32bit machine, or 2^64 elements on a 64bit machine. Duncan
participants (5)
-
Bulat Ziganshin
-
Christian Maeder
-
Duncan Coutts
-
Max Vasin
-
Serge D. Mechveliani