summaryrefslogtreecommitdiff
path: root/compiler/GHC/Builtin/primops.txt.pp
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-04-16 14:55:15 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-05-06 02:30:18 -0400
commita5e9e5b601fecef421ec4bfa28e135404986ded0 (patch)
treef7cfbff6ee74e0e0b991b3ac32605cf6ca17b089 /compiler/GHC/Builtin/primops.txt.pp
parent049c3a83fbce67e58e70c727d89e8331608a4e04 (diff)
downloadhaskell-a5e9e5b601fecef421ec4bfa28e135404986ded0.tar.gz
Re-introduce Note [keepAlive# magic]
Somewhere in the course of forward- and back-porting the keepAlive# branch the Note which described the mechanism was dropped. Reintroduce it. Closes #19712.
Diffstat (limited to 'compiler/GHC/Builtin/primops.txt.pp')
-rw-r--r--compiler/GHC/Builtin/primops.txt.pp3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/GHC/Builtin/primops.txt.pp b/compiler/GHC/Builtin/primops.txt.pp
index d4f56cadfa..3bddd10285 100644
--- a/compiler/GHC/Builtin/primops.txt.pp
+++ b/compiler/GHC/Builtin/primops.txt.pp
@@ -3133,7 +3133,8 @@ section "Controlling object lifetime"
-- See Note [keepAlive# magic] in GHC.CoreToStg.Prep.
primop KeepAliveOp "keepAlive#" GenPrimOp
o -> State# RealWorld -> (State# RealWorld -> p) -> p
- { TODO. }
+ { \tt{keepAlive# x s k} keeps the value \tt{x} alive during the execution
+ of the computation \tt{k}. }
with
strictness = { \ _arity -> mkClosedDmdSig [topDmd, topDmd, strictOnceApply1Dmd] topDiv }