X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fghci%2FByteCodeLink.lhs;h=fd6654579cad10a1c65666a5178ebe3eebe1ca72;hb=2423c249f5ca7785d0ec89eb33e72662da7561c1;hp=9e4be7d3d18a929d60403c4d8d4692833bc9c8bf;hpb=2847d8396b251236ccb86148e5f8f5e3775f37d2;p=ghc-hetmet.git diff --git a/compiler/ghci/ByteCodeLink.lhs b/compiler/ghci/ByteCodeLink.lhs index 9e4be7d..fd66545 100644 --- a/compiler/ghci/ByteCodeLink.lhs +++ b/compiler/ghci/ByteCodeLink.lhs @@ -1,10 +1,9 @@ % -% (c) The University of Glasgow 2000 +% (c) The University of Glasgow 2000-2006 % -\section[ByteCodeLink]{Bytecode assembler and linker} +ByteCodeLink: Bytecode assembler and linker \begin{code} - {-# OPTIONS -optc-DNON_POSIX_SOURCE #-} module ByteCodeLink ( @@ -15,21 +14,20 @@ module ByteCodeLink ( #include "HsVersions.h" -import ByteCodeItbls ( ItblEnv, ItblPtr ) -import ByteCodeAsm ( UnlinkedBCO(..), BCOPtr(..), sizeSS, ssElts ) -import ObjLink ( lookupSymbol ) +import ByteCodeItbls +import ByteCodeAsm +import ObjLink -import Name ( Name, nameModule, nameOccName ) +import Name import NameEnv -import OccName ( occNameFS ) -import PrimOp ( PrimOp, primOpOcc ) +import OccName +import PrimOp import Module -import PackageConfig ( mainPackageId, packageIdFS ) -import FastString ( FastString(..), unpackFS, zEncodeFS ) -import Panic ( GhcException(..) ) +import PackageConfig +import FastString +import Panic #ifdef DEBUG -import Name ( isExternalName ) import Outputable #endif @@ -157,10 +155,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