summaryrefslogtreecommitdiff
path: root/libraries/base/GHC/Err.hs
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/base/GHC/Err.hs')
-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]