import ObjLink ( lookupSymbol )
import Name ( Name, nameModule, nameOccName )
-#ifdef DEBUG
-import Name ( isExternalName )
-#endif
import NameEnv
import OccName ( occNameFS )
import PrimOp ( PrimOp, primOpOcc )
import FastString ( FastString(..), unpackFS, zEncodeFS )
import Panic ( GhcException(..) )
+#ifdef DEBUG
+import Name ( isExternalName )
+import Outputable
+#endif
+
-- Standard libraries
import GHC.Word ( Word(..) )
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
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}