X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fghci%2FByteCodeLink.lhs;h=6bca06a8f39caa7f33510cf9f3e22e06a3d385d4;hb=e33c65e18c77b1c21bd3b10a594b6ad61171ecb0;hp=d294178e5d30d9e23fe1735b86c1e92bd60ba49f;hpb=61d2625ae2e6a4cdae2ffc92df828905e81c24cc;p=ghc-hetmet.git diff --git a/compiler/ghci/ByteCodeLink.lhs b/compiler/ghci/ByteCodeLink.lhs index d294178..6bca06a 100644 --- a/compiler/ghci/ByteCodeLink.lhs +++ b/compiler/ghci/ByteCodeLink.lhs @@ -20,9 +20,6 @@ import ByteCodeAsm ( UnlinkedBCO(..), BCOPtr(..), sizeSS, ssElts ) import ObjLink ( lookupSymbol ) import Name ( Name, nameModule, nameOccName ) -#ifdef DEBUG -import Name ( isExternalName ) -#endif import NameEnv import OccName ( occNameFS ) import PrimOp ( PrimOp, primOpOcc ) @@ -31,6 +28,11 @@ import PackageConfig ( mainPackageId, packageIdFS ) import FastString ( FastString(..), unpackFS, zEncodeFS ) import Panic ( GhcException(..) ) +#ifdef DEBUG +import Name ( isExternalName ) +import Outputable +#endif + -- Standard libraries import GHC.Word ( Word(..) ) @@ -155,10 +157,8 @@ mkPtrsArray ie ce n_ptrs ptrs = do newtype IOArray i e = IOArray (STArray RealWorld i e) -instance HasBounds IOArray where - bounds (IOArray marr) = bounds marr - instance MArray IOArray e IO where + getBounds (IOArray marr) = stToIO $ getBounds marr newArray lu init = stToIO $ do marr <- newArray lu init; return (IOArray marr) newArray_ lu = stToIO $ do @@ -272,7 +272,7 @@ nameToCLabel n suffix primopToCLabel :: PrimOp -> String{-suffix-} -> String primopToCLabel primop suffix - = let str = "GHCziPrimopWrappers_" ++ unpackFS (zEncodeFS (occNameFS (primOpOcc primop))) ++ '_':suffix + = let str = "base_GHCziPrimopWrappers_" ++ unpackFS (zEncodeFS (occNameFS (primOpOcc primop))) ++ '_':suffix in --trace ("primopToCLabel: " ++ str) str \end{code}