From 75adc352549a43d4c37bd3bdade55cecf3d75bb1 Mon Sep 17 00:00:00 2001 From: Herbert Valerio Riedel Date: Sat, 25 Apr 2015 09:12:44 +0200 Subject: [PATCH] Add missing since-annotations for c024af131b9e2538 See also #9049 --- libraries/base/GHC/SrcLoc.hs | 7 +++++++ libraries/base/GHC/Stack.hsc | 7 ++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/libraries/base/GHC/SrcLoc.hs b/libraries/base/GHC/SrcLoc.hs index 16ebbab74c..23a109bd8f 100644 --- a/libraries/base/GHC/SrcLoc.hs +++ b/libraries/base/GHC/SrcLoc.hs @@ -1,4 +1,6 @@ {-# LANGUAGE RecordWildCards #-} + +-- | @since 4.8.2.0 module GHC.SrcLoc ( SrcLoc , srcLocPackage @@ -14,6 +16,8 @@ module GHC.SrcLoc ) where -- | A single location in the source code. +-- +-- @since 4.8.2.0 data SrcLoc = SrcLoc { srcLocPackage :: String , srcLocModule :: String @@ -24,6 +28,9 @@ data SrcLoc = SrcLoc , srcLocEndCol :: Int } deriving (Show, Eq) +-- | Pretty print 'SrcLoc' +-- +-- @since 4.8.2.0 showSrcLoc :: SrcLoc -> String showSrcLoc SrcLoc {..} = concat [ srcLocFile, ":" diff --git a/libraries/base/GHC/Stack.hsc b/libraries/base/GHC/Stack.hsc index 8c9f0c1f41..40fba7dcc8 100644 --- a/libraries/base/GHC/Stack.hsc +++ b/libraries/base/GHC/Stack.hsc @@ -24,6 +24,8 @@ module GHC.Stack ( errorWithStackTrace, -- ** Explicitly created via implicit-parameters + -- + -- @since 4.8.2.0 CallStack, getCallStack, showCallStack, @@ -171,11 +173,14 @@ errorWithStackTrace x = unsafeDupablePerformIO $ do -- that was called, the 'SrcLoc' is the call-site. The list is ordered with the -- most recently called function at the head. -- --- @since 4.9.0.0 +-- @since 4.8.2.0 data CallStack = CallStack { getCallStack :: [(String, SrcLoc)] } -- See Note [Overview of implicit CallStacks] deriving (Show, Eq) +-- | Pretty print 'CallStack' +-- +-- @since 4.8.2.0 showCallStack :: CallStack -> String showCallStack (CallStack (root:rest)) = unlines (showCallSite root : map (indent . showCallSite) rest) -- GitLab