Hi all,

As discussed in an earlier (accepted) proposal we're adding Data.[Int]Map.{Strict,Lazy} APIs to make it easier for users to get the desired strictness.

There are two subtly different ways these APIs can be strict:

1. All the functions are strict in the value argument, or
2. The structure is strict in the value field.

The difference shows up in functions like insertWith. For example, given

    insertWith (\ old _new -> old + 1) k v someMap

should 'v' be evaluated is the key 'k' is already in the map. (Note that the value isn't used in the update function.)

If we go with option 2 it is more difficult for the user to reason about if a given value passed to the API is evaluated or not (as in the above example). We currently use option 1 for keys i.e.

    insert k v someMap

is strict in the key even if the map is empty (which wouldn't require us to look at the key).

Thoughts? I'd love to see some design pros/cons of both approaches.

-- Johan