X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fghci%2FByteCodeAsm.lhs;h=4d360e1ffe3cbf4f8e8904cd9c09e6ed418c6e0a;hb=d436c70d43fb905c63220040168295e473f4b90a;hp=24fda15ce9a779f9f475ff70a4e8c3ad78603713;hpb=497302c44ad08c6c27d0e15d94a787f332c0cfec;p=ghc-hetmet.git diff --git a/compiler/ghci/ByteCodeAsm.lhs b/compiler/ghci/ByteCodeAsm.lhs index 24fda15..4d360e1 100644 --- a/compiler/ghci/ByteCodeAsm.lhs +++ b/compiler/ghci/ByteCodeAsm.lhs @@ -46,9 +46,14 @@ import Data.Int ( Int64 ) import Data.Char ( ord ) import GHC.Base ( ByteArray#, MutableByteArray#, RealWorld ) -import GHC.IOBase ( IO(..) ) import GHC.Ptr ( Ptr(..) ) +#if __GLASGOW_HASKELL__ >= 611 +import GHC.IO ( IO(..) ) +#else +import GHC.IOBase ( IO(..) ) +#endif + -- ----------------------------------------------------------------------------- -- Unlinked BCOs @@ -154,10 +159,10 @@ assembleBCO (ProtoBCO nm instrs bitmap bsize arity _origin _malloced) insns_arr | n_insns > 65535 = panic "linkBCO: >= 64k insns in BCO" | otherwise = mkInstrArray n_insns asm_insns - insns_barr = case insns_arr of UArray _lo _hi _n barr -> barr + !insns_barr = case insns_arr of UArray _lo _hi _n barr -> barr bitmap_arr = mkBitmapArray bsize bitmap - bitmap_barr = case bitmap_arr of UArray _lo _hi _n barr -> barr + !bitmap_barr = case bitmap_arr of UArray _lo _hi _n barr -> barr let ul_bco = UnlinkedBCO nm arity insns_barr bitmap_barr final_lits final_ptrs @@ -385,7 +390,7 @@ mkBits findLabel st proto_insns literal st (MachLabel fs _ _) = litlabel st fs literal st (MachWord w) = int st (fromIntegral w) literal st (MachInt j) = int st (fromIntegral j) - literal st MachNullAddr = int st (fromIntegral 0) + literal st MachNullAddr = int st 0 literal st (MachFloat r) = float st (fromRational r) literal st (MachDouble r) = double st (fromRational r) literal st (MachChar c) = int st (ord c)