@@ -16,21 +16,18 @@ import Paths_idris
1616
1717import Util.System
1818
19−data Opts = Opts { really :: Bool,
20− inputs :: [FilePath],
19+data Opts = Opts { inputs :: [FilePath],
2120 interface :: Bool,
2221 output :: FilePath }
2322
2423showUsage = do putStrLn "A code generator which is intended to be called by the compiler, not by a user."
25− putStrLn "To call the code generator manually, pass the --yes-really option.\n"
26− putStrLn "Usage: idris-codegen-c [--yes-really] <ibc-files> [-o <output-file>]"
24+ putStrLn "Usage: idris-codegen-c <ibc-files> [-o <output-file>]"
2725 exitWith ExitSuccess
2826
2927getOpts :: IO Opts
3028getOpts = do xs <- getArgs
31− return $ process (Opts False [] False "a.out") xs
29+ return $ process (Opts [] False "a.out") xs
3230 where
33− process opts ("--yes-really":xs) = process (opts { really = True }) xs
3431 process opts ("-o":o:xs) = process (opts { output = o }) xs
3532 process opts ("--interface":xs) = process (opts { interface = True }) xs
3633 process opts (x:xs) = process (opts { inputs = x:inputs opts }) xs
@@ -50,8 +47,4 @@ main :: IO ()
5047main = do opts <- getOpts
5148 if (null (inputs opts))
5249 then showUsage
53− else if (not $ really opts)
54− then do putStrLn "This code generator is intended to be called by the Idris compiler. \
55− \Please pass Idris the '--codegen' flag to choose a backend."
56− exitWith ExitSuccess
57− else runMain (c_main opts)
50+ else runMain (c_main opts)