@@ -52,6 +52,7 @@ runIdris opts =
52 when (Usage `elem` opts) $ liftIO usage
52 when (Usage `elem` opts) $ liftIO usage
53 when (ShowIncs `elem` opts) $ liftIO showIncs
53 when (ShowIncs `elem` opts) $ liftIO showIncs
54 when (ShowLibs `elem` opts) $ liftIO showLibs
54 when (ShowLibs `elem` opts) $ liftIO showLibs
55+ when (ShowLibdir `elem` opts) $ liftIO showLibdir
55 setREPL runrepl
56 setREPL runrepl
56 setVerbose runrepl
57 setVerbose runrepl
57 when (Verbose `elem` opts) $ setVerbose True
58 when (Verbose `elem` opts) $ setVerbose True
@@ -133,6 +134,10 @@ showLibs = do dir <- getDataDir
133 putStrLn $ "-L" ++ dir ++ "/rts -lidris_rts -lgmp -lpthread"
134 putStrLn $ "-L" ++ dir ++ "/rts -lidris_rts -lgmp -lpthread"
134 exitWith ExitSuccess
135 exitWith ExitSuccess
137+showLibdir = do dir <- getDataDir
138+ putStrLn $ dir ++ "/"
139+ exitWith ExitSuccess
136showIncs = do dir <- getDataDir
141showIncs = do dir <- getDataDir
137 putStrLn $ "-I" ++ dir ++ "/rts"
142 putStrLn $ "-I" ++ dir ++ "/rts"
138 exitWith ExitSuccess
143 exitWith ExitSuccess
@@ -150,6 +155,7 @@ parseArgs ("--nocoverage":ns) = liftM (NoCoverage : ) (parseArgs ns)
150parseArgs ("--errorcontext":ns) = liftM (ErrContext : ) (parseArgs ns)
155parseArgs ("--errorcontext":ns) = liftM (ErrContext : ) (parseArgs ns)
151parseArgs ("--help":ns) = liftM (Usage : ) (parseArgs ns)
156parseArgs ("--help":ns) = liftM (Usage : ) (parseArgs ns)
152parseArgs ("--link":ns) = liftM (ShowLibs : ) (parseArgs ns)
157parseArgs ("--link":ns) = liftM (ShowLibs : ) (parseArgs ns)
158+parseArgs ("--libdir":ns) = liftM (ShowLibdir : ) (parseArgs ns)
153parseArgs ("--include":ns) = liftM (ShowIncs : ) (parseArgs ns)
159parseArgs ("--include":ns) = liftM (ShowIncs : ) (parseArgs ns)
154parseArgs ("--version":ns) = liftM (Ver : ) (parseArgs ns)
160parseArgs ("--version":ns) = liftM (Ver : ) (parseArgs ns)
155parseArgs ("--verbose":ns) = liftM (Verbose : ) (parseArgs ns)
161parseArgs ("--verbose":ns) = liftM (Verbose : ) (parseArgs ns)
@@ -178,6 +184,7 @@ usagemsg = "Idris version " ++ ver ++ "\n" ++
178 "\t--noprelude Don't import the prelude\n" ++
184 "\t--noprelude Don't import the prelude\n" ++
179 "\t--typeintype Disable universe checking\n" ++
185 "\t--typeintype Disable universe checking\n" ++
180 "\t--log [level] Set debugging log level\n" ++
186 "\t--log [level] Set debugging log level\n" ++
187+ "\t--libdir Show library install directory and exit\n" ++
181− "\t--link Show library directories and exit (for C linking)\n" ++
188+ "\t--link Show C library directories and exit (for C linking)\n" ++
182− "\t--include Show include directories and exit (for C linking)\n"
189+ "\t--include Show C include directories and exit (for C linking)\n"