From 14c4090e384d9ac5bf434a8a77bbf552bf463023 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Reu=C3=9Fe?= Date: Tue, 15 Sep 2015 14:20:01 +0200 Subject: Pretty: fix unicode arrow operators. As per issue #10509, the documentation gave the wrong glyphs for Unicode alternatives to the -< and >- arrow operators (the codepoints were correct, but the glyphs were not). The incorrect glyphs have also made it into the error output. This replaces those characters with the correct versions. GHC Trac Issues: #10883 --- compiler/utils/Outputable.hs | 4 ++-- testsuite/tests/ghci/scripts/T8959.stderr | 2 +- testsuite/tests/ghci/scripts/T8959b.stderr | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/compiler/utils/Outputable.hs b/compiler/utils/Outputable.hs index a4893b9bcd..a730cdfdcf 100644 --- a/compiler/utils/Outputable.hs +++ b/compiler/utils/Outputable.hs @@ -524,8 +524,8 @@ dcolon = unicodeSyntax (char '∷') (docToSDoc $ Pretty.ptext (sLit "::")) arrow = unicodeSyntax (char '→') (docToSDoc $ Pretty.ptext (sLit "->")) larrow = unicodeSyntax (char '←') (docToSDoc $ Pretty.ptext (sLit "<-")) darrow = unicodeSyntax (char '⇒') (docToSDoc $ Pretty.ptext (sLit "=>")) -arrowt = unicodeSyntax (char '↣') (docToSDoc $ Pretty.ptext (sLit ">-")) -larrowt = unicodeSyntax (char '↢') (docToSDoc $ Pretty.ptext (sLit "-<")) +arrowt = unicodeSyntax (char '⤚') (docToSDoc $ Pretty.ptext (sLit ">-")) +larrowt = unicodeSyntax (char '⤙') (docToSDoc $ Pretty.ptext (sLit "-<")) arrowtt = unicodeSyntax (char '⤜') (docToSDoc $ Pretty.ptext (sLit ">>-")) larrowtt = unicodeSyntax (char '⤛') (docToSDoc $ Pretty.ptext (sLit "-<<")) semi = docToSDoc $ Pretty.semi diff --git a/testsuite/tests/ghci/scripts/T8959.stderr b/testsuite/tests/ghci/scripts/T8959.stderr index 3f5707bd3a..2c1d5e5d25 100644 --- a/testsuite/tests/ghci/scripts/T8959.stderr +++ b/testsuite/tests/ghci/scripts/T8959.stderr @@ -13,7 +13,7 @@ :1:1: Arrow command found where an expression was expected: - () ↣ () ↢ () ⤜ () ⤛ () + () ⤚ () ⤙ () ⤜ () ⤛ () :13:15: Couldn't match expected type ‘()’ with actual type ‘Bool’ diff --git a/testsuite/tests/ghci/scripts/T8959b.stderr b/testsuite/tests/ghci/scripts/T8959b.stderr index 4f1ac7a97b..6a20f07421 100644 --- a/testsuite/tests/ghci/scripts/T8959b.stderr +++ b/testsuite/tests/ghci/scripts/T8959b.stderr @@ -6,8 +6,8 @@ T8959b.hs:5:7: T8959b.hs:8:7: Couldn't match expected type ‘()’ with actual type ‘t0 → m0 t0’ - In the expression: proc x -> do { return ↢ x } - In an equation for ‘bar’: bar = proc x -> do { return ↢ x } + In the expression: proc x -> do { return ⤙ x } + In an equation for ‘bar’: bar = proc x -> do { return ⤙ x } T8959b.hs:10:7: Couldn't match expected type ‘(∀ a2. a2 → a2) → a1’ -- cgit v1.2.1