X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fghci%2FByteCodeGen.lhs;h=d7a477bfdc17459cf78ec201b02b4cf223948b46;hb=550421384b8364cdaf3135f7859c9f7d7ee1fff1;hp=1b8657aaedb8d58719a658ce3239aa9d6e1f160a;hpb=57573e7e61032482d6be16ed4ac86c2b4115fbfa;p=ghc-hetmet.git diff --git a/ghc/compiler/ghci/ByteCodeGen.lhs b/ghc/compiler/ghci/ByteCodeGen.lhs index 1b8657a..d7a477b 100644 --- a/ghc/compiler/ghci/ByteCodeGen.lhs +++ b/ghc/compiler/ghci/ByteCodeGen.lhs @@ -61,7 +61,7 @@ import Control.Exception ( throwDyn ) import GHC.Exts ( Int(..), ByteArray# ) import Control.Monad ( when ) -import Data.Char ( ord ) +import Data.Char ( ord, chr ) -- ----------------------------------------------------------------------------- -- Generating byte code for a complete module @@ -714,7 +714,7 @@ doCase d s p (_,scrut) = case l of MachInt i -> DiscrI (fromInteger i) MachFloat r -> DiscrF (fromRational r) MachDouble r -> DiscrD (fromRational r) - MachChar i -> DiscrI i + MachChar i -> DiscrI (ord i) _ -> pprPanic "schemeE(AnnCase).my_discr" (ppr l) maybe_ncons @@ -950,7 +950,7 @@ generateCCall d0 s p ccall_spec@(CCallSpec target cconv safety) fn args_r_to_l mkDummyLiteral :: PrimRep -> Literal mkDummyLiteral pr = case pr of - CharRep -> MachChar 0 + CharRep -> MachChar (chr 0) IntRep -> MachInt 0 WordRep -> MachWord 0 DoubleRep -> MachDouble 0