diff --git a/src/System/Plugins/Load.hs b/src/System/Plugins/Load.hs index a081a8d..8d34f4b 100644 --- a/src/System/Plugins/Load.hs +++ b/src/System/Plugins/Load.hs @@ -675,7 +675,7 @@ getImports m = do -- --------------------------------------------------------------------- -- C interface -- -foreign import ccall unsafe "lookupSymbol" +foreign import ccall threadsafe "lookupSymbol" c_lookupSymbol :: CString -> IO (Ptr a) foreign import ccall unsafe "loadObj" diff --git a/src/System/Plugins/LoadTypes.hs b/src/System/Plugins/LoadTypes.hs index 5aa9435..daab96f 100644 --- a/src/System/Plugins/LoadTypes.hs +++ b/src/System/Plugins/LoadTypes.hs @@ -37,12 +37,13 @@ type Type = String type Errors = [String] type PackageConf = FilePath -data Module = Module { path :: !FilePath - , mname :: !String - , kind :: !ObjType +data Module = Module { path :: !FilePath + , mname :: !String + , kind :: !ObjType , iface :: Iface -- cache the iface , key :: Key } + instance Ord Module where compare m1 m2 = mname m1 `compare` mname m2