From b31959221dcf3410f4cc3b7710478e9eaf9ea783 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Thu, 23 Mar 2023 12:47:15 -0400 Subject: ghc-prim: Generalize keepAlive#/touch# in state token type Closes #23163. --- compiler/GHC/Builtin/primops.txt.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler') diff --git a/compiler/GHC/Builtin/primops.txt.pp b/compiler/GHC/Builtin/primops.txt.pp index 559b8a972d..5b730c1943 100644 --- a/compiler/GHC/Builtin/primops.txt.pp +++ b/compiler/GHC/Builtin/primops.txt.pp @@ -3407,7 +3407,7 @@ primop FinalizeWeakOp "finalizeWeak#" GenPrimOp out_of_line = True primop TouchOp "touch#" GenPrimOp - v -> State# RealWorld -> State# RealWorld + v -> State# s -> State# s with code_size = { 0 } has_side_effects = True @@ -3723,7 +3723,7 @@ section "Controlling object lifetime" -- and "p" is the same as "b" except representation-polymorphic. -- See Note [Levity and representation polymorphic primops] primop KeepAliveOp "keepAlive#" GenPrimOp - v -> State# RealWorld -> (State# RealWorld -> p) -> p + v -> State# s -> (State# s -> p) -> p { @'keepAlive#' x s k@ keeps the value @x@ alive during the execution of the computation @k@. -- cgit v1.2.1