Data.IntMap.Strict.findWithDefault is too strict

Andreas Abel andreas.abel at ifi.lmu.de
Fri Dec 14 11:19:56 CET 2012


On 13.12.12 5:48 PM, Johan Tibell wrote:
> On Thu, Dec 13, 2012 at 8:13 AM, Andreas Abel <andreas.abel at ifi.lmu.de> wrote:
>> Key and value arguments are evaluated to WHNF
>
> For consistency. The API is modeled as if we had call-by-value.

"For consistency" is monolithic statement.  Maybe there are items in 
this bundle that do not need to be there.

Which theorem breaks if you make the default argument in findWithDefault 
lazy?

Which programs segfault then which did not segfault with an eager 
treatment of the default argument?

Cheers,
Andreas

-- 
Andreas Abel  <><      Du bist der geliebte Mensch.

Theoretical Computer Science, University of Munich
Oettingenstr. 67, D-80538 Munich, GERMANY

andreas.abel at ifi.lmu.de
http://www2.tcs.ifi.lmu.de/~abel/



More information about the Libraries mailing list