[commit: ghc] wip/exec-stack-on-error: base: Shoe execution stack on error calls (27b1034)
git at git.haskell.org
git at git.haskell.org
Thu Dec 27 16:59:09 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/exec-stack-on-error
Link : http://ghc.haskell.org/trac/ghc/changeset/27b1034cde62a97a7d41714d58ef3f90be4e0997/ghc
>---------------------------------------------------------------
commit 27b1034cde62a97a7d41714d58ef3f90be4e0997
Author: Ben Gamari <ben at smart-cactus.org>
Date: Tue Dec 18 09:27:53 2018 -0500
base: Shoe execution stack on error calls
>---------------------------------------------------------------
27b1034cde62a97a7d41714d58ef3f90be4e0997
libraries/base/GHC/Exception.hs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libraries/base/GHC/Exception.hs b/libraries/base/GHC/Exception.hs
index 3b32e23..ec564be 100644
--- a/libraries/base/GHC/Exception.hs
+++ b/libraries/base/GHC/Exception.hs
@@ -77,10 +77,12 @@ errorCallException s = toException (ErrorCall s)
errorCallWithCallStackException :: String -> CallStack -> SomeException
errorCallWithCallStackException s stk = unsafeDupablePerformIO $ do
ccsStack <- currentCallStack
+ execStack <- ExecutionStack.showStackTrace
let
implicitParamCallStack = prettyCallStackLines stk
ccsCallStack = showCCSStack ccsStack
- stack = intercalate "\n" $ implicitParamCallStack ++ ccsCallStack
+ stack = intercalate "\n"
+ $ implicitParamCallStack ++ ccsCallStack ++ [ "Execution Stack:" ] ++ execStack
return $ toException (ErrorCallWithLocation s stack)
showCCSStack :: [String] -> [String]
More information about the ghc-commits
mailing list