11import System.Environment
17data Opts = Opts { inputs :: [FilePath],
21showUsage = do putStrLn "Usage: idris-c <ibc-files> [-o <output-file>]"
25getOpts = do xs <- getArgs
26 return $ process (Opts [] False "a.out") xs
28 process opts ("-o":o:xs) = process (opts { output = o }) xs
29 process opts ("--interface":xs) = process (opts { interface = True }) xs
30 process opts (x:xs) = process (opts { inputs = x:inputs opts }) xs
31 process opts [] = opts
33c_main :: Opts -> Idris ()
34c_main opts = do elabPrims
35 loadInputs (inputs opts) Nothing
36 mainProg <- if interface opts
37 then liftM Just elabMain
39 ir <- compile (Via "c") (output opts) mainProg
43main = do opts <- getOpts
44 if (null (inputs opts))
46 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