[commit: ghc] ghc-8.4: base: Fix Unicode handling of TyCon's Show instance (b88228d)

git at git.haskell.org git at git.haskell.org
Mon Mar 26 03:50:32 UTC 2018


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

On branch  : ghc-8.4
Link       : http://ghc.haskell.org/trac/ghc/changeset/b88228d5af6a795fc6bf7582160f271b23608fbe/ghc

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

commit b88228d5af6a795fc6bf7582160f271b23608fbe
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Sun Mar 25 22:12:49 2018 -0400

    base: Fix Unicode handling of TyCon's Show instance
    
    Test Plan: `make test TEST=T14925`
    
    Reviewers: hvr, dfeuer
    
    Reviewed By: dfeuer
    
    Subscribers: rwbarton, thomie, carter
    
    GHC Trac Issues: #14925
    
    Differential Revision: https://phabricator.haskell.org/D4530
    
    (cherry picked from commit 20ae19fc7297dceaefde8d3443099bfd9cd1e905)


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

b88228d5af6a795fc6bf7582160f271b23608fbe
 libraries/base/GHC/Show.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libraries/base/GHC/Show.hs b/libraries/base/GHC/Show.hs
index d1c6075..b639681 100644
--- a/libraries/base/GHC/Show.hs
+++ b/libraries/base/GHC/Show.hs
@@ -208,7 +208,7 @@ instance Show TyCon where
 
 -- | @since 4.9.0.0
 instance Show TrName where
-  showsPrec _ (TrNameS s) = showString (unpackCString# s)
+  showsPrec _ (TrNameS s) = showString (unpackCStringUtf8# s)
   showsPrec _ (TrNameD s) = showString s
 
 -- | @since 4.9.0.0



More information about the ghc-commits mailing list