on master help sign in
Fix non-FFI build
18b8572Edwin Brady
src/Util/DynamicLinker.hs+9−5
@@ -100,13 +100,17 @@ data DynamicLib = Lib { lib_name :: String
100 }
100 }
101 deriving Eq
101 deriving Eq
102
102
103+data ForeignFun = forall a. Fun { fun_name :: String
104+ , fun_handle :: ()
105+ }
106+
103−tryLoadLib :: String -> IO (Maybe DynamicLib)
107+tryLoadLib :: [FilePath] -> String -> IO (Maybe DynamicLib)
104−tryLoadLib lib = do putStrLn $ "WARNING: Cannot load '" ++ lib ++ "' at compile time because Idris was compiled without libffi support."
108+tryLoadLib fps lib = do putStrLn $ "WARNING: Cannot load '" ++ lib ++ "' at compile time because Idris was compiled without libffi support."
105− return Nothing
109+ return Nothing
106
110
107tryLoadFn :: String -> DynamicLib -> IO (Maybe ForeignFun)
111tryLoadFn :: String -> DynamicLib -> IO (Maybe ForeignFun)
108−tryLoadLib fn lib = do putStrLn $ "WARNING: Cannot load '" ++ fn ++ "' at compile time because Idris was compiled without libffi support."
112+tryLoadFn fn lib = do putStrLn $ "WARNING: Cannot load '" ++ fn ++ "' at compile time because Idris was compiled without libffi support."
109− return Nothing
113+ return Nothing
110#endif
114#endif
111
115
112
116