summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis King <lexi.lambda@gmail.com>2022-09-15 15:28:58 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-09-16 14:01:11 -0400
commitdf35d99465d1037b31cbd05aa3380fce6031af73 (patch)
treed62fb98b008d4189866897f82b72cc06ee4f959f
parent616afde3e2c6b733c8a44205a140ec8586853d3c (diff)
downloadhaskell-df35d99465d1037b31cbd05aa3380fce6031af73.tar.gz
Add links to the continuations haddocks in the docs for each primop
fixes #22176
-rw-r--r--compiler/GHC/Builtin/primops.txt.pp8
-rw-r--r--docs/users_guide/9.6.1-notes.rst2
2 files changed, 8 insertions, 2 deletions
diff --git a/compiler/GHC/Builtin/primops.txt.pp b/compiler/GHC/Builtin/primops.txt.pp
index 3a76c33819..9e58d5b7eb 100644
--- a/compiler/GHC/Builtin/primops.txt.pp
+++ b/compiler/GHC/Builtin/primops.txt.pp
@@ -2634,7 +2634,9 @@ primop MaskStatus "getMaskingState#" GenPrimOp
------------------------------------------------------------------------
section "Continuations"
- { These operations provide access to first-class delimited continuations,
+ { #continuations#
+
+ These operations provide access to first-class delimited continuations,
which allow a computation to access and manipulate portions of its
/current continuation/. Operationally, they are implemented by direct
manipulation of the RTS call stack, which may provide significant
@@ -2791,9 +2793,11 @@ section "Continuations"
------------------------------------------------------------------------
primtype PromptTag# a
+ { See "GHC.Prim#continuations". }
primop NewPromptTagOp "newPromptTag#" GenPrimOp
State# RealWorld -> (# State# RealWorld, PromptTag# a #)
+ { See "GHC.Prim#continuations". }
with
out_of_line = True
has_side_effects = True
@@ -2802,6 +2806,7 @@ primop PromptOp "prompt#" GenPrimOp
PromptTag# a
-> (State# RealWorld -> (# State# RealWorld, a #))
-> State# RealWorld -> (# State# RealWorld, a #)
+ { See "GHC.Prim#continuations". }
with
strictness = { \ _arity -> mkClosedDmdSig [topDmd, strictOnceApply1Dmd, topDmd] topDiv }
out_of_line = True
@@ -2813,6 +2818,7 @@ primop Control0Op "control0#" GenPrimOp
-> State# RealWorld -> (# State# RealWorld, a #))
-> State# RealWorld -> (# State# RealWorld, a #))
-> State# RealWorld -> (# State# RealWorld, p #)
+ { See "GHC.Prim#continuations". }
with
strictness = { \ _arity -> mkClosedDmdSig [topDmd, lazyApply2Dmd, topDmd] topDiv }
out_of_line = True
diff --git a/docs/users_guide/9.6.1-notes.rst b/docs/users_guide/9.6.1-notes.rst
index d78ec969b9..4d71cda7bc 100644
--- a/docs/users_guide/9.6.1-notes.rst
+++ b/docs/users_guide/9.6.1-notes.rst
@@ -91,7 +91,7 @@ Runtime system
no safe API to access this functionality is provided anywhere in ``base``.
Instead, the ``prompt#`` and ``control0#`` primops are intended to be consumed
by library authors directly, who may wrap them a safe API that maintains the
- necessary invariants. See the documentation in ``GHC.Exts`` for more details.
+ necessary invariants. See the documentation in ``GHC.Prim`` for more details.
``base`` library
~~~~~~~~~~~~~~~~