Changeset 11842 in project for chicken/branches/hygienic/expand.scm


Ignore:
Timestamp:
09/01/08 09:11:02 (13 years ago)
Author:
felix winkelmann
Message:

letrec is a core form now [to fix problem reported by Jim]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chicken/branches/hygienic/expand.scm

    r11741 r11842  
    224224                                (values
    225225                                 `(##core#app
    226                                    (,(macro-alias 'letrec dse) ;*** correct to use dse?
     226                                   (##core#letrec
    227227                                    ([,bindings (##core#loop-lambda ,(map (lambda (b) (car b)) bs) ,@(cddr body))])
    228228                                    ,bindings)
     
    281281;;; User-level macroexpansion
    282282
    283 (define (##sys#expand exp #!optional (me (##sys#current-environment)))
     283(define (##sys#expand exp #!optional (se (##sys#current-environment)))
    284284  (let loop ((exp exp))
    285     (let-values (((exp2 m) (##sys#expand-0 exp me)))
     285    (let-values (((exp2 m) (##sys#expand-0 exp se)))
    286286      (if m
    287287          (loop exp2)
     
    10131013
    10141014(##sys#extend-macro-environment
    1015  'letrec
    1016  '()
    1017  (##sys#er-transformer
    1018   (lambda (form r c)
    1019     (##sys#check-syntax 'letrec form '(_ #((symbol _) 0) . #(_ 1)))
    1020     (let ((bindings (cadr form))
    1021           (body (cddr form))
    1022           (%let (r 'let)) )
    1023       `(,%let ,(##sys#map (lambda (b) (list (car b) '(##core#undefined))) bindings)
    1024               ,@(##sys#map (lambda (b) `(##core#set! ,(car b) ,(cadr b))) bindings)
    1025               (,%let () ,@body) ) ) ) ) )
    1026 
    1027 (##sys#extend-macro-environment
    10281015 'do
    10291016 '()
Note: See TracChangeset for help on using the changeset viewer.