Order of definitions in REPL
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ikarus Scheme |
Fix Committed
|
High
|
Abdulaziz Ghuloum |
Bug Description
Definitions that call functions defined later in the file don't seem to be handled as I would expect when loaded at the REPL. When run as a script, they work as I expect. For example:
jnear@sandstone r6mk $ cat test.scm
#!/usr/bin/env scheme-script
(import (rnrs))
(define foo
(lambda ()
(bar)))
(define bar
(lambda ()
(display "bar!")
(newline)))
(foo)
jnear@sandstone r6mk $ ikarus --r6rs-script test.scm
bar!
jnear@sandstone r6mk $ ikarus test.scm
Ikarus Scheme version 0.0.3+ (revision 1477, build 2008-05-13)
Copyright (c) 2006-2008 Abdulaziz Ghuloum
Unhandled exception:
Condition components:
1. &assertion
2. &who: eval
3. &message: "unbound variable"
4. &irritants: (bar)
Related branches
Changed in ikarus: | |
milestone: | none → 0.0.4 |
You can always just start the REPL and call (load "test.scm") (or (include "test.scm")).