Ignore:
Timestamp:
02/16/08 01:55:04 (12 years ago)
Author:
felix winkelmann
Message:

added preexpansion hook (internal)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/3/modules/trunk/modules-base.scm

    r8486 r8497  
    77          modules:expand-import
    88          modules:expand-import*
     9          modules:preexpand-hook
    910          modules:expand-export-toplevel) )
    1011
     
    130131      (c (syntax-error 'cond-expand "invalid `cond-expand' clause" c)) ) ) )
    131132
     133(define modules:preexpand-hook (make-parameter (lambda (x p) x)))
     134
    132135(define (preexpand body)
    133   (let ((c (context)))
     136  (let ((c (context))
     137        (hook (modules:preexpand-hook)))
    134138    (define (process name)
    135139      (cond ((assq name (module-exports (context-current-module c))) =>
     
    161165           (let ((forms (read-file f)))
    162166             `(begin ,@(map expand forms) ) ) ) )
    163         (x x) ) )
     167        (x (hook x process))))
    164168    (map expand body) ) )
    165169
Note: See TracChangeset for help on using the changeset viewer.