Welcome to the CHICKEN Scheme pasting service

unbound reference error when using read-syntax added by ZaneA on Sun Apr 28 03:35:06 2013

(module
 test-module
 (my-export)
 
 (import scheme chicken)

 (begin-for-syntax
  (set-read-syntax! #\{
     (lambda (port)
       (let loop ((c (peek-char port)) (exps '()))
         (cond ((eof-object? c)
                (error "EOF encountered while parsing { ... } clause"))
               ((char=? c #\})
                (read-char port) ; discard
                (let ((exps (reverse exps)))
                  `'(,(symbol->string (car exps)) ,@(cdr exps))))
               ((char-whitespace? c)
                (read-char port) ; discard
                (loop (peek-char port) exps))
               (else
                (let ((exp (read port)))
                  (loop (peek-char port)
                        (cons exp exps)))))))))

 (define (my-export)
   {hello "world"}))

(import test-module)

(print (my-export))

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
Which module provides `process-wait'?
Visually impaired? Let me spell it for you (wav file) download WAV