summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libraries/base/GHC/Exception.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/libraries/base/GHC/Exception.hs b/libraries/base/GHC/Exception.hs
index d3a6745fa5..37f47a6123 100644
--- a/libraries/base/GHC/Exception.hs
+++ b/libraries/base/GHC/Exception.hs
@@ -184,7 +184,8 @@ instance Exception ErrorCall
-- | @since 4.0.0.0
instance Show ErrorCall where
showsPrec _ (ErrorCallWithLocation err "") = showString err
- showsPrec _ (ErrorCallWithLocation err loc) = showString (err ++ '\n' : loc)
+ showsPrec _ (ErrorCallWithLocation err loc) =
+ showString err . showChar '\n' . showString loc
errorCallException :: String -> SomeException
errorCallException s = toException (ErrorCall s)