summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2018-04-21 12:22:18 +0100
committerSimon Marlow <marlowsd@gmail.com>2018-05-02 12:48:38 +0100
commitdc655bf0310012b193cf49cce9f5b0bfbc53764c (patch)
tree0c1472ce7ef3188eacbfacf6308a8f30d4fedd3d
parent60f9e46a5a2867127ca04ce4b87b370ec8170e55 (diff)
downloadhaskell-dc655bf0310012b193cf49cce9f5b0bfbc53764c.tar.gz
errorWithoutStackTrace: omit profiling stack trace (#14970)
Test Plan: validate Reviewers: hvr, bgamari, erikd Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D4648
-rw-r--r--libraries/base/GHC/Err.hs9
1 files changed, 4 insertions, 5 deletions
diff --git a/libraries/base/GHC/Err.hs b/libraries/base/GHC/Err.hs
index 4231fcefa5..3d64c95205 100644
--- a/libraries/base/GHC/Err.hs
+++ b/libraries/base/GHC/Err.hs
@@ -30,7 +30,9 @@ import GHC.Prim
import GHC.Integer () -- Make sure Integer is compiled first
-- because GHC depends on it in a wired-in way
-- so the build system doesn't see the dependency
-import {-# SOURCE #-} GHC.Exception( errorCallWithCallStackException )
+import {-# SOURCE #-} GHC.Exception
+ ( errorCallWithCallStackException
+ , errorCallException )
-- | 'error' stops execution and displays an error message.
error :: forall (r :: RuntimeRep). forall (a :: TYPE r).
@@ -46,10 +48,7 @@ error s = raise# (errorCallWithCallStackException s ?callStack)
-- @since 4.9.0.0
errorWithoutStackTrace :: forall (r :: RuntimeRep). forall (a :: TYPE r).
[Char] -> a
-errorWithoutStackTrace s =
- -- we don't have withFrozenCallStack yet, so we just inline the definition
- let ?callStack = freezeCallStack emptyCallStack
- in error s
+errorWithoutStackTrace s = raise# (errorCallException s)
-- Note [Errors in base]