Add enhanced REPL with rustyline
REPL improvements: - Tab completion for keywords, commands, and user definitions - Persistent history saved to ~/.lux_history - Better line editing with Emacs keybindings - Ctrl-C to cancel input, Ctrl-D to exit - History search with Ctrl-R New commands: - :info <name> - Show type information for a binding - :env - List user-defined bindings with types Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -114,6 +114,11 @@ impl TypeChecker {
|
||||
}
|
||||
}
|
||||
|
||||
/// Look up a type scheme by name (for REPL :info command)
|
||||
pub fn lookup(&self, name: &str) -> Option<&TypeScheme> {
|
||||
self.env.bindings.get(name)
|
||||
}
|
||||
|
||||
/// Type check a program
|
||||
pub fn check_program(&mut self, program: &Program) -> Result<(), Vec<TypeError>> {
|
||||
// First pass: collect all declarations
|
||||
|
||||
Reference in New Issue
Block a user