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