| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.HashMap.Internal.ST
Description
WARNING
This module is considered internal.
The Package Versioning Policy does not apply.
The contents of this module may change in any way whatsoever and without any warning between minor versions of this package.
Authors importing this module are expected to track development closely.
Description
Utilities for working in ST.
Documentation
foldlST' :: Foldable f => (b -> a -> ST s b) -> b -> f a -> ST s b Source #
A strict version of foldlM, specialized for ST. The problem
with just using foldlM is that GHC doesn't always get the arity right, which
can lead to excessive allocation. See
https://github.com/haskell-unordered-containers/unordered-containers/pull/602#issuecomment-6775859682
and https://gitlab.haskell.org/ghc/ghc/-/issues/16357.
We don't actually need the strictness for fromList and such, but we include
it to reduce the number of things we have to check.