summaryrefslogtreecommitdiff
path: root/compiler/utils/Outputable.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/utils/Outputable.hs')
-rw-r--r--compiler/utils/Outputable.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/utils/Outputable.hs b/compiler/utils/Outputable.hs
index bb3b9d3177..b3d77aa843 100644
--- a/compiler/utils/Outputable.hs
+++ b/compiler/utils/Outputable.hs
@@ -609,8 +609,8 @@ quotes d =
else SDoc $ \sty ->
let pp_d = runSDoc d sty
str = show pp_d
- in case (str, snocView str) of
- (_, Just (_, '\'')) -> pp_d
+ in case (str, lastMaybe str) of
+ (_, Just '\'') -> pp_d
('\'' : _, _) -> pp_d
_other -> Pretty.quotes pp_d