Commit 75adc352 authored by Herbert Valerio Riedel's avatar Herbert Valerio Riedel 🕺

Add missing since-annotations for c024af13

See also #9049
parent c4e8097e
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE RecordWildCards #-}
-- | @since 4.8.2.0
module GHC.SrcLoc module GHC.SrcLoc
( SrcLoc ( SrcLoc
, srcLocPackage , srcLocPackage
...@@ -14,6 +16,8 @@ module GHC.SrcLoc ...@@ -14,6 +16,8 @@ module GHC.SrcLoc
) where ) where
-- | A single location in the source code. -- | A single location in the source code.
--
-- @since 4.8.2.0
data SrcLoc = SrcLoc data SrcLoc = SrcLoc
{ srcLocPackage :: String { srcLocPackage :: String
, srcLocModule :: String , srcLocModule :: String
...@@ -24,6 +28,9 @@ data SrcLoc = SrcLoc ...@@ -24,6 +28,9 @@ data SrcLoc = SrcLoc
, srcLocEndCol :: Int , srcLocEndCol :: Int
} deriving (Show, Eq) } deriving (Show, Eq)
-- | Pretty print 'SrcLoc'
--
-- @since 4.8.2.0
showSrcLoc :: SrcLoc -> String showSrcLoc :: SrcLoc -> String
showSrcLoc SrcLoc {..} showSrcLoc SrcLoc {..}
= concat [ srcLocFile, ":" = concat [ srcLocFile, ":"
......
...@@ -24,6 +24,8 @@ module GHC.Stack ( ...@@ -24,6 +24,8 @@ module GHC.Stack (
errorWithStackTrace, errorWithStackTrace,
-- ** Explicitly created via implicit-parameters -- ** Explicitly created via implicit-parameters
--
-- @since 4.8.2.0
CallStack, CallStack,
getCallStack, getCallStack,
showCallStack, showCallStack,
...@@ -171,11 +173,14 @@ errorWithStackTrace x = unsafeDupablePerformIO $ do ...@@ -171,11 +173,14 @@ errorWithStackTrace x = unsafeDupablePerformIO $ do
-- that was called, the 'SrcLoc' is the call-site. The list is ordered with the -- that was called, the 'SrcLoc' is the call-site. The list is ordered with the
-- most recently called function at the head. -- most recently called function at the head.
-- --
-- @since 4.9.0.0 -- @since 4.8.2.0
data CallStack = CallStack { getCallStack :: [(String, SrcLoc)] } data CallStack = CallStack { getCallStack :: [(String, SrcLoc)] }
-- See Note [Overview of implicit CallStacks] -- See Note [Overview of implicit CallStacks]
deriving (Show, Eq) deriving (Show, Eq)
-- | Pretty print 'CallStack'
--
-- @since 4.8.2.0
showCallStack :: CallStack -> String showCallStack :: CallStack -> String
showCallStack (CallStack (root:rest)) showCallStack (CallStack (root:rest))
= unlines (showCallSite root : map (indent . showCallSite) rest) = unlines (showCallSite root : map (indent . showCallSite) rest)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment