From 302aee52b61b754267c48465e94683f4aeda3fe8 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Fri, 26 Jan 2018 13:06:34 -0500 Subject: base: Refactor Show ErrorCall instance into proper ShowS style Test Plan: Validate Reviewers: hvr, dfeuer Reviewed By: dfeuer Subscribers: dfeuer, rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4304 --- libraries/base/GHC/Exception.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- cgit v1.2.1