
26 Aug
2011
26 Aug
'11
6:03 a.m.
On Fri, Aug 26, 2011 at 10:34 AM, Paterson, Ross
Simon Marlow writes:
That's what we have right now, the problem is that deepseq can't define a good instance for NFData Map, because it can't see enough of the internals of Map.
Couldn't the strict foldl do it?
In this case yes, if you know the internal representation of the Map type (which is subject to change). To do it well you must force the values but not the keys while folding (the keys are already WHNF so forcing them would be wasteful). You must also make sure that the fold itself doesn't add any extra overhead. Johan