[commit: ghc] master: base: Fix Unicode handling of TyCon's Show instance (20ae19f)

git at git.haskell.org git at git.haskell.org
Mon Mar 26 02:13:26 UTC 2018


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/20ae19fc7297dceaefde8d3443099bfd9cd1e905/ghc

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

commit 20ae19fc7297dceaefde8d3443099bfd9cd1e905
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


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

20ae19fc7297dceaefde8d3443099bfd9cd1e905
 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 a7a7f89..798dff9 100644
--- a/libraries/base/GHC/Show.hs
+++ b/libraries/base/GHC/Show.hs
@@ -215,7 +215,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