Search code examples
macrosschemechicken-scheme

How to use existing macros - e.g. `let-values` - from a macro expander procedure in Chicken Scheme?


How do I call built-in Chicken Scheme macros - specifically let-values in this instance - from my own macros?

(define-syntax ...
 (ir-macro-transformer
  (lambda (expr inject compare)
   (let-values (...) ...
    ...

unbound variable: let-values


Solution

  • This is a bit of a bug I'm afraid. A simple (import-for-syntax chicken) did the trick for me.

    In CHICKEN 5, this works without such a strange import.