How to pass let and named-let to the backend
Hi.
I use your psyntax for Mosh Scheme.
Since Mosh's backend has let and named-let optimization,
I want to pass them to the backend. (Now, they are converted to lambda and letrec by psyntax).
On expander.ss, I defined core-macro for as follows.
But got unbound identifier error for named-let's name (ex loop, f or rec).
(lambda (e r mr)
(syntax-match e ()
((_ ((lhs* rhs*) ...) b b* ...)
(if (not (valid-bound-ids? lhs*))
(let ((lex* (map gen-lexical lhs*))
(let ((rib (make-full-rib lhs* lab*))
((_ loop ((lhs* rhs*) ...) b b* ...)
(if (not (valid-bound-ids? lhs*))
(let ((lex* (map gen-lexical lhs*))
(let ((rib (make-full-rib lhs* lab*))
Will you please teach me what's wrong?
Cheers.
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- higepon(Taro Minowa)
- Solved:
- Last query:
- Last reply: