[commit: ghc] master: Pretty: fix unicode arrow operators. (14c4090)

git at git.haskell.org git at git.haskell.org
Tue Sep 15 14:25:42 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/14c4090e384d9ac5bf434a8a77bbf552bf463023/ghc

>---------------------------------------------------------------

commit 14c4090e384d9ac5bf434a8a77bbf552bf463023
Author: Sebastian Reuße <seb at wirrsal.net>
Date:   Tue Sep 15 14:20:01 2015 +0200

    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


>---------------------------------------------------------------

14c4090e384d9ac5bf434a8a77bbf552bf463023
 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 a4893b9..a730cdf 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 3f5707b..2c1d5e5 100644
--- a/testsuite/tests/ghci/scripts/T8959.stderr
+++ b/testsuite/tests/ghci/scripts/T8959.stderr
@@ -13,7 +13,7 @@
 
 <interactive>:1:1:
     Arrow command found where an expression was expected:
-      () ↣ () ↢ () ⤜ () ⤛ ()
+      () ⤚ () ⤙ () ⤜ () ⤛ ()
 
 <interactive>: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 4f1ac7a..6a20f07 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’



More information about the ghc-commits mailing list