[plt-scheme] Syntax in teachpack doesn't work.

From: Paulo J. Matos (pocm at soton.ac.uk)
Date: Thu Jun 19 09:42:25 EDT 2008

Hello, I am trying to create a simple syntax teachpack and I have:
(module iteration mzscheme

  ;; Simplified do
  (define-syntax for
    (syntax-rules ()
      ((for (var init cond step)
            command ...)
       (let loop ((var init))
         (if (not cond)
               (loop step)))))))

  ;; Simplified^2 do
  (define-syntax repeat
    (syntax-rules ()
      ((repeat num command ...)
       (for (x 0 (< x num) (+ x 1))
            command ...))))


Then I do add the teachpack and load it but when I try to use repeat:
repeat: name is not defined, not a parameter, and not a primitive name

I am surely missing something but don't know what (this is still version 372).

Paulo Jorge Matos - pocm at soton.ac.uk
PhD Student @ ECS
University of Southampton, UK

Posted on the users mailing list.