@@ -86,6 +86,12 @@ process _ (Eval t) = do (tm, ty) <- elabVal toplevel False t
8686 logLvl 3 $ "Raw: " ++ show (tm', ty')
8787 iputStrLn (show (delab ist tm') ++ " : " ++
8888 show (delab ist ty'))
89+process _ (Check t) = do (tm, ty) <- elabVal toplevel False t
90+ ctxt <- getContext
91+ ist <- get
92+ let ty' = normaliseC ctxt [] ty
93+ iputStrLn (show (delab ist tm) ++ " : " ++
94+ show (delab ist ty'))
8995process _ (Spec t) = do (tm, ty) <- elabVal toplevel False t
9096 ctxt <- getContext
9197 ist <- get
@@ -101,6 +107,9 @@ process _ TTShell = do ist <- get
101107 let shst = initState (tt_ctxt ist)
102108 shst' <- lift $ runShell shst
103109 return ()
110+process _ (Execute f) = do compile f
111+ lift $ system ("./" ++ f)
112+ return ()
104113process _ (Compile f) = do compile f
105114process _ (LogLvl i) = setLogLevel i
106115process _ Metavars = do ist <- get
@@ -114,7 +123,7 @@ displayHelp = let vstr = showVersion version in
114123 "\nIdris version " ++ vstr ++ "\n" ++
115124 "--------------" ++ map (\x -> '-') vstr ++ "\n\n" ++
116125 concatMap cmdInfo help
117− where cmdInfo (cmds, args, text) = " " ++ col 14 14 (showSep " " cmds) args text
126+ where cmdInfo (cmds, args, text) = " " ++ col 16 12 (showSep " " cmds) args text
118127 col c1 c2 l m r =
119128 l ++ take (c1 - length l) (repeat ' ') ++
120129 m ++ take (c2 - length m) (repeat ' ') ++ r ++ "\n"
@@ -123,11 +132,13 @@ help =
123132 [ (["Command"], "Arguments", "Purpose"),
124133 ([""], "", ""),
125134 (["<expression>"], "", "Evaluate an expression"),
135+ ([":t"], "<expression>", "Check the type of an expression"),
126136 ([":r",":reload"], "", "Reload current file"),
127137 ([":e",":edit"], "", "Edit current file using $EDITOR or $VISUAL"),
128138 ([":m",":metavars"], "", "Show remaining proof obligations (metavariables)"),
129139 ([":p",":prove"], "<name>", "Prove a metavariable"),
130140 ([":c",":compile"], "<filename>", "Compile to an executable <filename>"),
141+ ([":exec",":execute"], "<filename>", "Compile to an executable <filename> and run"),
131142 ([":?",":h",":help"], "", "Display this help text"),
132143 ([":q",":quit"], "", "Exit the Idris system")
133144 ]