11import System.Environment
16data Opts = Opts { inputs :: [FilePath],
19showUsage = do putStrLn "Usage: idris-c <ibc-files> [-o <output-file>]"
23getOpts = do xs <- getArgs
24 return $ process (Opts [] "a.out") xs
26 process opts ("-o":o:xs) = process (opts { output = o }) xs
27 process opts (x:xs) = process (opts { inputs = x:inputs opts }) xs
28 process opts [] = opts
30c_main :: Opts -> Idris ()
31c_main opts = do elabPrims
32 loadInputs (inputs opts) Nothing
34 ir <- compile (Via "c") (output opts) mainProg
38main = do opts <- getOpts
39 if (null (inputs opts))
41 else runMain (c_main opts)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list