Note [runRW magic]
Some definitions, for instance @runST@, must have careful control over float out
of the bindings in their body. Consider this use of @runST@,
f x = runST ( \ s -> let (a, s') = newArray# 100 [] s
(_, s'') = fill_in_array_or_something a x s'
in freezeArray# a s'' )
If we inline @runST@, we'll get:
f x = let (a, s') = newArray# 100 [] realWorld#{-NB References 0
This Note does not link to any other.
Referenced by 5
- Linting of runRW# GHC.Core.Lint
- GHC.CoreToStg.Prep call site
- Simplification of runRW# GHC.CoreToStg.Prep
- CorePrepEnv: cpe_subst GHC.CoreToStg.Prep
- seq# magic GHC.Types.Id.Make