diff options
author | Simon Marlow <marlowsd@gmail.com> | 2018-04-21 12:22:18 +0100 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2018-05-02 12:48:38 +0100 |
commit | dc655bf0310012b193cf49cce9f5b0bfbc53764c (patch) | |
tree | 0c1472ce7ef3188eacbfacf6308a8f30d4fedd3d /libraries/base | |
parent | 60f9e46a5a2867127ca04ce4b87b370ec8170e55 (diff) | |
download | haskell-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
Diffstat (limited to 'libraries/base')
-rw-r--r-- | libraries/base/GHC/Err.hs | 9 |
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] |