3import System.Console.Haskeline
5import System.Environment
11import Control.Monad ( when )
14import Idris.Core.Typecheck
15import Idris.Core.Evaluate
16import Idris.Core.Constraints
22import Idris.Primitives
25import Idris.CmdOptions
27import IRTS.System ( getLibFlags, getIdrisLibDir, getIncFlags )
29import Util.DynamicLinker
36-- Main program reads command line options, parses the main program, and gets
40main = do opts <- runArgParser
41 runMain (runIdris opts)
43runIdris :: [Opt] -> Idris ()
46 when (ShowLoggingCats `elem` opts) $ runIO showLoggingCats
47 when (ShowIncs `elem` opts) $ runIO showIncs
48 when (ShowLibs `elem` opts) $ runIO showLibs
49 when (ShowLibdir `elem` opts) $ runIO showLibdir
50 when (ShowPkgs `elem` opts) $ runIO showPkgs
51 case opt getClient opts of
53 (c:_) -> do setVerbose False
55 runIO $ runClient (getPort opts) c
57 case opt getPkgCheck opts of
59 fs -> do runIO $ mapM_ (checkPkg (WarnOnly `elem` opts) True) fs
61 case opt getPkgClean opts of
63 fs -> do runIO $ mapM_ cleanPkg fs
65 case opt getPkgMkDoc opts of -- IdrisDoc
67 fs -> do runIO $ mapM_ documentPkg fs
69 case opt getPkgTest opts of
71 fs -> do runIO $ mapM_ testPkg fs
73 case opt getPkg opts of
74 [] -> case opt getPkgREPL opts of
77 _ -> ifail "Too many packages"
78 fs -> runIO $ mapM_ (buildPkg (WarnOnly `elem` opts)) fs
81showver = do putStrLn $ "Idris version " ++ ver
85showLibs = do libFlags <- getLibFlags
86 putStrLn $ unwords libFlags
90showLibdir = do putStrLn =<< getIdrisLibDir
94showIncs = do incFlags <- getIncFlags
95 putStrLn $ unwords incFlags
98-- | List idris packages installed
100showPkgs = do mapM putStrLn =<< installedPackages
103showLoggingCats :: IO b
105 putStrLn loggingCatsStr
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