2017-12-21 19:35:55 +00:00
|
|
|
Index: ghc-8.2.1/compiler/ghci/RtClosureInspect.hs
|
2017-10-17 18:44:22 +00:00
|
|
|
===================================================================
|
2017-12-21 19:35:55 +00:00
|
|
|
--- ghc-8.2.1.orig/compiler/ghci/RtClosureInspect.hs
|
|
|
|
+++ ghc-8.2.1/compiler/ghci/RtClosureInspect.hs
|
2017-10-17 18:44:22 +00:00
|
|
|
@@ -55,6 +55,7 @@ import TysWiredIn
|
|
|
|
import DynFlags
|
|
|
|
import Outputable as Ppr
|
|
|
|
import GHC.Arr ( Array(..) )
|
|
|
|
+import GHC.Char
|
|
|
|
import GHC.Exts
|
|
|
|
import GHC.IO ( IO(..) )
|
|
|
|
|
2017-12-21 19:35:55 +00:00
|
|
|
@@ -487,7 +488,9 @@ cPprTermBase y =
|
2017-10-17 18:44:22 +00:00
|
|
|
repPrim :: TyCon -> [Word] -> SDoc
|
|
|
|
repPrim t = rep where
|
|
|
|
rep x
|
|
|
|
- | t == charPrimTyCon = text $ show (build x :: Char)
|
|
|
|
+ -- Char# uses native machine words, whereas Char's Storable instance uses
|
|
|
|
+ -- Int32, so we have to read it as an Int.
|
|
|
|
+ | t == charPrimTyCon = text $ show (chr (build x :: Int))
|
|
|
|
| t == intPrimTyCon = text $ show (build x :: Int)
|
|
|
|
| t == wordPrimTyCon = text $ show (build x :: Word)
|
|
|
|
| t == floatPrimTyCon = text $ show (build x :: Float)
|