summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-07-27 17:45:26 +0100
committerMatthew Pickering <matthewtpickering@gmail.com>2022-07-27 17:45:26 +0100
commitabd62256ea2fb78990ee83464abc7e2a291a7731 (patch)
tree31bf73b22acd7f5063b5dc177540377721959aeb
parent25c24535ad51aa22b9cae425c6ac4ad9a8f1e1e9 (diff)
downloadhaskell-wip/since-annot-clonestack.tar.gz
Fix since annotations in GHC.Stack.CloneStackwip/since-annot-clonestack
Fixes #21894
-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