on master help sign in
Merge branch 'master' of github.com:edwinb/Idris-dev
commit9e5f23b769cc148b61389c031d87a9ada4174bc3 authorEdwin Brady <ecb10@st-andrews.ac.uk> dateSun 3 Nov 2013, 20:20 (13 years ago) parent057680a73f4393
4 files changed+16−2
Makefile+5 src/Core/Execute.hs+2−1 src/Idris/REPL.hs+7 src/Util/DynamicLinker.hs+2−1
Makefile+5
@@ -22,6 +22,11 @@ test_java:
2222test_llvm:
2323 $(MAKE) -C test IDRIS=../dist/build/idris test_llvm
2424
25+test_all:
26+ $(MAKE) test
27+ $(MAKE) test_llvm
28+ $(MAKE) test_java
29+
2530lib_clean:
2631 $(MAKE) -C lib IDRIS=../dist/build/idris/idris RTS=../dist/build/rts/libidris_rts clean
2732 $(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
3737#ifndef IDRIS_FFI
3838execute :: Term -> Idris Term
3939execute tm = fail "libffi not supported, rebuild Idris with -f FFI"
40−#else -- rest of file
40+#else
41+-- else is rest of file
4142readMay :: (Read a) => String -> Maybe a
4243readMay s = case reads s of
4344 [(x, "")] -> Just x
src/Idris/REPL.hs+7
@@ -1131,6 +1131,13 @@ idrisMain opts =
11311131 Nothing -> return ()
11321132 Just expr -> execScript expr
11331133
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+
11341141 historyFile <- fmap (</> "repl" </> "history") getIdrisUserDataDir
11351142
11361143 when runrepl $ initScript
src/Util/DynamicLinker.hs+2−1
@@ -70,7 +70,8 @@ tryLoadFn fn (Lib _ h) = do cFn <- getProcAddress h fn
7070 then return Nothing
7171 else return . Just $ Fun fn (castPtrToFunPtr cFn)
7272#endif
73−#else -- no libffi, just add stubbs.
73+#else
74+-- no libffi, just add stubbs.
7475
7576data DynamicLib = Lib { lib_name :: String
7677 , lib_handle :: ()