sequence causing stack overflow on pretty small lists

Niklas Hambüchen mail at
Mon Aug 26 11:16:41 CEST 2013

As an example that this actually makes problems in production code, I
found this in the wildlife:

    -- Do not use a forM here as you use too much stack space
    bad <- (\f -> foldM f [] (Map.toList status)) $ \seen (i,v) -> ...

I could bet that there is a lot of code around on which we rely, which
has the same problem but does not go that far in customisation.

More information about the Libraries mailing list