7import IRTS.CodegenJavaScript
10import System.Environment
19showUsage = do putStrLn "A code generator which is intended to be called by the compiler, not by a user."
20 putStrLn "Usage: idris-codegen-javascript <ibc-files> [-o <output-file>]"
24getOpts = do xs <- getArgs
25 return $ process (Opts [] "main.js") xs
27 process opts ("-o":o:xs) = process (opts { output = o }) xs
28 process opts (x:xs) = process (opts { inputs = x:inputs opts }) xs
29 process opts [] = opts
31jsMain :: Opts -> Idris ()
32jsMain opts = do elabPrims
33 loadInputs (inputs opts) Nothing
35 ir <- compile (Via IBCFormat "javascript") (output opts) (Just mainProg)
36 runIO $ codegenJavaScript ir
39main = do opts <- getOpts
40 if (null (inputs opts))
42 else runMain (jsMain 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