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