[Haskell-cafe] Re: Processing of large files

Alexander Kogan alexander at kogan.nnov.ru
Wed Nov 3 09:51:16 EST 2004


> > merge' a x = let r = addToFM_C (+) a x 1 in r `seq` r
> > but it doesn't help.
> == an anecdote
> A quick note,
> x `seq` x
> is always exactly equivalant to x. the reason being that your seq would
> never be called to force x unless x was needed anyway.

merge' a x = (addToFM (+) $! a) x 1
is not strict.
Can I do something to make FiniteMap strict?
Or the only way is to make my own StrictFiniteMap?

Alexander Kogan
Institute of Applied Physics
Russian Academy of Sciences

More information about the Haskell-Cafe mailing list