How to implement REPL with eval-top-level
Hi.
I'm using psyntax-r6rs-rev4 for Mosh Scheme.
psyntax is great library, it works well for Mosh.
I want to implment a REPL for Mosh using psyntax.
I read your ikarus.cafe.ss and leppie's IronScheme.
(1) ikarus's REPL
ikarus's REPL uses eval-top-level.
(2) IronScheme's REPL
At main.ss of psyntax, bind eval-top-level to eval-r6rs.
(set-
And invoke from C# using the name 'eval-r6rs.
(3) Mosh's REPL
I have tried two ways (a) and (b), it causes same error.
(a) I wrote REPL at main.ss of psyntax.
(define (repl)
(define (rec)
(display "mosh>")
(guard (e
(let ([obj (read (current-
(if (eof-object? obj)
(exit)
(display (eval-top-level obj)))))
(rec))
(b) (set-symbol-value! 'eval-r6rs eval-top-level) at main.ss of psyntax.
And invoke it from repl.scm after loaded psyntax.pp.
The Error is like following.
mosh>(display 'hige)
1. &assertion
2. &who: eval
3. &message: "unbound variable"
4. &irritants: ("G39")
Is this a kind of mangling problem?
Thank you for your great library.
---
Taro Minowa(Higepon)
http://
http://
Question information
- Language:
- English Edit question
- Status:
- Expired
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: