Add keepAlive in addition to touch?
Closed this issue · 2 comments
TerrorJack commented
The keepAlive#
primop has been there for some time. Maybe it makes sense to have a PrimMonad
-polymorphic keepAlive
, defined similarly to touch
. And it can work for all GHC major versions, when keepAlive#
is not present, a stub implementation using touch
is possible.
I can open a PR for this if primitive
maintainers consider this a worthy idea.
andrewthad commented
Yeah, this is definitely something we want in primitive
.
treeowl commented
We definitely want that! The stub needs to be properly NOINLINE
d and such; see the way it was originally defined in GHC.Exts
in version mumble mumble.