X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fghci%2FLinker.lhs;h=e7fb27800cc5218685bd9b3a382179893141f539;hb=eb6fb4cf7742dbdd10d1fa0702ff85b1c49084d4;hp=5d1663327ac28c12c296158437bf7e0a28732b81;hpb=e2d33dee4237d7fdf34655f0fb88a59481f9763b;p=ghc-hetmet.git 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}