[commit: ghc] master: GHC.Stack: Fix Haddock markup (d36e9e1)

git at git.haskell.org git at git.haskell.org
Wed Dec 16 15:56:50 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/d36e9e12b2f308e0d23db68889c18d01b6512bcc/ghc

>---------------------------------------------------------------

commit d36e9e12b2f308e0d23db68889c18d01b6512bcc
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Wed Dec 16 12:27:34 2015 +0100

    GHC.Stack: Fix Haddock markup


>---------------------------------------------------------------

d36e9e12b2f308e0d23db68889c18d01b6512bcc
 libraries/base/GHC/Stack/CCS.hsc  | 3 +--
 libraries/base/GHC/Stack/Types.hs | 9 ++++++++-
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/libraries/base/GHC/Stack/CCS.hsc b/libraries/base/GHC/Stack/CCS.hsc
index 6d62a1e..b62c80a 100644
--- a/libraries/base/GHC/Stack/CCS.hsc
+++ b/libraries/base/GHC/Stack/CCS.hsc
@@ -75,7 +75,7 @@ ccModule p = (# peek CostCentre, module) p
 ccSrcSpan :: Ptr CostCentre -> IO CString
 ccSrcSpan p = (# peek CostCentre, srcloc) p
 
--- | returns a '[String]' representing the current call stack.  This
+-- | Returns a @[String]@ representing the current call stack.  This
 -- can be useful for debugging.
 --
 -- The implementation uses the call-stack simulation maintined by the
@@ -85,7 +85,6 @@ ccSrcSpan p = (# peek CostCentre, srcloc) p
 -- uninformative.
 --
 -- @since 4.5.0.0
-
 currentCallStack :: IO [String]
 currentCallStack = ccsToStrings =<< getCurrentCCS ()
 
diff --git a/libraries/base/GHC/Stack/Types.hs b/libraries/base/GHC/Stack/Types.hs
index f877f7e..ebe4591 100644
--- a/libraries/base/GHC/Stack/Types.hs
+++ b/libraries/base/GHC/Stack/Types.hs
@@ -65,10 +65,14 @@ import GHC.Integer ()
 -- myerror msg = error (msg ++ "\n" ++ prettyCallStack ?callStack)
 -- @
 --
+-- Will produce the following when evaluated,
+--
+-- @
 -- ghci> myerror "die"
 -- *** Exception: die
 -- CallStack (from ImplicitParams):
 --   myerror, called at <interactive>:2:1 in interactive:Ghci1
+-- @
 --
 -- @CallStack at s do not interact with the RTS and do not require compilation with
 -- @-prof at . On the other hand, as they are built up explicitly using
@@ -80,7 +84,10 @@ import GHC.Integer ()
 -- ordered with the most recently called function at the head.
 --
 -- @since 4.8.1.0
-data CallStack = CallStack { getCallStack :: [([Char], SrcLoc)] }
+data CallStack = CallStack { getCallStack :: [([Char], SrcLoc)]
+                             -- ^ Get a list of stack frames with the most
+                             -- recently called function at the head.
+                           }
   -- See Note [Overview of implicit CallStacks]
 
 



More information about the ghc-commits mailing list