You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
containers' Set is defined as a separate data type where every field is strict so it is obvious there is no value to defining a "more strict" one here, since it would be exactly the same.
containers' Set is defined as a separate data type where every field is strict so it is obvious there is no value to defining a "more strict" one here, since it would be exactly the same.
OTOH, unordered-containers' HashSet is defined as a newtype wrapper around
HashMap _ ()
. BecauseHashMap
internally uses a primitiveArray#
which is lazy in its contents, this means thatHashSet
may contain thunks even when the values are all()
. This could be what's behind haskell-unordered-containers/unordered-containers#70.If we instead define
HashSet
from our stricterHashMap
, whose array operations all force the value, then we can avoid this potential problem.The text was updated successfully, but these errors were encountered: