on master help sign in
Merge branch 'master' of github.com:edwinb/Idris-dev
9e5f23bEdwin Brady
@@ -22,6 +22,11 @@ test_java:
22test_llvm:
22test_llvm:
23 $(MAKE) -C test IDRIS=../dist/build/idris test_llvm
23 $(MAKE) -C test IDRIS=../dist/build/idris test_llvm
24
24
25+test_all:
26+ $(MAKE) test
27+ $(MAKE) test_llvm
28+ $(MAKE) test_java
29+
25lib_clean:
30lib_clean:
26 $(MAKE) -C lib IDRIS=../dist/build/idris/idris RTS=../dist/build/rts/libidris_rts clean
31 $(MAKE) -C lib IDRIS=../dist/build/idris/idris RTS=../dist/build/rts/libidris_rts clean
27 $(MAKE) -C effects IDRIS=../dist/build/idris/idris RTS=../dist/build/rts/libidris_rts DIST=../dist/build clean
32 $(MAKE) -C effects IDRIS=../dist/build/idris/idris RTS=../dist/build/rts/libidris_rts DIST=../dist/build clean
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/Idris/REPL.hs+7
@@ -1131,6 +1131,13 @@ idrisMain opts =
1131 Nothing -> return ()
1131 Nothing -> return ()
1132 Just expr -> execScript expr
1132 Just expr -> execScript expr
1133
1133
1134+ -- Create Idris data dir + repl history and config dir
1135+ idrisCatch (do dir <- getIdrisUserDataDir
1136+ exists <- runIO $ doesDirectoryExist dir
1137+ unless exists $ iLOG ("Creating " ++ dir)
1138+ runIO $ createDirectoryIfMissing True (dir </> "repl"))
1139+ (\e -> return ())
1140+
1134 historyFile <- fmap (</> "repl" </> "history") getIdrisUserDataDir
1141 historyFile <- fmap (</> "repl" </> "history") getIdrisUserDataDir
1135
1142
1136 when runrepl $ initScript
1143 when runrepl $ initScript
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 :: ()