sizeFM type

Duncan Coutts duncan.coutts at worcester.oxford.ac.uk
Sun Apr 25 15:45:26 EDT 2004


On Sun, 2004-04-25 at 14:32, Serge D. Mechveliani wrote:
> Dear GHC developers,
> 
> Probably, it is better to provide   Integer
> or                                  Integral a => a
> instead of                          Int
> in the function
>                 sizeFM :: FiniteMap k e -> Int
> 
> What do you think of this?

Are you planning to put more than 2^31 entries into your FiniteMap?
I don't think I could afford a machine with the >16GB of ram necessary
to do that.

I guess this same argument took place over the Prelude.length function.
The conclusion was to add List.genericLength :: Num a => [b] -> a

Duncan



More information about the Glasgow-haskell-users mailing list