@@ -81,21 +81,31 @@ processInput cmd orig inputs
8181 (f:_) -> f
8282 _ -> ""
8383 case parseCmd i cmd of
84− Left err -> do liftIO $ print err
85− return (Just inputs)
86− Right Reload -> do put (orig { idris_options = idris_options i })
87− clearErr
88− mods <- mapM loadModule inputs
89− return (Just inputs)
90− Right Edit -> do edit fn orig
91− return (Just inputs)
92− Right Proofs -> do proofs orig
93− return (Just inputs)
94− Right Quit -> do iputStrLn "Bye bye"
95− return Nothing
96− Right cmd -> do idrisCatch (process fn cmd)
97− (\e -> iputStrLn (show e))
98− return (Just inputs)
84+ Left err -> do liftIO $ print err
85+ return (Just inputs)
86+ Right Reload ->
87+ do put (orig { idris_options = idris_options i })
88+ clearErr
89+ mods <- mapM loadModule inputs
90+ return (Just inputs)
91+ Right (Load f) ->
92+ do put (orig { idris_options = idris_options i })
93+ clearErr
94+ mod <- loadModule f
95+ return (Just [f])
96+ Right (ModImport f) ->
97+ do clearErr
98+ fmod <- loadModule f
99+ return (Just (inputs ++ [fmod]))
100+ Right Edit -> do edit fn orig
101+ return (Just inputs)
102+ Right Proofs -> do proofs orig
103+ return (Just inputs)
104+ Right Quit -> do iputStrLn "Bye bye"
105+ return Nothing
106+ Right cmd -> do idrisCatch (process fn cmd)
107+ (\e -> iputStrLn (show e))
108+ return (Just inputs)
99109
100110resolveProof :: Name -> Idris Name
101111resolveProof n'
@@ -438,6 +448,8 @@ help =
438448 ([":i", ":info"], "<name>", "Display information about a type class"),
439449 ([":total"], "<name>", "Check the totality of a name"),
440450 ([":r",":reload"], "", "Reload current file"),
451+ ([":l",":load"], "<filename>", "Load a new file"),
452+ ([":m",":module"], "<module>", "Import an extra module"),
441453 ([":e",":edit"], "", "Edit current file using $EDITOR or $VISUAL"),
442454 ([":m",":metavars"], "", "Show remaining proof obligations (metavariables)"),
443455 ([":p",":prove"], "<name>", "Prove a metavariable"),