summaryrefslogtreecommitdiff
path: root/ghc/compiler/ghci/ByteCodeAsm.lhs
diff options
context:
space:
mode:
Diffstat (limited to 'ghc/compiler/ghci/ByteCodeAsm.lhs')
-rw-r--r--ghc/compiler/ghci/ByteCodeAsm.lhs3
1 files changed, 2 insertions, 1 deletions
diff --git a/ghc/compiler/ghci/ByteCodeAsm.lhs b/ghc/compiler/ghci/ByteCodeAsm.lhs
index 928d5e3fdd..53340e78cd 100644
--- a/ghc/compiler/ghci/ByteCodeAsm.lhs
+++ b/ghc/compiler/ghci/ByteCodeAsm.lhs
@@ -43,6 +43,7 @@ import Data.Array.Base ( UArray(..) )
import Data.Array.ST ( castSTUArray )
import Foreign ( Word16, free )
import Data.Int ( Int64 )
+import Data.Char ( ord )
import GHC.Base ( ByteArray# )
import GHC.IOBase ( IO(..) )
@@ -349,7 +350,7 @@ mkBits findLabel st proto_insns
literal st (MachInt j) = int st (fromIntegral j)
literal st (MachFloat r) = float st (fromRational r)
literal st (MachDouble r) = double st (fromRational r)
- literal st (MachChar c) = int st c
+ literal st (MachChar c) = int st (ord c)
literal st (MachInt64 ii) = int64 st (fromIntegral ii)
literal st (MachWord64 ii) = int64 st (fromIntegral ii)
literal st other = pprPanic "ByteCodeLink.literal" (ppr other)