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 #-}
-- | @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, ":"
......
......@@ -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)
......
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