on master help sign in
Fix Util.System so that it compiles again...
commita41e971173d5d9c6c204c7ef1019ee777b96ab56 authorEdwin Brady <ecb10@st-andrews.ac.uk> dateSat 1 Dec 2012, 13:09 (14 years ago) parent4fc1cbd
1 file changed+14−1
src/Util/System.hs+14−1
src/Util/System.hs+14−1
@@ -1,5 +1,6 @@
11{-# LANGUAGE CPP #-}
2−module Util.System(tempfile,environment,getCC,getLibFlags,getIdrisLibDir,getIncFlags,rmFile) where
2+module Util.System(tempfile,environment,getCC,
3+ getLibFlags,getIdrisLibDir,getIncFlags,rmFile) where
34
45-- System helper functions.
56
@@ -11,6 +12,8 @@ import System.IO
1112import Control.Exception as CE
1213#endif
1314
15+import Paths_idris
16+
1417#if MIN_VERSION_base(4,0,0)
1518catchIO :: IO a -> (IOError -> IO a) -> IO a
1619catchIO = CE.catch
@@ -38,3 +41,13 @@ rmFile f = do putStrLn $ "Removing " ++ f
3841 catchIO (removeFile f)
3942 (\ioerr -> putStrLn $ "WARNING: Cannot remove file "
4043 ++ f ++ ", Error msg:" ++ show ioerr)
44+
45+
46+getLibFlags = do dir <- getDataDir
47+ return $ "-L" ++ (dir </> "rts") ++ " -lidris_rts -lgmp -lpthread"
48+
49+getIdrisLibDir = do dir <- getDataDir
50+ return $ addTrailingPathSeparator dir
51+
52+getIncFlags = do dir <- getDataDir
53+ return $ "-I" ++ dir </> "rts"