From: simonmar Date: Mon, 13 Aug 2001 15:43:36 +0000 (+0000) Subject: [project @ 2001-08-13 15:43:36 by simonmar] X-Git-Tag: Approximately_9120_patches~1275 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;ds=sidebyside;h=eb6fb4cf7742dbdd10d1fa0702ff85b1c49084d4;p=ghc-hetmet.git [project @ 2001-08-13 15:43:36 by simonmar] resolveObjs now returns a Bool, indicating success --- diff --git a/ghc/compiler/ghci/Linker.lhs b/ghc/compiler/ghci/Linker.lhs index 5d16633..e7fb278 100644 --- a/ghc/compiler/ghci/Linker.lhs +++ b/ghc/compiler/ghci/Linker.lhs @@ -14,7 +14,7 @@ module Linker ( loadObj, -- :: String -> IO () unloadObj, -- :: String -> IO () lookupSymbol, -- :: String -> IO (Maybe (Ptr a)) - resolveObjs, -- :: IO () + resolveObjs, -- :: IO Bool addDLL -- :: String -> IO (Ptr CChar) ) where @@ -53,9 +53,7 @@ unloadObj str = do resolveObjs = do r <- c_resolveObjs - if (r == 0) - then panic "resolveObjs: failed" - else return () + return (r /= 0) -- returns True <=> success addDLL path lib = do maybe_errmsg <- c_addDLL (packString path) (packString lib) @@ -80,5 +78,4 @@ foreign import "initLinker" unsafe foreign import "addDLL" unsafe c_addDLL :: PackedString -> PackedString -> IO (Ptr CChar) - \end{code}