X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fghci%2FLinker.lhs;h=c876b0a7f9a6306653feac7ab3135c4cc190dafa;hb=292c077de7dbe98eb44911648f16e243b40db2ac;hp=440ff11506d3ec69b8d1a8e98542e736dde2aba7;hpb=8894fd8508fc5ac3b793187c323e4732a73b4a24;p=ghc-hetmet.git diff --git a/ghc/compiler/ghci/Linker.lhs b/ghc/compiler/ghci/Linker.lhs index 440ff11..c876b0a 100644 --- a/ghc/compiler/ghci/Linker.lhs +++ b/ghc/compiler/ghci/Linker.lhs @@ -10,47 +10,13 @@ module Linker ( unloadObj, -- :: String -> IO () lookupSymbol, -- :: String -> IO (Maybe Addr) resolveObjs, -- :: IO () - linkPrelude -- tmp ) where -import IO -import Exception import Addr import PrelByteArr import PrelPack (packString) import Panic ( panic ) -#if __GLASGOW_HASKELL__ <= 408 -loadObj = bogus "loadObj" -unloadObj = bogus "unloadObj" -lookupSymbol = bogus "lookupSymbol" -resolveObjs = bogus "resolveObjs" -linkPrelude = bogus "linkPrelude" -bogus f = panic ("Linker." ++ f ++ ": this hsc was built without an interpreter.") - -#else - -linkPrelude = do - hPutStr stderr "Loading HSstd_cbits.o..." - loadObj "/home/simonmar/builds/i386-unknown-linux-boot/ghc/lib/std/cbits/HSstd_cbits.o" - hPutStr stderr "done.\n" - hPutStr stderr "Resolving..." - resolveObjs - hPutStr stderr "done.\n" - hPutStr stderr "Loading HSstd.o..." - loadObj "/home/simonmar/builds/i386-unknown-linux-boot/ghc/lib/std/HSstd.o" - hPutStr stderr "done.\n" - hPutStr stderr "Resolving..." - resolveObjs - hPutStr stderr "done.\n" -{- - hPutStr stderr "Unloading HSstd.o..." - unloadObj "/home/simonmar/builds/i386-unknown-linux-boot/ghc/lib/std/HSstd.o" - hPutStr stderr "done.\n" - unloadObj "/home/simonmar/builds/i386-unknown-linux-boot/ghc/lib/std/cbits/HSstd_cbits.o" - hPutStr stderr "done.\n" --} - -- --------------------------------------------------------------------------- -- RTS Linker Interface -- --------------------------------------------------------------------------- @@ -64,19 +30,19 @@ lookupSymbol str = do loadObj str = do r <- c_loadObj (packString str) if (r == 0) - then error "loadObj: failed" + then panic "loadObj: failed" else return () unloadObj str = do r <- c_unloadObj (packString str) if (r == 0) - then error "unloadObj: failed" + then panic "unloadObj: failed" else return () resolveObjs = do r <- c_resolveObjs if (r == 0) - then error "resolveObjs: failed" + then panic "resolveObjs: failed" else return () @@ -93,6 +59,4 @@ foreign import "unloadObj" unsafe foreign import "resolveObjs" unsafe c_resolveObjs :: IO Int - -#endif /* __GLASGOW_HASKELL__ <= 408 */ \end{code}