summaryrefslogtreecommitdiff
path: root/libraries/base/GHC/Stack
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-07-27 17:45:26 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-08-02 05:20:45 -0400
commitf29121438a4d6ee885373e32f24eaf85ffd167e1 (patch)
tree83ee4d2dfda3591e996fbcae8d5b24a029c4f190 /libraries/base/GHC/Stack
parent2df92ee17b1b34a6c1e8f956c06494df4ede184e (diff)
downloadhaskell-f29121438a4d6ee885373e32f24eaf85ffd167e1.tar.gz
Fix since annotations in GHC.Stack.CloneStack
Fixes #21894
Diffstat (limited to 'libraries/base/GHC/Stack')
-rw-r--r--libraries/base/GHC/Stack/CloneStack.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/libraries/base/GHC/Stack/CloneStack.hs b/libraries/base/GHC/Stack/CloneStack.hs
index 4b531ed875..ecf2383d8d 100644
--- a/libraries/base/GHC/Stack/CloneStack.hs
+++ b/libraries/base/GHC/Stack/CloneStack.hs
@@ -13,7 +13,7 @@
-- Such a "cloned" stack can be decoded with 'decode' to a stack trace, given
-- that the @-finfo-table-map@ is enabled.
--
--- @since 2.16.0.0
+-- @since 4.17.0.0
module GHC.Stack.CloneStack (
StackSnapshot(..),
StackEntry(..),
@@ -33,7 +33,7 @@ import GHC.Stable
-- | A frozen snapshot of the state of an execution stack.
--
--- @since 2.16.0.0
+-- @since 4.17.0.0
data StackSnapshot = StackSnapshot !StackSnapshot#
foreign import prim "stg_decodeStackzh" decodeStack# :: StackSnapshot# -> State# RealWorld -> (# State# RealWorld, Array# (Ptr InfoProvEnt) #)
@@ -182,14 +182,14 @@ The relevant notes are:
-- | Clone the stack of the executing thread
--
--- @since 2.16.0.0
+-- @since 4.17.0.0
cloneMyStack :: IO StackSnapshot
cloneMyStack = IO $ \s ->
case (cloneMyStack# s) of (# s1, stack #) -> (# s1, StackSnapshot stack #)
-- | Clone the stack of a thread identified by its 'ThreadId'
--
--- @since 2.16.0.0
+-- @since 4.17.0.0
cloneThreadStack :: ThreadId -> IO StackSnapshot
cloneThreadStack (ThreadId tid#) = do
resultVar <- newEmptyMVar @StackSnapshot
@@ -226,7 +226,7 @@ data StackEntry = StackEntry
-- the stack. (These are pushed every time when a @case ... of@ scrutinee
-- is evaluated.)
--
--- @since 2.16.0.0
+-- @since 4.17.0.0
decode :: StackSnapshot -> IO [StackEntry]
decode stackSnapshot = do
stackEntries <- getDecodedStackArray stackSnapshot