RtClosureInspect: Fix inspecting Char# on 64-bit big-endian
authorJames Clarke <jrtc27@jrtc27.com>
Mon, 16 Oct 2017 21:33:45 +0000 (17:33 -0400)
committerBen Gamari <ben@smart-cactus.org>
Mon, 16 Oct 2017 21:33:47 +0000 (17:33 -0400)
commitd6c33da89b97d0d2a3b3b8f8077de8a09432d086
tree2d5a46d3902be4326c9c1f5b6ae3da9e4eade401
parenta69fa5441c944d7f74c76bdae9f3dd198007ee42
RtClosureInspect: Fix inspecting Char# on 64-bit big-endian

Char# is represented with a full machine word, whereas Char's Storable
instance uses an Int32, so we can't just treat it like a single-element
Char array. Instead, read it as an Int and use chr to turn it into a
Char. This fixes Trac #11262.

Reviewers: austin, hvr, bgamari

Reviewed By: bgamari

Subscribers: rwbarton, thomie

GHC Trac Issues: #11262

Differential Revision: https://phabricator.haskell.org/D4089
compiler/ghci/RtClosureInspect.hs
testsuite/tests/ghci.debugger/scripts/all.T