X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fghci%2FByteCodeGen.lhs;h=d7a477bfdc17459cf78ec201b02b4cf223948b46;hb=433d69e5f54d14ab15e5bcb1abe1ea94517e8d9a;hp=7d94541ad92bd8700f4639cb422a7e8aa05db1a4;hpb=ce08a14f3d1f2bc05d76cfcfb9215bd9d5fc7e68;p=ghc-hetmet.git diff --git a/ghc/compiler/ghci/ByteCodeGen.lhs b/ghc/compiler/ghci/ByteCodeGen.lhs index 7d94541..d7a477b 100644 --- a/ghc/compiler/ghci/ByteCodeGen.lhs +++ b/ghc/compiler/ghci/ByteCodeGen.lhs @@ -34,7 +34,7 @@ import DataCon ( DataCon, dataConTag, fIRST_TAG, dataConTyCon, import TyCon ( tyConFamilySize, isDataTyCon, tyConDataCons, isUnboxedTupleTyCon ) import Class ( Class, classTyCon ) -import Type ( Type, repType, splitFunTys, dropForAlls ) +import Type ( Type, repType, splitFunTys, dropForAlls, pprType ) import Util import DataCon ( dataConRepArity ) import Var ( isTyVar ) @@ -48,7 +48,6 @@ import ErrUtils ( showPass, dumpIfSet_dyn ) import Unique ( mkPseudoUnique3 ) import FastString ( FastString(..), unpackFS ) import Panic ( GhcException(..) ) -import PprType ( pprType ) import SMRep ( arrWordsHdrSize, arrPtrsHdrSize, StgWord ) import Bitmap ( intsToReverseBitmap, mkBitmap ) import OrdList @@ -62,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 @@ -715,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 @@ -951,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