summaryrefslogtreecommitdiff
path: root/compiler/GHC/Builtin/primops.txt.pp
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Builtin/primops.txt.pp')
-rw-r--r--compiler/GHC/Builtin/primops.txt.pp17
1 files changed, 10 insertions, 7 deletions
diff --git a/compiler/GHC/Builtin/primops.txt.pp b/compiler/GHC/Builtin/primops.txt.pp
index 3bddd10285..f56687c351 100644
--- a/compiler/GHC/Builtin/primops.txt.pp
+++ b/compiler/GHC/Builtin/primops.txt.pp
@@ -2463,8 +2463,9 @@ primop CatchOp "catch#" GenPrimOp
has_side_effects = True
primop RaiseOp "raise#" GenPrimOp
- b -> o
- -- NB: the type variable "o" is "a", but with OpenKind
+ a -> p
+ -- NB: "p" is the same as "b" except it is representation-polymorphic
+ -- (we shouldn't use "o" here as that would conflict with "a")
with
-- In contrast to 'raiseIO#', which throws a *precise* exception,
-- exceptions thrown by 'raise#' are considered *imprecise*.
@@ -2831,10 +2832,10 @@ section "Weak pointers"
primtype Weak# b
--- note that tyvar "o" denotes openAlphaTyVar
+-- Note: "v" denotes a levity-polymorphic type variable
primop MkWeakOp "mkWeak#" GenPrimOp
- o -> b -> (State# RealWorld -> (# State# RealWorld, c #))
+ v -> b -> (State# RealWorld -> (# State# RealWorld, c #))
-> State# RealWorld -> (# State# RealWorld, Weak# b #)
{ {\tt mkWeak# k v finalizer s} creates a weak reference to value {\tt k},
with an associated reference to some value {\tt v}. If {\tt k} is still
@@ -2846,7 +2847,7 @@ primop MkWeakOp "mkWeak#" GenPrimOp
out_of_line = True
primop MkWeakNoFinalizerOp "mkWeakNoFinalizer#" GenPrimOp
- o -> b -> State# RealWorld -> (# State# RealWorld, Weak# b #)
+ v -> b -> State# RealWorld -> (# State# RealWorld, Weak# b #)
with
has_side_effects = True
out_of_line = True
@@ -2883,7 +2884,7 @@ primop FinalizeWeakOp "finalizeWeak#" GenPrimOp
out_of_line = True
primop TouchOp "touch#" GenPrimOp
- o -> State# RealWorld -> State# RealWorld
+ v -> State# RealWorld -> State# RealWorld
with
code_size = { 0 }
has_side_effects = True
@@ -3131,8 +3132,10 @@ section "Controlling object lifetime"
------------------------------------------------------------------------
-- See Note [keepAlive# magic] in GHC.CoreToStg.Prep.
+-- NB: "v" is the same as "a" except levity-polymorphic,
+-- and "p" is the same as "b" except representation-polymorphic
primop KeepAliveOp "keepAlive#" GenPrimOp
- o -> State# RealWorld -> (State# RealWorld -> p) -> p
+ v -> State# RealWorld -> (State# RealWorld -> p) -> p
{ \tt{keepAlive# x s k} keeps the value \tt{x} alive during the execution
of the computation \tt{k}. }
with