on master help sign in
Merge pull request #587 from david-christiansen/cpp-warnings
370b063Edwin Brady
src/Core/Execute.hs+2−1
@@ -37,7 +37,8 @@ import System.IO
37#ifndef IDRIS_FFI
37#ifndef IDRIS_FFI
38execute :: Term -> Idris Term
38execute :: Term -> Idris Term
39execute tm = fail "libffi not supported, rebuild Idris with -f FFI"
39execute tm = fail "libffi not supported, rebuild Idris with -f FFI"
40+#else
40−#else -- rest of file
41+-- else is rest of file
41readMay :: (Read a) => String -> Maybe a
42readMay :: (Read a) => String -> Maybe a
42readMay s = case reads s of
43readMay s = case reads s of
43 [(x, "")] -> Just x
44 [(x, "")] -> Just x
src/Util/DynamicLinker.hs+2−1
@@ -70,7 +70,8 @@ tryLoadFn fn (Lib _ h) = do cFn <- getProcAddress h fn
70 then return Nothing
70 then return Nothing
71 else return . Just $ Fun fn (castPtrToFunPtr cFn)
71 else return . Just $ Fun fn (castPtrToFunPtr cFn)
72#endif
72#endif
73+#else
73−#else -- no libffi, just add stubbs.
74+-- no libffi, just add stubbs.
74
75
75data DynamicLib = Lib { lib_name :: String
76data DynamicLib = Lib { lib_name :: String
76 , lib_handle :: ()
77 , lib_handle :: ()