Sync that beautiful trunk footage
svn: r12593
This commit is contained in:
commit
6f83ed1a80
|
@ -1295,36 +1295,38 @@
|
|||
[exprs
|
||||
(let ([def-ctx (syntax-local-make-definition-context)]
|
||||
[ctx (generate-expand-context)])
|
||||
(let loop ([exprs (cddddr (cdr (syntax->list stx)))])
|
||||
(apply
|
||||
append
|
||||
(map (lambda (expr)
|
||||
(let ([expr (local-expand
|
||||
expr
|
||||
ctx
|
||||
block-expand-stop-forms
|
||||
def-ctx)])
|
||||
(syntax-case expr (begin define-values define-syntaxes)
|
||||
[(begin . rest)
|
||||
(loop (syntax->list #'rest))]
|
||||
[(define-syntaxes (id ...) rhs)
|
||||
(andmap identifier? (syntax->list #'(id ...)))
|
||||
(with-syntax ([rhs (local-transformer-expand
|
||||
#'rhs
|
||||
'expression
|
||||
null)])
|
||||
(syntax-local-bind-syntaxes
|
||||
(syntax->list #'(id ...))
|
||||
#'rhs def-ctx)
|
||||
(list #'(define-syntaxes (id ...) rhs)))]
|
||||
[(define-values (id ...) rhs)
|
||||
(andmap identifier? (syntax->list #'(id ...)))
|
||||
(let ([ids (syntax->list #'(id ...))])
|
||||
(syntax-local-bind-syntaxes ids #f def-ctx)
|
||||
(list expr))]
|
||||
[else
|
||||
(list expr)])))
|
||||
exprs))))])
|
||||
(begin0
|
||||
(let loop ([exprs (cddddr (cdr (syntax->list stx)))])
|
||||
(apply
|
||||
append
|
||||
(map (lambda (expr)
|
||||
(let ([expr (local-expand
|
||||
expr
|
||||
ctx
|
||||
block-expand-stop-forms
|
||||
def-ctx)])
|
||||
(syntax-case expr (begin define-values define-syntaxes)
|
||||
[(begin . rest)
|
||||
(loop (syntax->list #'rest))]
|
||||
[(define-syntaxes (id ...) rhs)
|
||||
(andmap identifier? (syntax->list #'(id ...)))
|
||||
(with-syntax ([rhs (local-transformer-expand
|
||||
#'rhs
|
||||
'expression
|
||||
null)])
|
||||
(syntax-local-bind-syntaxes
|
||||
(syntax->list #'(id ...))
|
||||
#'rhs def-ctx)
|
||||
(list #'(define-syntaxes (id ...) rhs)))]
|
||||
[(define-values (id ...) rhs)
|
||||
(andmap identifier? (syntax->list #'(id ...)))
|
||||
(let ([ids (syntax->list #'(id ...))])
|
||||
(syntax-local-bind-syntaxes ids #f def-ctx)
|
||||
(list expr))]
|
||||
[else
|
||||
(list expr)])))
|
||||
exprs)))
|
||||
(internal-definition-context-seal def-ctx)))])
|
||||
#`(let ()
|
||||
#,@(let loop ([exprs exprs][prev-defns null][prev-exprs null])
|
||||
(cond
|
||||
|
|
|
@ -386,6 +386,7 @@
|
|||
[else
|
||||
(list expr)])))
|
||||
exprs)))])
|
||||
(internal-definition-context-seal def-ctx)
|
||||
(let loop ([exprs exprs]
|
||||
[prev-stx-defns null]
|
||||
[prev-defns null]
|
||||
|
|
|
@ -667,6 +667,7 @@
|
|||
(let loop ([pre-lines null][lines (append import-stxes body)][port #f][port-name #f][body null][vars null])
|
||||
(cond
|
||||
[(and (null? pre-lines) (not port) (null? lines))
|
||||
(internal-definition-context-seal def-ctx)
|
||||
(make-parsed-unit imports
|
||||
renames
|
||||
vars
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
(provide (rename build-siginfo make-siginfo)
|
||||
siginfo-names siginfo-ctime-ids siginfo-rtime-ids siginfo-subtype
|
||||
unprocess-link-record-bind unprocess-link-record-use
|
||||
set!-trans-extract do-identifier
|
||||
set!-trans-extract
|
||||
process-tagged-import process-tagged-export
|
||||
lookup-signature lookup-def-unit make-id-mapper make-id-mappers sig-names sig-int-names sig-ext-names
|
||||
map-sig split-requires apply-mac complete-exports complete-imports check-duplicate-subs
|
||||
|
@ -186,20 +186,17 @@
|
|||
(lambda (x) x)
|
||||
sig)))
|
||||
|
||||
;; do-prefix : sig syntax-object -> sig
|
||||
;; do-prefix : id id -> id
|
||||
;; ensures that pid is an identifier
|
||||
(define (do-prefix sig pid)
|
||||
(check-id pid)
|
||||
(let ((p (syntax-e pid)))
|
||||
(map-sig
|
||||
(lambda (id)
|
||||
(datum->syntax-object
|
||||
id
|
||||
(string->symbol (format "~a~a" p (syntax-e id)))))
|
||||
(lambda (x) x)
|
||||
sig)))
|
||||
(define (do-prefix stx pid)
|
||||
(if (identifier? stx)
|
||||
(datum->syntax-object
|
||||
stx
|
||||
(string->symbol (format "~a~a" (syntax-e pid) (syntax-e stx)))
|
||||
stx)
|
||||
stx))
|
||||
|
||||
;; do-only : sig (listof identifier) -> sig
|
||||
;; do-only/except : sig (listof identifier) -> sig
|
||||
;; ensures that only-ids are identifiers and are mentioned in the signature
|
||||
(define (do-only/except sig only/except-ids put get)
|
||||
(check-module-id-subset only/except-ids
|
||||
|
@ -217,22 +214,22 @@
|
|||
sig)))
|
||||
|
||||
;; do-identifier : identifier (box (cons identifier siginfo)) -> sig
|
||||
(define (do-identifier spec res bind?)
|
||||
(define (do-identifier spec res bind? add-prefix)
|
||||
(let* ((sig (lookup-signature spec))
|
||||
(vars (signature-vars sig))
|
||||
(vals (signature-val-defs sig))
|
||||
(stxs (signature-stx-defs sig))
|
||||
(delta-introduce (if bind?
|
||||
(let ([f (make-syntax-delta-introducer
|
||||
spec
|
||||
(signature-orig-binder sig))])
|
||||
(let ([f (syntax-local-make-delta-introducer
|
||||
spec)])
|
||||
(lambda (id) (syntax-local-introduce (f id))))
|
||||
values)))
|
||||
(set-box! res (cons spec (signature-siginfo sig)))
|
||||
(map-sig (lambda (id)
|
||||
(syntax-local-introduce
|
||||
(syntax-local-get-shadower
|
||||
(delta-introduce id))))
|
||||
(add-prefix
|
||||
(delta-introduce id)))))
|
||||
syntax-local-introduce
|
||||
(list (map cons vars vars)
|
||||
(map
|
||||
|
@ -301,43 +298,47 @@
|
|||
(check-tagged-spec-syntax spec import? identifier?)
|
||||
(syntax-case spec (tag)
|
||||
((tag sym spec)
|
||||
(let ([s (process-import/export #'spec res bind?)])
|
||||
(let ([s (process-import/export #'spec res bind? values)])
|
||||
(list (cons (syntax-e #'sym) (cdr (unbox res)))
|
||||
(cons (syntax-e #'sym) (car (unbox res)))
|
||||
s)))
|
||||
((tag . _)
|
||||
(raise-stx-err "expected (tag symbol <import/export-spec>)" spec))
|
||||
(_ (let ([s (process-import/export spec res bind?)])
|
||||
(_ (let ([s (process-import/export spec res bind? values)])
|
||||
(list (cons #f (cdr (unbox res)))
|
||||
(cons #f (car (unbox res)))
|
||||
s)))))
|
||||
|
||||
(define (add-prefixes add-prefix l)
|
||||
(map add-prefix (syntax->list l)))
|
||||
|
||||
;; process-import/export : syntax-object (box (cons identifier) siginfo) -> sig
|
||||
(define (process-import/export spec res bind?)
|
||||
(define (process-import/export spec res bind? add-prefix)
|
||||
(syntax-case spec (only except prefix rename)
|
||||
(_
|
||||
(identifier? spec)
|
||||
(do-identifier spec res bind?))
|
||||
(do-identifier spec res bind? add-prefix))
|
||||
((only sub-spec id ...)
|
||||
(do-only/except (process-import/export #'sub-spec res bind?)
|
||||
(syntax->list #'(id ...))
|
||||
(lambda (x) x)
|
||||
(do-only/except (process-import/export #'sub-spec res bind? add-prefix)
|
||||
(add-prefixes add-prefix #'(id ...))
|
||||
(lambda (id) id)
|
||||
(lambda (id)
|
||||
(car (generate-temporaries #`(#,id))))))
|
||||
((except sub-spec id ...)
|
||||
(do-only/except (process-import/export #'sub-spec res bind?)
|
||||
(syntax->list #'(id ...))
|
||||
(do-only/except (process-import/export #'sub-spec res bind? add-prefix)
|
||||
(add-prefixes add-prefix #'(id ...))
|
||||
(lambda (id)
|
||||
(car (generate-temporaries #`(#,id))))
|
||||
(lambda (x) x)))
|
||||
(lambda (id) id)))
|
||||
((prefix pid sub-spec)
|
||||
(do-prefix (process-import/export #'sub-spec res bind?) #'pid))
|
||||
(process-import/export #'sub-spec res bind?
|
||||
(lambda (id)
|
||||
(do-prefix (add-prefix id) #'pid))))
|
||||
((rename sub-spec (internal external) ...)
|
||||
(let* ((sig-res
|
||||
(do-rename (process-import/export #'sub-spec res bind?)
|
||||
(do-rename (process-import/export #'sub-spec res bind? add-prefix)
|
||||
#'(internal ...)
|
||||
#'(external ...)))
|
||||
(datum->syntax-object #f (add-prefixes add-prefix #'(external ...)))))
|
||||
(dup (check-duplicate-identifier (sig-int-names sig-res))))
|
||||
(when dup
|
||||
(raise-stx-err
|
||||
|
@ -353,7 +354,7 @@
|
|||
;; process-spec : syntax-object -> sig
|
||||
(define (process-spec spec)
|
||||
(check-tagged-spec-syntax spec #f identifier?)
|
||||
(process-import/export spec (box #f) #t))
|
||||
(process-import/export spec (box #f) #t values))
|
||||
|
||||
|
||||
; ;; extract-siginfo : (union import-spec export-spec) -> ???
|
||||
|
|
|
@ -126,8 +126,7 @@
|
|||
((((int-sid . ext-sid) ...) . sbody) ...))
|
||||
(map-sig (lambda (x) x)
|
||||
(make-syntax-introducer)
|
||||
sig)
|
||||
#;(add-context-to-sig sig)])
|
||||
sig)])
|
||||
(list
|
||||
#'((ext-ivar ... ext-vid ... ... ext-sid ... ...)
|
||||
(values
|
||||
|
@ -329,13 +328,6 @@
|
|||
'expression
|
||||
(list #'stop)
|
||||
def-ctx))))
|
||||
|
||||
(define-for-syntax (add-context-to-sig sig)
|
||||
(let ((def-ctx (syntax-local-make-definition-context)))
|
||||
(syntax-local-bind-syntaxes (sig-ext-names sig) #f def-ctx)
|
||||
(map-sig (lambda (x) x)
|
||||
(lambda (x) (localify x def-ctx))
|
||||
sig)))
|
||||
|
||||
(define-for-syntax (iota n)
|
||||
(let loop ((n n)
|
||||
|
@ -619,6 +611,7 @@
|
|||
[_ (void)]))
|
||||
expanded-body)
|
||||
table)])
|
||||
(internal-definition-context-seal def-ctx)
|
||||
|
||||
;; Mark exported names and
|
||||
;; check that all exported names are defined (as var):
|
||||
|
|
|
@ -158,7 +158,10 @@
|
|||
[else (list defn-or-expr)])))
|
||||
defns&exprs)))
|
||||
values)])
|
||||
|
||||
(let ([all-expanded (expand-all (syntax->list (syntax (defn&expr ...))))])
|
||||
(when def-ctx
|
||||
(internal-definition-context-seal def-ctx))
|
||||
;; Get all the defined names, sorting out variable definitions
|
||||
;; from syntax definitions.
|
||||
(let* ([definition?
|
||||
|
|
|
@ -410,6 +410,7 @@
|
|||
(cdr exprs)))
|
||||
(reverse idss) (reverse rhss)
|
||||
(reverse stx-idss) (reverse stx-rhss))]))))])
|
||||
(internal-definition-context-seal def-ctx)
|
||||
(if (and (null? (syntax-e #'(stx-rhs ...)))
|
||||
(andmap (lambda (ids)
|
||||
(= 1 (length (syntax->list ids))))
|
||||
|
|
|
@ -1 +1 @@
|
|||
#lang scheme/base (provide stamp) (define stamp "24nov2008")
|
||||
#lang scheme/base (provide stamp) (define stamp "25nov2008")
|
||||
|
|
394
collects/scheme/package.ss
Normal file
394
collects/scheme/package.ss
Normal file
|
@ -0,0 +1,394 @@
|
|||
#lang scheme/base
|
||||
(require (for-syntax scheme/base
|
||||
syntax/kerncase
|
||||
syntax/boundmap
|
||||
syntax/define))
|
||||
|
||||
(provide define-package
|
||||
package-begin
|
||||
|
||||
open-package
|
||||
open*-package
|
||||
|
||||
define*
|
||||
define*-values
|
||||
define*-syntax
|
||||
define*-syntaxes)
|
||||
|
||||
(define-for-syntax (do-define-* stx define-values-id)
|
||||
(syntax-case stx ()
|
||||
[(_ (id ...) rhs)
|
||||
(let ([ids (syntax->list #'(id ...))])
|
||||
(for-each (lambda (id)
|
||||
(unless (identifier? id)
|
||||
(raise-syntax-error
|
||||
#f
|
||||
"expected an identifier for definition"
|
||||
stx
|
||||
id)))
|
||||
ids)
|
||||
(with-syntax ([define-values define-values-id])
|
||||
(syntax/loc stx
|
||||
(define-values (id ...) rhs))))]))
|
||||
(define-syntax (define*-values stx)
|
||||
(do-define-* stx #'define-values))
|
||||
(define-syntax (define*-syntaxes stx)
|
||||
(do-define-* stx #'define-syntaxes))
|
||||
|
||||
(define-syntax (define* stx)
|
||||
(let-values ([(id rhs) (normalize-definition stx #'lambda)])
|
||||
(quasisyntax/loc stx
|
||||
(define*-values (#,id) #,rhs))))
|
||||
(define-syntax (define*-syntax stx)
|
||||
(let-values ([(id rhs) (normalize-definition stx #'lambda)])
|
||||
(quasisyntax/loc stx
|
||||
(define*-syntaxes (#,id) #,rhs))))
|
||||
|
||||
(begin-for-syntax
|
||||
(define-struct package (exports hidden)
|
||||
#:omit-define-syntaxes
|
||||
#:property prop:procedure (lambda (r stx)
|
||||
(raise-syntax-error
|
||||
#f
|
||||
"misuse of a package name"
|
||||
stx)))
|
||||
|
||||
(define (reverse-mapping who id exports hidden)
|
||||
(or (ormap (lambda (m)
|
||||
(and (free-identifier=? id (cdr m))
|
||||
(car m)))
|
||||
exports)
|
||||
(ormap (lambda (h)
|
||||
(and (free-identifier=? id h)
|
||||
;; Not at top level, where free-id=? is unreliable,
|
||||
;; and re-definition is ok:
|
||||
(identifier-binding id)
|
||||
;; Name is inaccessible. Generate a temporary to
|
||||
;; avoid potential duplicate-definition errors
|
||||
;; when the name is bound in the same context as
|
||||
;; the package.
|
||||
(car (generate-temporaries (list id)))))
|
||||
hidden)
|
||||
id)))
|
||||
|
||||
(define-for-syntax (do-define-package stx exp-stx)
|
||||
(syntax-case exp-stx ()
|
||||
[(_ pack-id mode exports form ...)
|
||||
(let ([id #'pack-id]
|
||||
[exports #'exports]
|
||||
[mode (syntax-e #'mode)])
|
||||
(unless (eq? mode '#:begin)
|
||||
(unless (identifier? id)
|
||||
(raise-syntax-error #f
|
||||
"expected an identifier"
|
||||
stx
|
||||
id)))
|
||||
(let ([exports
|
||||
(cond
|
||||
[(syntax->list exports)
|
||||
=> (lambda (l)
|
||||
(for-each (lambda (i)
|
||||
(unless (identifier? i)
|
||||
(raise-syntax-error #f
|
||||
"expected identifier to export"
|
||||
stx
|
||||
i)))
|
||||
l)
|
||||
(let ([dup-id (check-duplicate-identifier l)])
|
||||
(when dup-id
|
||||
(raise-syntax-error
|
||||
#f
|
||||
"duplicate export"
|
||||
stx
|
||||
dup-id)))
|
||||
l)]
|
||||
[else (raise-syntax-error #f
|
||||
(format "expected a parenthesized sequence of identifiers ~a"
|
||||
(case mode
|
||||
[(#:only) "to export"]
|
||||
[(#:all-defined-except) "to exclude from export"]
|
||||
[else (format "for ~a" mode)]))
|
||||
stx
|
||||
exports)])])
|
||||
(let* ([def-ctx (syntax-local-make-definition-context)]
|
||||
[ctx (cons (gensym 'intdef)
|
||||
(let ([orig-ctx (syntax-local-context)])
|
||||
(if (pair? orig-ctx)
|
||||
orig-ctx
|
||||
null)))]
|
||||
[pre-package-id (lambda (id def-ctxes)
|
||||
(for/fold ([id id])
|
||||
([def-ctx (in-list def-ctxes)])
|
||||
(identifier-remove-from-definition-context
|
||||
id
|
||||
def-ctx)))]
|
||||
[kernel-forms (list*
|
||||
#'define*-values
|
||||
#'define*-syntaxes
|
||||
(kernel-form-identifier-list))]
|
||||
[init-exprs (syntax->list #'(form ...))]
|
||||
[new-bindings (make-bound-identifier-mapping)]
|
||||
[fixup-sub-package (lambda (renamed-exports renamed-defines def-ctxes)
|
||||
(lambda (stx)
|
||||
(syntax-case* stx (define-syntaxes #%plain-app make-package quote-syntax
|
||||
list cons #%plain-lambda)
|
||||
free-transformer-identifier=?
|
||||
[(define-syntaxes (pack-id)
|
||||
(#%plain-app
|
||||
make-package
|
||||
(#%plain-lambda ()
|
||||
(#%plain-app list
|
||||
(#%plain-app cons
|
||||
(quote-syntax export)
|
||||
(quote-syntax renamed))
|
||||
...))
|
||||
hidden))
|
||||
(with-syntax ([(export ...)
|
||||
(map (lambda (id)
|
||||
(if (or (ormap (lambda (e-id)
|
||||
(bound-identifier=? id e-id))
|
||||
renamed-exports)
|
||||
(not (ormap (lambda (e-id)
|
||||
(bound-identifier=? id e-id))
|
||||
renamed-defines)))
|
||||
;; Need to preserve the original
|
||||
(pre-package-id id def-ctxes)
|
||||
;; It's not accessible, so just hide the name
|
||||
;; to avoid re-binding errors.
|
||||
(car (generate-temporaries (list id)))))
|
||||
(syntax->list #'(export ...)))])
|
||||
(syntax/loc stx
|
||||
(define-syntaxes (pack-id)
|
||||
(make-package
|
||||
(lambda ()
|
||||
(list (cons (quote-syntax export)
|
||||
(quote-syntax renamed))
|
||||
...))
|
||||
hidden))))]
|
||||
[_ stx])))]
|
||||
[complement (lambda (bindings ids)
|
||||
(let ([tmp (make-bound-identifier-mapping)])
|
||||
(bound-identifier-mapping-for-each bindings
|
||||
(lambda (k v)
|
||||
(bound-identifier-mapping-put! tmp k #t)))
|
||||
(for-each (lambda (id)
|
||||
(bound-identifier-mapping-put! tmp id #f))
|
||||
ids)
|
||||
(filter
|
||||
values
|
||||
(bound-identifier-mapping-map tmp (lambda (k v) (and v k))))))])
|
||||
(let ([register-bindings!
|
||||
(lambda (ids)
|
||||
(for-each (lambda (id)
|
||||
(when (bound-identifier-mapping-get new-bindings id (lambda () #f))
|
||||
(raise-syntax-error #f
|
||||
"duplicate binding"
|
||||
stx
|
||||
id))
|
||||
(bound-identifier-mapping-put! new-bindings
|
||||
id
|
||||
#t))
|
||||
ids))]
|
||||
[add-package-context (lambda (def-ctxes)
|
||||
(lambda (stx)
|
||||
(for/fold ([stx stx])
|
||||
([def-ctx (in-list (reverse def-ctxes))])
|
||||
(let ([q (local-expand #`(quote #,stx)
|
||||
ctx
|
||||
(list #'quote)
|
||||
def-ctx)])
|
||||
(syntax-case q ()
|
||||
[(_ stx) #'stx])))))])
|
||||
(let loop ([exprs init-exprs]
|
||||
[rev-forms null]
|
||||
[defined null]
|
||||
[def-ctxes (list def-ctx)])
|
||||
(cond
|
||||
[(null? exprs)
|
||||
(for-each (lambda (def-ctx)
|
||||
(internal-definition-context-seal def-ctx))
|
||||
def-ctxes)
|
||||
(let ([exports-renamed (map (add-package-context def-ctxes) exports)]
|
||||
[defined-renamed (bound-identifier-mapping-map new-bindings
|
||||
(lambda (k v) k))])
|
||||
(for-each (lambda (ex renamed)
|
||||
(unless (bound-identifier-mapping-get new-bindings
|
||||
renamed
|
||||
(lambda () #f))
|
||||
(raise-syntax-error #f
|
||||
(format "no definition for ~a identifier"
|
||||
(case mode
|
||||
[(#:only) "exported"]
|
||||
[(#:all-defined-except) "excluded"]))
|
||||
stx
|
||||
ex)))
|
||||
exports
|
||||
exports-renamed)
|
||||
(let-values ([(exports exports-renamed)
|
||||
(if (memq mode '(#:only #:begin))
|
||||
(values exports exports-renamed)
|
||||
(let ([all-exports-renamed (complement new-bindings exports-renamed)])
|
||||
;; In case of define*, get only the last definition:
|
||||
(let ([tmp (make-bound-identifier-mapping)])
|
||||
(for-each (lambda (id)
|
||||
(bound-identifier-mapping-put!
|
||||
tmp
|
||||
((add-package-context def-ctxes)
|
||||
(pre-package-id id def-ctxes))
|
||||
#t))
|
||||
all-exports-renamed)
|
||||
(let* ([exports-renamed (bound-identifier-mapping-map tmp (lambda (k v) k))]
|
||||
[exports (map (lambda (id) (pre-package-id id def-ctxes))
|
||||
exports-renamed)])
|
||||
(values exports exports-renamed)))))])
|
||||
(with-syntax ([(export ...) exports]
|
||||
[(renamed ...) exports-renamed]
|
||||
[(hidden ...) (complement new-bindings exports-renamed)])
|
||||
(let ([body (map (fixup-sub-package exports-renamed defined-renamed def-ctxes)
|
||||
(reverse rev-forms))])
|
||||
(if (eq? mode '#:begin)
|
||||
(if (eq? 'expression (syntax-local-context))
|
||||
(quasisyntax/loc stx (let () #,@body))
|
||||
(quasisyntax/loc stx (begin #,@body)))
|
||||
(quasisyntax/loc stx
|
||||
(begin
|
||||
#,@(if (eq? 'top-level (syntax-local-context))
|
||||
;; delcare all bindings before they are used:
|
||||
#`((define-syntaxes #,defined-renamed (values)))
|
||||
null)
|
||||
#,@body
|
||||
(define-syntax pack-id
|
||||
(make-package
|
||||
(lambda ()
|
||||
(list (cons (quote-syntax export)
|
||||
(quote-syntax renamed))
|
||||
...))
|
||||
(lambda ()
|
||||
(list (quote-syntax hidden) ...)))))))))))]
|
||||
[else
|
||||
(let ([expr ((add-package-context (cdr def-ctxes))
|
||||
(local-expand ((add-package-context (cdr def-ctxes)) (car exprs))
|
||||
ctx
|
||||
kernel-forms
|
||||
(car def-ctxes)))])
|
||||
(syntax-case expr (begin)
|
||||
[(begin . rest)
|
||||
(loop (append (syntax->list #'rest) (cdr exprs))
|
||||
rev-forms
|
||||
defined
|
||||
def-ctxes)]
|
||||
[(def (id ...) rhs)
|
||||
(and (or (free-identifier=? #'def #'define-syntaxes)
|
||||
(free-identifier=? #'def #'define*-syntaxes))
|
||||
(andmap identifier? (syntax->list #'(id ...))))
|
||||
(with-syntax ([rhs (local-transformer-expand
|
||||
#'rhs
|
||||
'expression
|
||||
null)])
|
||||
(let ([star? (free-identifier=? #'def #'define*-syntaxes)]
|
||||
[ids (syntax->list #'(id ...))])
|
||||
(let* ([def-ctx (if star?
|
||||
(syntax-local-make-definition-context)
|
||||
(car def-ctxes))]
|
||||
[ids (if star?
|
||||
(map (add-package-context (list def-ctx)) ids)
|
||||
ids)])
|
||||
(syntax-local-bind-syntaxes ids #'rhs def-ctx)
|
||||
(register-bindings! ids)
|
||||
(loop (cdr exprs)
|
||||
(cons #`(define-syntaxes #,ids rhs)
|
||||
rev-forms)
|
||||
(cons ids defined)
|
||||
(if star? (cons def-ctx def-ctxes) def-ctxes)))))]
|
||||
[(def (id ...) rhs)
|
||||
(and (or (free-identifier=? #'def #'define-values)
|
||||
(free-identifier=? #'def #'define*-values))
|
||||
(andmap identifier? (syntax->list #'(id ...))))
|
||||
(let ([star? (free-identifier=? #'def #'define*-values)]
|
||||
[ids (syntax->list #'(id ...))])
|
||||
(let* ([def-ctx (if star?
|
||||
(syntax-local-make-definition-context)
|
||||
(car def-ctxes))]
|
||||
[ids (if star?
|
||||
(map (add-package-context (list def-ctx)) ids)
|
||||
ids)])
|
||||
(syntax-local-bind-syntaxes ids #f def-ctx)
|
||||
(register-bindings! ids)
|
||||
(loop (cdr exprs)
|
||||
(cons #`(define-values #,ids rhs) rev-forms)
|
||||
(cons ids defined)
|
||||
(if star? (cons def-ctx def-ctxes) def-ctxes))))]
|
||||
[else
|
||||
(loop (cdr exprs)
|
||||
(cons (if (and (eq? mode '#:begin)
|
||||
(null? (cdr exprs)))
|
||||
expr
|
||||
#`(define-values () (begin #,expr (values))))
|
||||
rev-forms)
|
||||
defined
|
||||
def-ctxes)]))]))))))]))
|
||||
|
||||
(define-syntax (define-package stx)
|
||||
(syntax-case stx ()
|
||||
[(_ id #:all-defined form ...)
|
||||
(do-define-package stx #'(define-package id #:all-defined () form ...))]
|
||||
[(_ id #:all-defined-except ids form ...)
|
||||
(do-define-package stx stx)]
|
||||
[(_ id #:only ids form ...)
|
||||
(do-define-package stx stx)]
|
||||
[(_ id ids form ...)
|
||||
(do-define-package stx #'(define-package id #:only ids form ...))]))
|
||||
|
||||
(define-syntax (package-begin stx)
|
||||
(syntax-case stx ()
|
||||
[(_ form ...)
|
||||
(do-define-package stx #'(define-package #f #:begin () form ...))]))
|
||||
|
||||
(define-for-syntax (do-open stx define-syntaxes-id)
|
||||
(syntax-case stx ()
|
||||
[(_ pack-id)
|
||||
(let ([id #'pack-id])
|
||||
(unless (identifier? id)
|
||||
(raise-syntax-error #f
|
||||
"expected an identifier for a package"
|
||||
stx
|
||||
id))
|
||||
(let ([v (syntax-local-value id (lambda () #f))])
|
||||
(unless (package? v)
|
||||
(raise-syntax-error #f
|
||||
"identifier is not bound to a package"
|
||||
stx
|
||||
id))
|
||||
(let ([introduce (syntax-local-make-delta-introducer
|
||||
(syntax-local-introduce id))])
|
||||
(with-syntax ([(intro ...)
|
||||
(map (lambda (i)
|
||||
(syntax-local-introduce
|
||||
(syntax-local-get-shadower
|
||||
(introduce i))))
|
||||
(map car ((package-exports v))))]
|
||||
[(defined ...)
|
||||
(map (lambda (v) (syntax-local-introduce (cdr v)))
|
||||
((package-exports v)))]
|
||||
[((a . b) ...) (map (lambda (p)
|
||||
(cons (syntax-local-introduce (car p))
|
||||
(syntax-local-introduce (cdr p))))
|
||||
((package-exports v)))]
|
||||
[(h ...) (map syntax-local-introduce ((package-hidden v)))])
|
||||
#`(begin
|
||||
(#,define-syntaxes-id (intro ...)
|
||||
(let ([rev-map (lambda (x)
|
||||
(reverse-mapping
|
||||
'pack-id
|
||||
x
|
||||
(list (cons (quote-syntax a)
|
||||
(quote-syntax b))
|
||||
...)
|
||||
(list (quote-syntax h) ...)))])
|
||||
(values (make-rename-transformer #'defined rev-map)
|
||||
...))))))))]))
|
||||
|
||||
(define-syntax (open-package stx)
|
||||
(do-open stx #'define-syntaxes))
|
||||
(define-syntax (open*-package stx)
|
||||
(do-open stx #'define*-syntaxes))
|
|
@ -1214,6 +1214,8 @@
|
|||
proc))))))
|
||||
methods)))]
|
||||
[lookup-localize-cdr (lambda (p) (lookup-localize (cdr p)))])
|
||||
|
||||
(internal-definition-context-seal def-ctx)
|
||||
|
||||
;; ---- build final result ----
|
||||
(with-syntax ([public-names (map lookup-localize-cdr publics)]
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
(let ([def-ctx (syntax-local-make-definition-context)]
|
||||
[ctx (list (gensym 'intdef))])
|
||||
(syntax-local-bind-syntaxes (apply append all-ids) #f def-ctx)
|
||||
(internal-definition-context-seal def-ctx)
|
||||
(let* ([add-context
|
||||
(lambda (expr)
|
||||
(let ([q (local-expand #`(quote #,expr)
|
||||
|
|
119
collects/scribblings/reference/package.scrbl
Normal file
119
collects/scribblings/reference/package.scrbl
Normal file
|
@ -0,0 +1,119 @@
|
|||
#lang scribble/doc
|
||||
@(require "mz.ss"
|
||||
(for-label scheme/package))
|
||||
|
||||
@(define pack-eval (make-base-eval))
|
||||
@interaction-eval[#:eval pack-eval (require scheme/package)]
|
||||
|
||||
@title[#:tag "package"]{Limiting Scope: @scheme[define-package], @scheme[open-package], ...}
|
||||
|
||||
@note-lib-only[scheme/package]
|
||||
|
||||
@deftogether[(
|
||||
@defform[(define-package package-id exports form ...)]
|
||||
@defform/subs[(open-package package-id)
|
||||
([exports (id ...)
|
||||
(code:line #:only (id ...))
|
||||
#:all-defined
|
||||
(code:line #:all-defined-except (id ...))])]
|
||||
)]{
|
||||
|
||||
The @scheme[define-package] form is similar to @scheme[module], except
|
||||
that it can appear in any definition context. The @scheme[form]s
|
||||
within a @scheme[define-package] form can be definitions or
|
||||
expressions; definitions are not visible outside the
|
||||
@scheme[define-package] form, but @scheme[exports] determines a subset
|
||||
of the bindings that can be made visible outside the package using
|
||||
the definition form @scheme[(open-package package-id)].
|
||||
|
||||
The @scheme[(id ...)] and @scheme[#:only (id ...)] @scheme[exports]
|
||||
forms are equivalent: exactly the listed @scheme[id]s are
|
||||
exported. The @scheme[#:all-defined] form exports all definitions from
|
||||
the package body, and @scheme[#:all-defined-except (id ...)] exports
|
||||
all definitions except the listed @scheme[id]s.
|
||||
|
||||
All of the usual definition forms work within a
|
||||
@scheme[define-package] body, and such definitions are visible to all
|
||||
expressions within the body (and, in particular, the definitions can
|
||||
refer to each other). However, @scheme[define-package] handles
|
||||
@scheme[define*], @scheme[define*-syntax], @scheme[define*-values],
|
||||
@scheme[define*-syntaxes], and
|
||||
@scheme[open*-syntaxes] specially: the bindings introduced by those
|
||||
forms within a @scheme[define-package] body are visible only to
|
||||
@scheme[form]s that appear later in the body, and they can shadow any
|
||||
binding from preceding @scheme[form]s (even if the preceding binding
|
||||
did not use one of the special @schemeidfont[*] definition forms). If
|
||||
an exported identifier is defined multiple times, the last definition
|
||||
is the exported one.
|
||||
|
||||
@examples[
|
||||
#:eval pack-eval
|
||||
(define-package presents (doll)
|
||||
(define doll "Molly Coddle")
|
||||
(define robot "Destructo"))
|
||||
doll
|
||||
robot
|
||||
(open-package presents)
|
||||
doll
|
||||
robot
|
||||
(define-package big-russian-doll (middle-russian-doll)
|
||||
(define-package middle-russian-doll (little-russian-doll)
|
||||
(define little-russian-doll "Anastasia")))
|
||||
(open-package big-russian-doll)
|
||||
(open-package middle-russian-doll)
|
||||
little-russian-doll
|
||||
]}
|
||||
|
||||
|
||||
@defform[(package-begin form ...)]{
|
||||
|
||||
Similar to @scheme[define-package], but it only limits the visible of
|
||||
definitions without binding a package name. If the last @scheme[form]
|
||||
is an expression, then the expression is in @tech{tail position} for
|
||||
the @scheme[package-begin] form, so that its result is the
|
||||
@scheme[package-begin] result.
|
||||
|
||||
A @scheme[package-begin] form can be used as an expression, but if it
|
||||
is used in a context where definitions are allowed, then the
|
||||
definitions are essentially spliced into the enclosing context (though
|
||||
the defined bindings remain hidden outside the
|
||||
@scheme[package-begin]).
|
||||
|
||||
@examples[
|
||||
#:eval pack-eval
|
||||
(package-begin
|
||||
(define secret "mimi")
|
||||
(list secret))
|
||||
secret
|
||||
]}
|
||||
|
||||
@deftogether[(
|
||||
@defidform[define*]
|
||||
@defidform[define*-values]
|
||||
@defidform[define*-syntax]
|
||||
@defidform[define*-syntaxes]
|
||||
@defidform[open*-package]
|
||||
)]{
|
||||
|
||||
Equivalent to @scheme[define], @scheme[define-values],
|
||||
@scheme[define-syntax], @scheme[define-syntaxes],
|
||||
and @scheme[open-package], except within a
|
||||
@scheme[define-package] or @scheme[package-begin] form, where they
|
||||
create bindings that are visible only to later body forms.
|
||||
|
||||
@examples[
|
||||
#:eval pack-eval
|
||||
(define-package mail (cookies)
|
||||
(define* cookies (list 'sugar))
|
||||
(define* cookies (cons 'chocolate-chip cookies)))
|
||||
(open-package mail)
|
||||
cookies
|
||||
(define-syntax-rule (define-seven id) (define id 7))
|
||||
(define-syntax-rule (define*-seven id)
|
||||
(begin
|
||||
(define-package p (id) (define-seven id))
|
||||
(open*-package p)))
|
||||
(package-begin
|
||||
(define vii 8)
|
||||
(define*-seven vii)
|
||||
vii)]}
|
|
@ -312,10 +312,13 @@ byte strings corresponding to a sequence of matches of
|
|||
results for parenthesized sub-patterns in @scheme[pattern] are not
|
||||
returned.)
|
||||
|
||||
If @scheme[pattern] matches a zero-length string or byte sequence, and
|
||||
if it is at the beginning or end of the input, then the match does not
|
||||
count. Otherwise, one character or byte in the input is skipped before
|
||||
attempting another match.
|
||||
The @scheme[pattern] is used in order to find matches, where each
|
||||
match attempt starts at the end of the last match. Empty matches are
|
||||
handled like any matches, returning a zero-length string or byte
|
||||
sequence (they are more useful in the complementing
|
||||
@scheme[regexp-split] function). However, the @scheme[pattern] is
|
||||
restricted from matching an empty string at the beginning (or right
|
||||
after a previous match) or at the end.
|
||||
|
||||
If @scheme[input] contains no matches (in the range @scheme[start-pos]
|
||||
to @scheme[end-pos]), @scheme[null] is returned. Otherwise, each item
|
||||
|
@ -525,7 +528,7 @@ strings (if @scheme[pattern] is a string or character regexp and
|
|||
@scheme[input] that are separated by matches to
|
||||
@scheme[pattern]. Adjacent matches are separated with @scheme[""] or
|
||||
@scheme[#""]. Zero-length matches are treated the same as in
|
||||
@scheme[regexp-match*].
|
||||
@scheme[regexp-match*], but are more useful in this case.
|
||||
|
||||
If @scheme[input] contains no matches (in the range @scheme[start-pos]
|
||||
to @scheme[end-pos]), the result is a list containing @scheme[input]'s
|
||||
|
@ -539,8 +542,11 @@ case splitting goes to the end of @scheme[input] (which corresponds to
|
|||
an end-of-file if @scheme[input] is an input port).
|
||||
|
||||
@examples[
|
||||
(regexp-split #rx"x" "12x4x6")
|
||||
(regexp-split #rx"." "12x4x6")
|
||||
(regexp-split #rx" +" "12 34")
|
||||
(regexp-split #rx"." "12 34")
|
||||
(regexp-split #rx"" "12 34")
|
||||
(regexp-split #rx" *" "12 34")
|
||||
(regexp-split #px"\\b" "12, 13 and 14.")
|
||||
]}
|
||||
|
||||
@;------------------------------------------------------------------------
|
||||
|
|
|
@ -58,15 +58,19 @@ Returns the procedure that was passed to
|
|||
@scheme[make-set!-transformer] to create @scheme[transformer].}
|
||||
|
||||
|
||||
@defproc[(make-rename-transformer [id-stx syntax?])
|
||||
@defproc[(make-rename-transformer [id-stx syntax?]
|
||||
[delta-introduce (identifier? . -> . identifier?)
|
||||
(lambda (id) id)])
|
||||
rename-transformer?]{
|
||||
|
||||
Creates a value that, when used as a @tech{transformer binding},
|
||||
inserts the identifier @scheme[id-stx] in place of whatever identifier
|
||||
binds the transformer, including in non-application positions, and in
|
||||
Creates a @tech{rename transformer} that, when used as a
|
||||
@tech{transformer binding}, acts as a transformer that insert the
|
||||
identifier @scheme[id-stx] in place of whatever identifier binds the
|
||||
transformer, including in non-application positions, and in
|
||||
@scheme[set!] expressions. Such a transformer could be written
|
||||
manually, but the one created by @scheme[make-rename-transformer]
|
||||
cooperates specially with @scheme[syntax-local-value] (see below).}
|
||||
cooperates specially with @scheme[syntax-local-value] and
|
||||
@scheme[syntax-local-make-delta-introducer].}
|
||||
|
||||
|
||||
@defproc[(rename-transformer? [v any/c]) boolean?]{
|
||||
|
@ -184,15 +188,25 @@ expressions are reported as @scheme[define-values] forms (in the
|
|||
transformer environment).}
|
||||
|
||||
|
||||
@defproc[(internal-definition-context? [v any/c]) boolean?]{
|
||||
|
||||
Returns @scheme[#t] if @scheme[v] is an @tech{internal-definition
|
||||
context}, @scheme[#f] otherwise.}
|
||||
|
||||
|
||||
@defproc[(syntax-local-make-definition-context) internal-definition-context?]{
|
||||
|
||||
Creates an opaque internal-definition context value to be used with
|
||||
@scheme[local-expand] and other functions. A transformer should create
|
||||
one context for each set of internal definitions to be expanded, and
|
||||
use it when expanding any form whose lexical context should include
|
||||
the definitions. After discovering an internal @scheme[define-values]
|
||||
or @scheme[define-syntaxes] form, use
|
||||
Creates an opaque @tech{internal-definition context} value to be used
|
||||
with @scheme[local-expand] and other functions. A transformer should
|
||||
create one context for each set of internal definitions to be
|
||||
expanded, and use it when expanding any form whose lexical context
|
||||
should include the definitions. After discovering an internal
|
||||
@scheme[define-values] or @scheme[define-syntaxes] form, use
|
||||
@scheme[syntax-local-bind-syntaxes] to add bindings to the context.
|
||||
Finally, the transformer must call
|
||||
@scheme[internal-definition-context-seal] after all bindings have been
|
||||
added; if an unsealed @tech{internal-definition context} is detected
|
||||
in a fully expanded expression, the @exnraise[exn:fail:contract].
|
||||
|
||||
@transform-time[]}
|
||||
|
||||
|
@ -203,7 +217,7 @@ or @scheme[define-syntaxes] form, use
|
|||
void?]{
|
||||
|
||||
Binds each identifier in @scheme[id-list] within the
|
||||
internal-definition context represented by @scheme[intdef-ctx], where
|
||||
@tech{internal-definition context} represented by @scheme[intdef-ctx], where
|
||||
@scheme[intdef-ctx] is the result of
|
||||
@scheme[syntax-local-make-definition-context]. Supply @scheme[#f] for
|
||||
@scheme[expr] when the identifiers correspond to
|
||||
|
@ -216,6 +230,24 @@ match the number of identifiers, otherwise the
|
|||
@transform-time[]}
|
||||
|
||||
|
||||
@defproc[(internal-definition-context-seal [intdef-ctx internal-definition-context?])
|
||||
void?]{
|
||||
|
||||
Indicates that no further bindings will be added to
|
||||
@scheme[intdef-ctx], which must not be sealed already. See also
|
||||
@scheme[syntax-local-make-definition-context].}
|
||||
|
||||
|
||||
@defproc[(identifier-remove-from-defininition-context [id-stx identifier?]
|
||||
[intdef-ctx internal-definition-context?])
|
||||
identifier?]{
|
||||
|
||||
Removes @scheme[intdef-ctx] from the @tech{lexical information} of
|
||||
@scheme[id-stx]. This operation is useful for correlating an identifier
|
||||
that is bound in an internal-definition context with its binding
|
||||
before the internal-definition context was created.}
|
||||
|
||||
|
||||
@defproc[(syntax-local-value [id-stx syntax?]
|
||||
[failure-thunk (or/c (-> any) #f)
|
||||
#f]
|
||||
|
@ -225,16 +257,16 @@ match the number of identifiers, otherwise the
|
|||
any]{
|
||||
|
||||
Returns the @tech{transformer binding} value of @scheme[id-stx] in
|
||||
either the context asscoiated with @scheme[intdef-ctx] (if not
|
||||
either the context associated with @scheme[intdef-ctx] (if not
|
||||
@scheme[#f]) or the context of the expression being expanded (if
|
||||
@scheme[indef-ctx] is @scheme[#f]). If @scheme[intdef-ctx] is
|
||||
provided, it must be an extension of the context of the expression
|
||||
being expanded.
|
||||
|
||||
If @scheme[id-stx] is bound to a rename transformer created with
|
||||
@scheme[make-rename-transformer], @scheme[syntax-local-value]
|
||||
If @scheme[id-stx] is bound to a @tech{rename transformer} created
|
||||
with @scheme[make-rename-transformer], @scheme[syntax-local-value]
|
||||
effectively calls itself with the target of the rename and returns
|
||||
that result, instead of the rename transformer.
|
||||
that result, instead of the @tech{rename transformer}.
|
||||
|
||||
If @scheme[id-stx] has no @tech{transformer binding} (via
|
||||
@scheme[define-syntax], @scheme[let-syntax], etc.) in that
|
||||
|
@ -333,8 +365,8 @@ context}. The identity of the lists's first element (i.e., its
|
|||
@scheme[eq?]ness) reflects the identity of the internal-definition
|
||||
context; in particular two transformer expansions receive the same
|
||||
first value if and only if they are invoked for the same
|
||||
internal-definition context. Later values in the list similarly
|
||||
identify internal-definition contexts that are still being expanded,
|
||||
@tech{internal-definition context}. Later values in the list similarly
|
||||
identify @tech{internal-definition contexts} that are still being expanded,
|
||||
and that required the expansion of nested internal-definition
|
||||
contexts.
|
||||
|
||||
|
@ -440,20 +472,53 @@ mark}. Multiple applications of the same
|
|||
@scheme[make-syntax-introducer] result procedure use the same mark,
|
||||
and different result procedures use distinct marks.}
|
||||
|
||||
@defproc[(make-syntax-delta-introducer [ext-stx syntax?] [base-stx syntax?])
|
||||
@defproc[(make-syntax-delta-introducer [ext-stx syntax?]
|
||||
[base-stx syntax?]
|
||||
[phase-level (or/c #f exact-integer?)
|
||||
(syntax-local-phase-level)])
|
||||
(syntax? . -> . syntax?)]{
|
||||
|
||||
Produces a procedure that behaves like
|
||||
@scheme[syntax-local-introduce], but using the @tech{syntax
|
||||
marks} of @scheme[ext-stx] that are not shared with @scheme[base-stx].
|
||||
@scheme[syntax-local-introduce], but using the @tech{syntax marks} of
|
||||
@scheme[ext-stx] that are not shared with @scheme[base-stx]. If
|
||||
@scheme[ext-stx] does not extend the set of marks in @scheme[base-stx]
|
||||
but @scheme[ext-stx] has a module binding in the @tech{phase level}
|
||||
indicated by @scheme[phase-level], then any marks of @scheme[ext-stx]
|
||||
that would be needed to preserve its binding are not transferred in an
|
||||
introduction.
|
||||
|
||||
This procedure is useful when @scheme[_m-id] has a transformer binding
|
||||
that records some @scheme[_orig-id], and a use of @scheme[_m-id]
|
||||
introduces a binding of @scheme[_orig-id]. In that case, the
|
||||
@tech{syntax marks} in the use of @scheme[_m-id] since the binding of
|
||||
@scheme[_m-id] should be transferred to the binding instance of
|
||||
@scheme[_orig-id], so that it captures uses with the same lexical
|
||||
context as the use of @scheme[_m-id].}
|
||||
This procedure is potentially useful when @scheme[_m-id] has a
|
||||
transformer binding that records some @scheme[_orig-id], and a use of
|
||||
@scheme[_m-id] introduces a binding of @scheme[_orig-id]. In that
|
||||
case, the @tech{syntax marks} in the use of @scheme[_m-id] since the
|
||||
binding of @scheme[_m-id] should be transferred to the binding
|
||||
instance of @scheme[_orig-id], so that it captures uses with the same
|
||||
lexical context as the use of @scheme[_m-id].
|
||||
|
||||
More typically, however, @scheme[syntax-local-make-delta-introducer]
|
||||
should be used, since it cooperates with @tech{rename transformers}.}
|
||||
|
||||
@defproc[(syntax-local-make-delta-introducer [id identifier?])
|
||||
(identifier? . -> . identifier?)]{
|
||||
|
||||
Determines the binding of @scheme[id]. If the binding is not a
|
||||
@tech{rename transformer}, the result is an introducer as created by
|
||||
@scheme[make-syntax-delta-introducer] using @scheme[id] and the
|
||||
binding of @scheme[id] in the environment of expansion. If the binding
|
||||
is a @tech{rename transformer}, then the introducer is one composed
|
||||
with the target of the @tech{rename transformer} and its
|
||||
binding. Furthermore, the @scheme[_delta-introduce] functions
|
||||
associated with the @tech{rename transformers} (supplied as the second
|
||||
argument to @scheme[make-rename-transformer]) are composed (in
|
||||
first-to-last order) before the introducers created with
|
||||
@scheme[make-syntax-delta-introducer] (which are composed
|
||||
last-to-first).
|
||||
|
||||
The @exnraise[exn:fail:contract] if @scheme[id] or any identifier in
|
||||
its rename-transformer chain has no binding.
|
||||
|
||||
@transform-time[]}
|
||||
|
||||
|
||||
@defproc[(syntax-local-transforming-module-provides?) boolean?]{
|
||||
|
||||
|
|
|
@ -543,8 +543,9 @@ transformer binding's value. When @scheme[_id] is bound to a
|
|||
@deftech{rename transformer} produced by
|
||||
@scheme[make-rename-transformer], it is replaced with the identifier
|
||||
passed to @scheme[make-rename-transformer]. Furthermore, the binding
|
||||
is also specially handled by @scheme[syntax-local-value] as used by
|
||||
@tech{syntax transformer}s.
|
||||
is also specially handled by @scheme[syntax-local-value] and
|
||||
@scheme[syntax-local-make-delta-introducer] as used by @tech{syntax
|
||||
transformer}s.
|
||||
|
||||
In addition to using marks to track introduced identifiers, the
|
||||
expander tracks the expansion history of a form through @tech{syntax
|
||||
|
|
|
@ -9,7 +9,8 @@
|
|||
make-provide-transformer)
|
||||
scheme/provide-syntax
|
||||
scheme/provide
|
||||
scheme/nest))
|
||||
scheme/nest
|
||||
scheme/package))
|
||||
|
||||
@(define cvt (schemefont "CVT"))
|
||||
|
||||
|
@ -68,10 +69,13 @@ Within such specifications,
|
|||
|
||||
@defform[(module id module-path form ...)]{
|
||||
|
||||
Declares a module. If the @scheme[current-module-declare-name]
|
||||
parameter is set, the parameter value is used for the module name,
|
||||
otherwise @scheme[(#,(scheme quote) id)] is the name of the declared
|
||||
module.
|
||||
Declares a top-level module. If the
|
||||
@scheme[current-module-declare-name] parameter is set, the parameter
|
||||
value is used for the module name, otherwise @scheme[(#,(scheme quote)
|
||||
id)] is the name of the declared module.
|
||||
|
||||
@margin-note/ref{For a @scheme[module]-like form for use @emph{within}
|
||||
modules and other contexts, see @scheme[define-package].}
|
||||
|
||||
The @scheme[module-path] must be as for @scheme[require], and it
|
||||
supplies the initial bindings for the body @scheme[form]s. That is, it
|
||||
|
@ -1931,6 +1935,9 @@ provides a hook to control interactive evaluation through
|
|||
@scheme[load] (more precisely, the default @tech{load handler}) or
|
||||
@scheme[read-eval-print-loop].}
|
||||
|
||||
@;------------------------------------------------------------------------
|
||||
@include-section["package.scrbl"]
|
||||
|
||||
@;------------------------------------------------------------------------
|
||||
@section[#:tag "nest"]{Flattening Syntactic Sequences: @scheme[nest]}
|
||||
|
||||
|
|
|
@ -214,7 +214,7 @@
|
|||
|
||||
(arity-test make-set!-transformer 1 1)
|
||||
(arity-test set!-transformer? 1 1)
|
||||
(arity-test make-rename-transformer 1 1)
|
||||
(arity-test make-rename-transformer 1 2)
|
||||
(arity-test rename-transformer? 1 1)
|
||||
|
||||
;; Test inheritance of context when . is used in a pattern
|
||||
|
@ -400,4 +400,36 @@
|
|||
|
||||
;; ----------------------------------------
|
||||
|
||||
(define-syntax (bind stx)
|
||||
(syntax-case stx ()
|
||||
[(_ handle def)
|
||||
(let ([def-ctx (syntax-local-make-definition-context)]
|
||||
[ctx (cons (gensym 'intdef)
|
||||
(let ([orig-ctx (syntax-local-context)])
|
||||
(if (pair? orig-ctx)
|
||||
orig-ctx
|
||||
null)))]
|
||||
[kernel-forms (list #'define-values)])
|
||||
(let ([def (local-expand #'def ctx kernel-forms def-ctx)])
|
||||
(syntax-case def ()
|
||||
[(define-values (id) rhs)
|
||||
(begin
|
||||
(syntax-local-bind-syntaxes (list #'id) #f def-ctx)
|
||||
#'(begin
|
||||
(define-values (id) rhs)
|
||||
(define-syntax handle (quote-syntax id))))]
|
||||
[_ (error "no")])))]))
|
||||
|
||||
(define-syntax (nab stx)
|
||||
(syntax-case stx ()
|
||||
[(_ handle)
|
||||
(syntax-local-value #'handle)]))
|
||||
|
||||
(let ()
|
||||
(bind h (define q 5))
|
||||
(define q 8)
|
||||
(nab h))
|
||||
|
||||
;; ----------------------------------------
|
||||
|
||||
(report-errs)
|
||||
|
|
|
@ -72,6 +72,10 @@
|
|||
(syntax-rules ()
|
||||
[(_ [str num] ...) (begin (test (string->number str) num) ...)]))
|
||||
|
||||
(define-syntax test/approx-string-to-number
|
||||
(syntax-rules ()
|
||||
[(_ [str num] ...) (begin (test/approx (string->number str) num) ...)]))
|
||||
|
||||
;; Definitions ----------------------------------------
|
||||
|
||||
(define add3
|
||||
|
@ -968,7 +972,9 @@
|
|||
("#e1e1000" (expt 10 1000))
|
||||
("#e-1e1000" (- (expt 10 1000)))
|
||||
("#e1e-1000" (expt 10 -1000))
|
||||
("#e-1e-1000" (- (expt 10 -1000)))
|
||||
("#e-1e-1000" (- (expt 10 -1000))))
|
||||
|
||||
(test/approx-string-to-number
|
||||
("#i1e100" (inexact (expt 10 100)))
|
||||
("#i1e1000" (inexact (expt 10 1000)))
|
||||
("#i-1e1000" (inexact (- (expt 10 1000))))
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
[require "match/plt-match-tests.ss"]
|
||||
;; [require "stepper/automatic-tests.ss" (lib "scheme/base")]
|
||||
[require "lazy/main.ss"]
|
||||
[require "scribble/main.ss"]
|
||||
))
|
||||
|
||||
|
||||
|
|
|
@ -1644,12 +1644,16 @@
|
|||
|
||||
(define-signature sig^ (u-a))
|
||||
|
||||
(define unit@
|
||||
(unit
|
||||
(import)
|
||||
(export sig^)
|
||||
(define-unit unit@
|
||||
(import)
|
||||
(export sig^)
|
||||
|
||||
(define u-a 'zero))
|
||||
|
||||
(define u-a 'zero)))
|
||||
(test 'zero
|
||||
(let ([q:u-a 5])
|
||||
(define-values/invoke-unit unit@ (import) (export (prefix q: sig^)))
|
||||
q:u-a))
|
||||
|
||||
(define-syntax (use-unit stx)
|
||||
(syntax-case stx ()
|
||||
|
@ -1658,6 +1662,13 @@
|
|||
(define-values/invoke-unit unit@ (import) (export sig^))
|
||||
u-a)]))
|
||||
|
||||
(define-syntax (use-unit2 stx)
|
||||
(syntax-case stx ()
|
||||
[(_)
|
||||
#'(let ()
|
||||
(define-values/invoke-unit/infer unit@)
|
||||
u-a)]))
|
||||
|
||||
(define-syntax (use-unit-badly1 stx)
|
||||
(syntax-case stx ()
|
||||
[(_ u-a)
|
||||
|
@ -1673,6 +1684,7 @@
|
|||
u-a)]))
|
||||
|
||||
(test 'zero (use-unit))
|
||||
(test 'zero (use-unit2))
|
||||
(test-runtime-error exn:fail:contract:variable? "context mismatch; no u-a"
|
||||
(use-unit-badly1 u-a))
|
||||
(test-runtime-error exn:fail:contract:variable? "context mismatch; no u-a"
|
||||
|
|
|
@ -286,56 +286,111 @@ the template to be unescaped, then create a @scheme[cdata] structure:
|
|||
|
||||
@section{Conversion Example}
|
||||
|
||||
Alonzo Church has been maintaining a blog with PLT Scheme for some years and would like to convert to @schememodname[web-server/templates].
|
||||
Al Church has been maintaining a blog with PLT Scheme for some years and would like to convert to @schememodname[web-server/templates].
|
||||
|
||||
Here's the code he starts off with:
|
||||
@schememod[
|
||||
scheme
|
||||
(require xml
|
||||
web-server/servlet
|
||||
web-server/servlet-env)
|
||||
|
||||
(code:comment "He actually Church-encodes them, but we'll use structs.")
|
||||
(define-struct post (title body comments))
|
||||
The data-structures he uses are defined as:
|
||||
@schemeblock[
|
||||
(define-struct post (title body))
|
||||
|
||||
(define posts
|
||||
(list
|
||||
(make-post
|
||||
"(Y Y) Works: The Why of Y"
|
||||
"..."
|
||||
(list
|
||||
"First post! - A.T."
|
||||
"Didn't I write this? - Matthias"))
|
||||
"Why is Y, that is the question.")
|
||||
(make-post
|
||||
"Church and the States"
|
||||
"As you may know, I grew up in DC, not technically a state..."
|
||||
(list
|
||||
"Finally, A Diet That Really Works! As Seen On TV"))))
|
||||
"As you may know, I grew up in DC, not technically a state.")))
|
||||
]
|
||||
Actually, Al Church-encodes these posts, but for explanatory reasons, we'll use structs.
|
||||
|
||||
(code:comment "A function that is the generic template for the site")
|
||||
He has divided his code into presentation functions and logic functions. We'll look at the presentation functions first.
|
||||
|
||||
The first presentation function defines the common layout of all pages.
|
||||
@schemeblock[
|
||||
(define (template section body)
|
||||
`(html
|
||||
(head (title "Alonzo's Church: " ,section)
|
||||
(style ([type "text/css"])
|
||||
(code:comment "CDATA objects were useful for returning raw data")
|
||||
,(make-cdata #f #f "\n body {\n margin: 0px;\n padding: 10px;\n }\n\n #main {\n background: #dddddd;\n }")))
|
||||
(head (title "Al's Church: " ,section))
|
||||
(body
|
||||
(script ([type "text/javascript"])
|
||||
(code:comment "Which is particularly useful for JavaScript")
|
||||
,(make-cdata #f #f "\n var gaJsHost = ((\"https:\" == document.location.protocol) ?\n \"https://ssl.\" : \"http://www.\");\n document.write(unescape(\"%3Cscript src='\" + gaJsHost +\n \"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E\"));\n"))
|
||||
(script ([type "text/javascript"])
|
||||
,(make-cdata #f #f "\n var pageTracker = _gat._getTracker(\"UA-YYYYYYY-Y\");\n pageTracker._trackPageview();\n"))
|
||||
|
||||
(h1 "Alonzo's Church: " ,section)
|
||||
(h1 "Al's Church: " ,section)
|
||||
(div ([id "main"])
|
||||
(code:comment "He had to be careful to use splicing here")
|
||||
,@body))))
|
||||
]
|
||||
|
||||
One of the things to notice here is the @scheme[unquote-splicing] on the @scheme[body] argument.
|
||||
This indicates that the @scheme[body] is list of @|xexpr|s. If he had accidentally used only @scheme[unquote]
|
||||
then there would be an error in converting the return value to an HTTP response.
|
||||
|
||||
@schemeblock[
|
||||
(define (blog-posted title body k-url)
|
||||
`((h2 ,title)
|
||||
(p ,body)
|
||||
(h1 (a ([href ,k-url]) "Continue"))))
|
||||
]
|
||||
|
||||
Here's an example of simple body that uses a list of @|xexpr|s to show the newly posted blog entry, before continuing to redisplay
|
||||
the main page. Let's look at a more complicated body:
|
||||
|
||||
@schemeblock[
|
||||
(define (blog-posts k-url)
|
||||
(append
|
||||
(apply append
|
||||
(for/list ([p posts])
|
||||
`((h2 ,(post-title p))
|
||||
(p ,(post-body p)))))
|
||||
`((h1 "New Post")
|
||||
(form ([action ,k-url])
|
||||
(input ([name "title"]))
|
||||
(input ([name "body"]))
|
||||
(input ([type "submit"]))))))
|
||||
]
|
||||
|
||||
This function shows a number of common patterns that are required by @|xexpr|s. First, @scheme[append] is used to combine
|
||||
different @|xexpr| lists. Second, @scheme[apply append] is used to collapse and combine the results of a @scheme[for/list]
|
||||
where each iteration results in a list of @|xexpr|s. We'll see that these patterns are unnecessary with templates. Another
|
||||
annoying patterns shows up when Al tries to add CSS styling and some JavaScript from Google Analytics to all the pages of
|
||||
his blog. He changes the @scheme[template] function to:
|
||||
|
||||
@schemeblock[
|
||||
(define (template section body)
|
||||
`(html
|
||||
(head
|
||||
(title "Al's Church: " ,section)
|
||||
(style ([type "text/css"])
|
||||
"body {margin: 0px; padding: 10px;}"
|
||||
"#main {background: #dddddd;}"))
|
||||
(body
|
||||
(script
|
||||
([type "text/javascript"])
|
||||
,(make-cdata
|
||||
#f #f
|
||||
"var gaJsHost = ((\"https:\" =="
|
||||
"document.location.protocol)"
|
||||
"? \"https://ssl.\" : \"http://www.\");"
|
||||
"document.write(unescape(\"%3Cscript src='\" + gaJsHost"
|
||||
"+ \"google-analytics.com/ga.js' "
|
||||
"type='text/javascript'%3E%3C/script%3E\"));"))
|
||||
(script
|
||||
([type "text/javascript"])
|
||||
,(make-cdata
|
||||
#f #f
|
||||
"var pageTracker = _gat._getTracker(\"UA-YYYYYYY-Y\");"
|
||||
"pageTracker._trackPageview();"))
|
||||
(h1 "Al's Church: " ,section)
|
||||
(div ([id "main"])
|
||||
,@body))))
|
||||
]
|
||||
|
||||
@margin-note{Some of these problems go away by using here strings, as described in the documentation on
|
||||
@secref[#:doc '(lib "scribblings/reference/reference.scrbl")]{parse-string}.}
|
||||
|
||||
The first thing we notice is that encoding CSS as a string is rather primitive. Encoding JavaScript with strings is even worse for two
|
||||
reasons: first, we are more likely to need to manually escape characters such as @"\""; second, we need to use a CDATA object, because most
|
||||
JavaScript code uses characters that "need" to be escaped in XML, such as &, but most browsers will fail if these characters are
|
||||
entity-encoded. These are all problems that go away with templates.
|
||||
|
||||
|
||||
Before moving to templates, let's look at the logic functions:
|
||||
@schemeblock[
|
||||
(define (extract-post req)
|
||||
(define binds
|
||||
(request-bindings req))
|
||||
|
@ -344,30 +399,13 @@ Here's the code he starts off with:
|
|||
(define body
|
||||
(extract-binding/single 'body binds))
|
||||
(set! posts
|
||||
(list* (make-post title body empty)
|
||||
(list* (make-post title body)
|
||||
posts))
|
||||
(send/suspend
|
||||
(lambda (k-url)
|
||||
(template "Posted" (blog-posted title body k-url))))
|
||||
(display-posts))
|
||||
|
||||
(define (blog-posts k-url)
|
||||
(code:comment "append or splicing is needed")
|
||||
(append
|
||||
(code:comment "Each element of the list is another list")
|
||||
(apply append
|
||||
(for/list ([p posts])
|
||||
`((h2 ,(post-title p))
|
||||
(p ,(post-body p))
|
||||
(ul
|
||||
,@(for/list ([c (post-comments p)])
|
||||
`(li ,c))))))
|
||||
`((h1 "New Post")
|
||||
(form ([action ,k-url])
|
||||
(input ([name "title"]))
|
||||
(input ([name "body"]))
|
||||
(input ([type "submit"]))))))
|
||||
|
||||
(define (display-posts)
|
||||
(extract-post
|
||||
(send/suspend
|
||||
|
@ -376,19 +414,29 @@ Here's the code he starts off with:
|
|||
|
||||
(define (start req)
|
||||
(display-posts))
|
||||
|
||||
(serve/servlet start)
|
||||
]
|
||||
|
||||
Luckily, Alonzo has great software engineering skills, so he's already separated the presentation logic into the functions
|
||||
@scheme[blog-posted], @scheme[blog-posts], and @scheme[template]. Each one of these will turn into a different
|
||||
template.
|
||||
To use templates, we need only change @scheme[template], @scheme[blog-posted], and @scheme[blog-posts]:
|
||||
|
||||
@schemeblock[
|
||||
(define (template section body)
|
||||
(list TEXT/HTML-MIME-TYPE
|
||||
(include-template "blog.html")))
|
||||
|
||||
(define (blog-posted title body k-url)
|
||||
(include-template "blog-posted.html"))
|
||||
|
||||
(define (blog-posts k-url)
|
||||
(include-template "blog-posts.html"))
|
||||
]
|
||||
|
||||
Each of the templates are given below:
|
||||
|
||||
@filepath{blog.html}:
|
||||
@verbatim[#:indent 2]|{
|
||||
<html>
|
||||
<head>
|
||||
<title>Alonzo's Church: @|section|</title>
|
||||
<title>Al's Church: @|section|</title>
|
||||
<style type="text/css">
|
||||
body {
|
||||
margin: 0px;
|
||||
|
@ -413,7 +461,7 @@ template.
|
|||
pageTracker._trackPageview();
|
||||
</script>
|
||||
|
||||
<h1>Alonzo's Church: @|section|</h1>
|
||||
<h1>Al's Church: @|section|</h1>
|
||||
<div id="main">
|
||||
@body
|
||||
</div>
|
||||
|
@ -426,16 +474,19 @@ can be included verbatim, without resorting to any special escape-escaping patte
|
|||
Similarly, since the @scheme[body] is represented as a string, there is no need to
|
||||
remember if splicing is necessary.
|
||||
|
||||
@filepath{blog-posted.html}:
|
||||
@verbatim[#:indent 2]|{
|
||||
<h2>@|title|</h2>
|
||||
<p>@|body|</p>
|
||||
|
||||
<h1><a href="@|k-url|">Continue</a></h1>
|
||||
}|
|
||||
|
||||
@filepath{blog-posts.html}:
|
||||
@verbatim[#:indent 2]|{
|
||||
@in[p posts]{
|
||||
<h2>@(post-title p)</h2>
|
||||
<p>@(post-body p)</p>
|
||||
<ul>
|
||||
@in[c (post-comments p)]{
|
||||
<li>@|c|</li>
|
||||
}
|
||||
</ul>
|
||||
}
|
||||
|
||||
<h1>New Post</h1>
|
||||
|
@ -446,55 +497,5 @@ remember if splicing is necessary.
|
|||
</form>
|
||||
}|
|
||||
|
||||
This template is even simpler, because there is no list management whatsoever. The defaults "just work".
|
||||
For completeness, we show the final template:
|
||||
|
||||
@filepath{blog-posted.html}:
|
||||
@verbatim[#:indent 2]|{
|
||||
<h2>@|title|</h2>
|
||||
<p>@|body|</p>
|
||||
|
||||
<h1><a href="@|k-url|">Continue</a></h1>
|
||||
}|
|
||||
|
||||
The code associated with these templates is very simple as well:
|
||||
@schememod[
|
||||
scheme
|
||||
(require web-server/templates
|
||||
web-server/servlet
|
||||
web-server/servlet-env)
|
||||
|
||||
(define-struct post (title body comments))
|
||||
|
||||
(define posts ....)
|
||||
|
||||
(define (template section body)
|
||||
(list TEXT/HTML-MIME-TYPE
|
||||
(include-template "blog.html")))
|
||||
|
||||
(define (extract-post req)
|
||||
(define binds
|
||||
(request-bindings req))
|
||||
(define title
|
||||
(extract-binding/single 'title binds))
|
||||
(define body
|
||||
(extract-binding/single 'body binds))
|
||||
(set! posts
|
||||
(list* (make-post title body empty)
|
||||
posts))
|
||||
(send/suspend
|
||||
(lambda (k-url)
|
||||
(template "Posted" (include-template "blog-posted.html"))))
|
||||
(display-posts))
|
||||
|
||||
(define (display-posts)
|
||||
(extract-post
|
||||
(send/suspend
|
||||
(lambda (k-url)
|
||||
(template "Posts" (include-template "blog-posts.html"))))))
|
||||
|
||||
(define (start req)
|
||||
(display-posts))
|
||||
|
||||
(serve/servlet start)
|
||||
]
|
||||
Compare this template with the original presentation function: there is no need to worry about managing how lists
|
||||
are nested: the defaults @emph{just work}.
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
Version 4.1.3.2
|
||||
Added internal-definition-context-seal, which must be used on an
|
||||
internal-definition context before it's part of a fully expanded form
|
||||
Added syntax-local-make-delta-introducer
|
||||
Changed make-rename-transformer to accept an introducer argument that
|
||||
cooperates with syntax-local-make-delta-introducer
|
||||
Added internal-defininition-context?
|
||||
Added identifier-remove-from-defininition-context
|
||||
|
||||
Version 4.1.3, November 2008
|
||||
Changed scheme to re-export scheme/port
|
||||
In scheme/port: added
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,7,52,46,49,46,50,46,52,50,0,0,0,1,0,0,6,0,9,0,
|
||||
static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,7,52,46,49,46,51,46,50,50,0,0,0,1,0,0,6,0,9,0,
|
||||
13,0,26,0,29,0,34,0,41,0,46,0,51,0,58,0,65,0,69,0,78,
|
||||
0,84,0,98,0,112,0,115,0,119,0,121,0,132,0,134,0,148,0,155,0,
|
||||
177,0,179,0,193,0,253,0,23,1,32,1,41,1,51,1,68,1,107,1,146,
|
||||
|
@ -14,11 +14,11 @@
|
|||
115,61,120,73,108,101,116,114,101,99,45,118,97,108,117,101,115,66,108,97,109,
|
||||
98,100,97,1,20,112,97,114,97,109,101,116,101,114,105,122,97,116,105,111,110,
|
||||
45,107,101,121,61,118,73,100,101,102,105,110,101,45,118,97,108,117,101,115,98,
|
||||
10,35,11,8,188,227,94,159,2,16,35,35,159,2,15,35,35,16,20,2,3,
|
||||
10,35,11,8,174,227,94,159,2,16,35,35,159,2,15,35,35,16,20,2,3,
|
||||
2,2,2,4,2,2,2,10,2,2,2,5,2,2,2,6,2,2,2,7,2,
|
||||
2,2,8,2,2,2,9,2,2,2,11,2,2,2,12,2,2,97,36,11,8,
|
||||
188,227,93,159,2,15,35,36,16,2,2,13,161,2,2,36,2,13,2,2,2,
|
||||
13,97,10,11,11,8,188,227,16,0,97,10,37,11,8,188,227,16,0,13,16,
|
||||
174,227,93,159,2,15,35,36,16,2,2,13,161,2,2,36,2,13,2,2,2,
|
||||
13,97,10,11,11,8,174,227,16,0,97,10,37,11,8,174,227,16,0,13,16,
|
||||
4,35,29,11,11,2,2,11,18,98,64,104,101,114,101,8,31,8,30,8,29,
|
||||
8,28,8,27,27,248,22,133,4,23,196,1,249,22,190,3,80,158,38,35,251,
|
||||
22,74,2,17,248,22,89,23,200,2,12,249,22,64,2,1,248,22,91,23,202,
|
||||
|
@ -28,14 +28,14 @@
|
|||
36,28,248,22,72,248,22,66,23,195,2,248,22,65,193,249,22,190,3,80,158,
|
||||
38,35,251,22,74,2,17,248,22,65,23,200,2,249,22,64,2,12,248,22,66,
|
||||
23,202,1,11,18,100,10,8,31,8,30,8,29,8,28,8,27,16,4,11,11,
|
||||
2,18,3,1,7,101,110,118,57,57,53,57,16,4,11,11,2,19,3,1,7,
|
||||
101,110,118,57,57,54,48,27,248,22,66,248,22,133,4,23,197,1,28,248,22,
|
||||
2,18,3,1,7,101,110,118,57,55,50,53,16,4,11,11,2,19,3,1,7,
|
||||
101,110,118,57,55,50,54,27,248,22,66,248,22,133,4,23,197,1,28,248,22,
|
||||
72,23,194,2,20,15,159,36,35,36,28,248,22,72,248,22,66,23,195,2,248,
|
||||
22,65,193,249,22,190,3,80,158,38,35,250,22,74,2,20,248,22,74,249,22,
|
||||
74,248,22,74,2,21,248,22,65,23,202,2,251,22,74,2,17,2,21,2,21,
|
||||
249,22,64,2,5,248,22,66,23,205,1,18,100,11,8,31,8,30,8,29,8,
|
||||
28,8,27,16,4,11,11,2,18,3,1,7,101,110,118,57,57,54,50,16,4,
|
||||
11,11,2,19,3,1,7,101,110,118,57,57,54,51,248,22,133,4,193,27,248,
|
||||
28,8,27,16,4,11,11,2,18,3,1,7,101,110,118,57,55,50,56,16,4,
|
||||
11,11,2,19,3,1,7,101,110,118,57,55,50,57,248,22,133,4,193,27,248,
|
||||
22,133,4,194,249,22,64,248,22,74,248,22,65,196,248,22,66,195,27,248,22,
|
||||
66,248,22,133,4,23,197,1,249,22,190,3,80,158,38,35,28,248,22,52,248,
|
||||
22,191,3,248,22,65,23,198,2,27,249,22,2,32,0,89,162,8,44,36,42,
|
||||
|
@ -65,8 +65,8 @@
|
|||
251,22,74,2,17,28,249,22,162,8,248,22,191,3,248,22,65,23,201,2,64,
|
||||
101,108,115,101,10,248,22,65,23,198,2,250,22,75,2,20,9,248,22,66,23,
|
||||
201,1,249,22,64,2,8,248,22,66,23,203,1,99,8,31,8,30,8,29,8,
|
||||
28,8,27,16,4,11,11,2,18,3,1,7,101,110,118,57,57,56,53,16,4,
|
||||
11,11,2,19,3,1,7,101,110,118,57,57,56,54,18,158,94,10,64,118,111,
|
||||
28,8,27,16,4,11,11,2,18,3,1,7,101,110,118,57,55,53,49,16,4,
|
||||
11,11,2,19,3,1,7,101,110,118,57,55,53,50,18,158,94,10,64,118,111,
|
||||
105,100,8,47,27,248,22,66,248,22,133,4,196,249,22,190,3,80,158,38,35,
|
||||
28,248,22,52,248,22,191,3,248,22,65,197,250,22,74,2,26,248,22,74,248,
|
||||
22,65,199,248,22,89,198,27,248,22,191,3,248,22,65,197,250,22,74,2,26,
|
||||
|
@ -99,7 +99,7 @@
|
|||
EVAL_ONE_SIZED_STR((char *)expr, 2032);
|
||||
}
|
||||
{
|
||||
static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,7,52,46,49,46,50,46,52,60,0,0,0,1,0,0,3,0,16,0,
|
||||
static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,7,52,46,49,46,51,46,50,60,0,0,0,1,0,0,3,0,16,0,
|
||||
21,0,38,0,53,0,71,0,87,0,97,0,115,0,135,0,151,0,169,0,200,
|
||||
0,229,0,251,0,9,1,15,1,29,1,34,1,44,1,52,1,80,1,112,1,
|
||||
157,1,202,1,226,1,9,2,11,2,68,2,158,3,199,3,33,5,137,5,241,
|
||||
|
@ -344,12 +344,12 @@
|
|||
EVAL_ONE_SIZED_STR((char *)expr, 5068);
|
||||
}
|
||||
{
|
||||
static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,7,52,46,49,46,50,46,52,8,0,0,0,1,0,0,6,0,19,0,
|
||||
static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,7,52,46,49,46,51,46,50,8,0,0,0,1,0,0,6,0,19,0,
|
||||
34,0,48,0,62,0,76,0,111,0,0,0,255,0,0,0,65,113,117,111,116,
|
||||
101,29,94,2,1,67,35,37,117,116,105,108,115,11,29,94,2,1,69,35,37,
|
||||
110,101,116,119,111,114,107,11,29,94,2,1,68,35,37,112,97,114,97,109,122,
|
||||
11,29,94,2,1,68,35,37,101,120,112,111,98,115,11,29,94,2,1,68,35,
|
||||
37,107,101,114,110,101,108,11,98,10,35,11,8,190,229,97,159,2,2,35,35,
|
||||
37,107,101,114,110,101,108,11,98,10,35,11,8,176,229,97,159,2,2,35,35,
|
||||
159,2,3,35,35,159,2,4,35,35,159,2,5,35,35,159,2,6,35,35,16,
|
||||
0,159,35,20,103,159,35,16,1,65,98,101,103,105,110,16,0,83,158,41,20,
|
||||
100,138,69,35,37,98,117,105,108,116,105,110,29,11,11,11,10,10,18,96,11,
|
||||
|
@ -361,40 +361,41 @@
|
|||
EVAL_ONE_SIZED_STR((char *)expr, 292);
|
||||
}
|
||||
{
|
||||
static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,7,52,46,49,46,50,46,52,52,0,0,0,1,0,0,3,0,14,0,
|
||||
static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,7,52,46,49,46,51,46,50,53,0,0,0,1,0,0,3,0,14,0,
|
||||
41,0,47,0,60,0,74,0,96,0,122,0,134,0,152,0,172,0,184,0,200,
|
||||
0,223,0,3,1,8,1,13,1,18,1,23,1,54,1,58,1,66,1,74,1,
|
||||
82,1,185,1,230,1,250,1,29,2,64,2,98,2,108,2,155,2,165,2,172,
|
||||
2,71,4,84,4,103,4,222,4,234,4,130,5,144,5,8,6,14,6,28,6,
|
||||
55,6,140,6,142,6,207,6,142,12,201,12,233,12,0,0,157,15,0,0,29,
|
||||
11,11,70,100,108,108,45,115,117,102,102,105,120,1,25,100,101,102,97,117,108,
|
||||
116,45,108,111,97,100,47,117,115,101,45,99,111,109,112,105,108,101,100,65,113,
|
||||
117,111,116,101,29,94,2,4,67,35,37,117,116,105,108,115,11,29,94,2,4,
|
||||
68,35,37,112,97,114,97,109,122,11,1,20,100,101,102,97,117,108,116,45,114,
|
||||
101,97,100,101,114,45,103,117,97,114,100,1,24,45,109,111,100,117,108,101,45,
|
||||
104,97,115,104,45,116,97,98,108,101,45,116,97,98,108,101,71,45,112,97,116,
|
||||
104,45,99,97,99,104,101,77,45,108,111,97,100,105,110,103,45,102,105,108,101,
|
||||
110,97,109,101,79,45,108,111,97,100,105,110,103,45,112,114,111,109,112,116,45,
|
||||
116,97,103,71,45,112,114,101,118,45,114,101,108,116,111,75,45,112,114,101,118,
|
||||
45,114,101,108,116,111,45,100,105,114,1,21,115,112,108,105,116,45,114,101,108,
|
||||
97,116,105,118,101,45,115,116,114,105,110,103,1,34,109,97,107,101,45,115,116,
|
||||
97,110,100,97,114,100,45,109,111,100,117,108,101,45,110,97,109,101,45,114,101,
|
||||
115,111,108,118,101,114,64,98,111,111,116,64,115,97,109,101,5,3,46,122,111,
|
||||
64,108,111,111,112,1,29,115,116,97,110,100,97,114,100,45,109,111,100,117,108,
|
||||
101,45,110,97,109,101,45,114,101,115,111,108,118,101,114,63,108,105,98,67,105,
|
||||
103,110,111,114,101,100,249,22,14,195,80,158,37,45,249,80,159,37,48,36,195,
|
||||
10,27,28,23,195,2,28,249,22,162,8,23,197,2,80,158,38,46,87,94,23,
|
||||
195,1,80,158,36,47,27,248,22,171,4,23,197,2,28,248,22,135,13,23,194,
|
||||
2,91,159,38,11,90,161,38,35,11,248,22,156,13,23,197,1,87,95,83,160,
|
||||
37,11,80,158,40,46,198,83,160,37,11,80,158,40,47,192,192,11,11,28,23,
|
||||
193,2,192,87,94,23,193,1,27,247,22,189,4,28,192,192,247,22,175,13,20,
|
||||
14,159,80,158,35,39,250,80,158,38,40,249,22,27,11,80,158,40,39,22,189,
|
||||
4,28,248,22,135,13,23,198,2,23,197,1,87,94,23,197,1,247,22,175,13,
|
||||
247,194,250,22,153,13,23,197,1,23,199,1,249,80,158,42,38,23,198,1,2,
|
||||
18,252,22,153,13,23,199,1,23,201,1,6,6,6,110,97,116,105,118,101,247,
|
||||
22,177,7,249,80,158,44,38,23,200,1,80,158,44,35,87,94,23,194,1,27,
|
||||
0,223,0,3,1,8,1,13,1,18,1,27,1,32,1,63,1,67,1,75,1,
|
||||
83,1,91,1,194,1,239,1,3,2,31,2,62,2,117,2,127,2,174,2,184,
|
||||
2,191,2,78,4,91,4,110,4,229,4,241,4,137,5,151,5,15,6,21,6,
|
||||
35,6,62,6,147,6,149,6,214,6,149,12,208,12,240,12,0,0,164,15,0,
|
||||
0,29,11,11,70,100,108,108,45,115,117,102,102,105,120,1,25,100,101,102,97,
|
||||
117,108,116,45,108,111,97,100,47,117,115,101,45,99,111,109,112,105,108,101,100,
|
||||
65,113,117,111,116,101,29,94,2,4,67,35,37,117,116,105,108,115,11,29,94,
|
||||
2,4,68,35,37,112,97,114,97,109,122,11,1,20,100,101,102,97,117,108,116,
|
||||
45,114,101,97,100,101,114,45,103,117,97,114,100,1,24,45,109,111,100,117,108,
|
||||
101,45,104,97,115,104,45,116,97,98,108,101,45,116,97,98,108,101,71,45,112,
|
||||
97,116,104,45,99,97,99,104,101,77,45,108,111,97,100,105,110,103,45,102,105,
|
||||
108,101,110,97,109,101,79,45,108,111,97,100,105,110,103,45,112,114,111,109,112,
|
||||
116,45,116,97,103,71,45,112,114,101,118,45,114,101,108,116,111,75,45,112,114,
|
||||
101,118,45,114,101,108,116,111,45,100,105,114,1,21,115,112,108,105,116,45,114,
|
||||
101,108,97,116,105,118,101,45,115,116,114,105,110,103,1,34,109,97,107,101,45,
|
||||
115,116,97,110,100,97,114,100,45,109,111,100,117,108,101,45,110,97,109,101,45,
|
||||
114,101,115,111,108,118,101,114,64,98,111,111,116,64,115,97,109,101,5,3,46,
|
||||
122,111,6,6,6,110,97,116,105,118,101,64,108,111,111,112,1,29,115,116,97,
|
||||
110,100,97,114,100,45,109,111,100,117,108,101,45,110,97,109,101,45,114,101,115,
|
||||
111,108,118,101,114,63,108,105,98,67,105,103,110,111,114,101,100,249,22,14,195,
|
||||
80,158,37,45,249,80,159,37,48,36,195,10,27,28,23,195,2,28,249,22,162,
|
||||
8,23,197,2,80,158,38,46,87,94,23,195,1,80,158,36,47,27,248,22,171,
|
||||
4,23,197,2,28,248,22,135,13,23,194,2,91,159,38,11,90,161,38,35,11,
|
||||
248,22,156,13,23,197,1,87,95,83,160,37,11,80,158,40,46,198,83,160,37,
|
||||
11,80,158,40,47,192,192,11,11,28,23,193,2,192,87,94,23,193,1,27,247,
|
||||
22,189,4,28,192,192,247,22,175,13,20,14,159,80,158,35,39,250,80,158,38,
|
||||
40,249,22,27,11,80,158,40,39,22,189,4,28,248,22,135,13,23,198,2,23,
|
||||
197,1,87,94,23,197,1,247,22,175,13,247,194,250,22,153,13,23,197,1,23,
|
||||
199,1,249,80,158,42,38,23,198,1,2,18,252,22,153,13,23,199,1,23,201,
|
||||
1,2,19,247,22,177,7,249,80,158,44,38,23,200,1,80,158,44,35,87,94,
|
||||
23,194,1,27,250,22,170,13,196,11,32,0,89,162,8,44,35,40,9,222,11,
|
||||
28,192,249,22,64,195,194,11,27,248,23,195,1,23,196,1,27,250,22,170,13,
|
||||
28,192,249,22,64,195,194,11,27,252,22,153,13,23,200,1,23,202,1,2,19,
|
||||
247,22,177,7,249,80,158,45,38,23,201,1,80,158,45,35,27,250,22,170,13,
|
||||
196,11,32,0,89,162,8,44,35,40,9,222,11,28,192,249,22,64,195,194,11,
|
||||
249,247,22,180,13,248,22,65,195,195,27,250,22,153,13,23,198,1,23,200,1,
|
||||
249,80,158,43,38,23,199,1,2,18,27,250,22,170,13,196,11,32,0,89,162,
|
||||
|
@ -407,156 +408,155 @@
|
|||
249,22,160,13,23,203,1,23,195,1,200,90,161,38,36,11,248,22,156,13,23,
|
||||
194,2,87,94,23,196,1,90,161,36,39,11,28,249,22,162,8,23,196,2,68,
|
||||
114,101,108,97,116,105,118,101,87,94,23,194,1,2,17,23,194,1,90,161,36,
|
||||
40,11,247,22,177,13,27,89,162,43,36,49,62,122,111,225,7,5,3,33,27,
|
||||
27,89,162,43,36,51,9,225,8,6,4,33,28,27,249,22,5,89,162,8,44,
|
||||
36,47,9,223,5,33,29,23,203,2,27,28,23,195,2,27,249,22,5,83,158,
|
||||
39,20,97,94,89,162,8,44,36,47,9,223,5,33,30,23,198,1,23,205,2,
|
||||
27,28,23,196,2,11,193,28,192,192,28,193,28,23,196,2,28,249,22,166,3,
|
||||
248,22,66,196,248,22,66,23,199,2,193,11,11,11,87,94,23,195,1,11,28,
|
||||
23,193,2,249,80,159,47,54,36,202,89,162,43,35,45,9,224,14,2,33,31,
|
||||
87,94,23,193,1,27,28,23,197,1,27,249,22,5,83,158,39,20,97,94,89,
|
||||
162,8,44,36,50,9,225,14,12,10,33,32,23,203,1,23,206,1,27,28,196,
|
||||
11,193,28,192,192,28,193,28,196,28,249,22,166,3,248,22,66,196,248,22,66,
|
||||
199,193,11,11,11,11,28,192,249,80,159,48,54,36,203,89,162,43,35,45,9,
|
||||
224,15,2,33,33,249,80,159,48,54,36,203,89,162,43,35,44,9,224,15,7,
|
||||
33,34,32,36,89,162,8,44,36,54,2,19,222,33,38,0,17,35,114,120,34,
|
||||
94,40,46,42,63,41,47,40,46,42,41,36,34,27,249,22,185,13,2,37,23,
|
||||
196,2,28,23,193,2,87,94,23,194,1,249,22,64,248,22,89,23,196,2,27,
|
||||
248,22,98,23,197,1,27,249,22,185,13,2,37,23,196,2,28,23,193,2,87,
|
||||
94,23,194,1,249,22,64,248,22,89,23,196,2,27,248,22,98,23,197,1,27,
|
||||
249,22,185,13,2,37,23,196,2,28,23,193,2,87,94,23,194,1,249,22,64,
|
||||
248,22,89,23,196,2,248,2,36,248,22,98,23,197,1,248,22,74,194,248,22,
|
||||
74,194,248,22,74,194,32,39,89,162,43,36,54,2,19,222,33,40,28,248,22,
|
||||
72,248,22,66,23,195,2,249,22,7,9,248,22,65,195,91,159,37,11,90,161,
|
||||
37,35,11,27,248,22,66,23,197,2,28,248,22,72,248,22,66,23,195,2,249,
|
||||
22,7,9,248,22,65,195,91,159,37,11,90,161,37,35,11,27,248,22,66,23,
|
||||
197,2,28,248,22,72,248,22,66,23,195,2,249,22,7,9,248,22,65,195,91,
|
||||
159,37,11,90,161,37,35,11,248,2,39,248,22,66,23,197,2,249,22,7,249,
|
||||
22,64,248,22,65,23,200,1,23,197,1,195,249,22,7,249,22,64,248,22,65,
|
||||
23,200,1,23,197,1,195,249,22,7,249,22,64,248,22,65,23,200,1,23,197,
|
||||
1,195,27,248,2,36,23,195,1,28,194,192,248,2,39,193,87,95,28,248,22,
|
||||
169,4,195,12,250,22,128,9,2,20,6,20,20,114,101,115,111,108,118,101,100,
|
||||
45,109,111,100,117,108,101,45,112,97,116,104,197,28,24,193,2,248,24,194,1,
|
||||
195,87,94,23,193,1,12,27,27,250,22,138,2,80,158,41,42,248,22,141,14,
|
||||
247,22,182,11,11,28,23,193,2,192,87,94,23,193,1,27,247,22,122,87,94,
|
||||
250,22,136,2,80,158,42,42,248,22,141,14,247,22,182,11,195,192,250,22,136,
|
||||
2,195,198,66,97,116,116,97,99,104,251,211,197,198,199,10,28,192,250,22,191,
|
||||
8,11,196,195,248,22,189,8,194,28,249,22,163,6,194,6,1,1,46,2,17,
|
||||
28,249,22,163,6,194,6,2,2,46,46,62,117,112,192,28,249,22,164,8,248,
|
||||
22,66,23,200,2,23,197,1,28,249,22,162,8,248,22,65,23,200,2,23,196,
|
||||
1,251,22,189,8,2,20,6,26,26,99,121,99,108,101,32,105,110,32,108,111,
|
||||
97,100,105,110,103,32,97,116,32,126,101,58,32,126,101,23,200,1,249,22,2,
|
||||
22,66,248,22,79,249,22,64,23,206,1,23,202,1,12,12,247,192,20,14,159,
|
||||
80,158,39,44,249,22,64,248,22,141,14,247,22,182,11,23,197,1,20,14,159,
|
||||
80,158,39,39,250,80,158,42,40,249,22,27,11,80,158,44,39,22,151,4,23,
|
||||
196,1,249,247,22,188,4,23,198,1,248,22,53,248,22,139,13,23,198,1,87,
|
||||
94,28,28,248,22,135,13,23,197,2,10,248,22,175,4,23,197,2,12,28,23,
|
||||
198,2,250,22,191,8,11,6,15,15,98,97,100,32,109,111,100,117,108,101,32,
|
||||
112,97,116,104,23,201,2,250,22,128,9,2,20,6,19,19,109,111,100,117,108,
|
||||
101,45,112,97,116,104,32,111,114,32,112,97,116,104,23,199,2,28,28,248,22,
|
||||
62,23,197,2,249,22,162,8,248,22,65,23,199,2,2,4,11,248,22,170,4,
|
||||
248,22,89,197,28,28,248,22,62,23,197,2,249,22,162,8,248,22,65,23,199,
|
||||
2,66,112,108,97,110,101,116,11,87,94,28,207,12,20,14,159,80,158,37,39,
|
||||
250,80,158,40,40,249,22,27,11,80,158,42,39,22,182,11,23,197,1,90,161,
|
||||
36,35,10,249,22,152,4,21,94,2,21,6,18,18,112,108,97,110,101,116,47,
|
||||
114,101,115,111,108,118,101,114,46,115,115,1,27,112,108,97,110,101,116,45,109,
|
||||
111,100,117,108,101,45,110,97,109,101,45,114,101,115,111,108,118,101,114,12,251,
|
||||
211,199,200,201,202,87,94,23,193,1,27,89,162,8,44,36,45,79,115,104,111,
|
||||
119,45,99,111,108,108,101,99,116,105,111,110,45,101,114,114,223,6,33,44,27,
|
||||
28,248,22,52,23,199,2,27,250,22,138,2,80,158,43,43,249,22,64,23,204,
|
||||
2,247,22,176,13,11,28,23,193,2,192,87,94,23,193,1,91,159,37,11,90,
|
||||
161,37,35,11,249,80,159,44,48,36,248,22,55,23,204,2,11,27,251,80,158,
|
||||
47,50,2,20,23,202,1,28,248,22,72,23,199,2,23,199,2,248,22,65,23,
|
||||
199,2,28,248,22,72,23,199,2,9,248,22,66,23,199,2,249,22,153,13,23,
|
||||
195,1,28,248,22,72,23,197,1,87,94,23,197,1,6,7,7,109,97,105,110,
|
||||
46,115,115,249,22,180,6,23,199,1,6,3,3,46,115,115,28,248,22,157,6,
|
||||
23,199,2,87,94,23,194,1,27,248,80,159,41,55,36,23,201,2,27,250,22,
|
||||
138,2,80,158,44,43,249,22,64,23,205,2,23,199,2,11,28,23,193,2,192,
|
||||
87,94,23,193,1,91,159,37,11,90,161,37,35,11,249,80,159,45,48,36,23,
|
||||
204,2,11,250,22,1,22,153,13,23,199,1,249,22,78,249,22,2,32,0,89,
|
||||
162,8,44,36,43,9,222,33,45,23,200,1,248,22,74,23,200,1,28,248,22,
|
||||
135,13,23,199,2,87,94,23,194,1,28,248,22,158,13,23,199,2,23,198,2,
|
||||
248,22,74,6,26,26,32,40,97,32,112,97,116,104,32,109,117,115,116,32,98,
|
||||
101,32,97,98,115,111,108,117,116,101,41,28,249,22,162,8,248,22,65,23,201,
|
||||
2,2,21,27,250,22,138,2,80,158,43,43,249,22,64,23,204,2,247,22,176,
|
||||
13,11,28,23,193,2,192,87,94,23,193,1,91,159,38,11,90,161,37,35,11,
|
||||
249,80,159,45,48,36,248,22,89,23,205,2,11,90,161,36,37,11,28,248,22,
|
||||
72,248,22,91,23,204,2,28,248,22,72,23,194,2,249,22,187,13,0,8,35,
|
||||
114,120,34,91,46,93,34,23,196,2,11,10,27,27,28,23,197,2,249,22,78,
|
||||
28,248,22,72,248,22,91,23,208,2,21,93,6,5,5,109,122,108,105,98,249,
|
||||
22,1,22,78,249,22,2,80,159,51,56,36,248,22,91,23,211,2,23,197,2,
|
||||
28,248,22,72,23,196,2,248,22,74,23,197,2,23,195,2,251,80,158,49,50,
|
||||
2,20,23,204,1,248,22,65,23,198,2,248,22,66,23,198,1,249,22,153,13,
|
||||
23,195,1,28,23,198,1,87,94,23,196,1,23,197,1,28,248,22,72,23,197,
|
||||
1,87,94,23,197,1,6,7,7,109,97,105,110,46,115,115,28,249,22,187,13,
|
||||
0,8,35,114,120,34,91,46,93,34,23,199,2,23,197,1,249,22,180,6,23,
|
||||
199,1,6,3,3,46,115,115,28,249,22,162,8,248,22,65,23,201,2,64,102,
|
||||
105,108,101,249,22,160,13,248,22,164,13,248,22,89,23,202,2,248,80,159,42,
|
||||
55,36,23,202,2,12,87,94,28,28,248,22,135,13,23,194,2,10,248,22,179,
|
||||
7,23,194,2,87,94,23,200,1,12,28,23,200,2,250,22,191,8,67,114,101,
|
||||
113,117,105,114,101,249,22,141,7,6,17,17,98,97,100,32,109,111,100,117,108,
|
||||
101,32,112,97,116,104,126,97,28,23,198,2,248,22,65,23,199,2,6,0,0,
|
||||
23,203,1,87,94,23,200,1,250,22,128,9,2,20,249,22,141,7,6,13,13,
|
||||
109,111,100,117,108,101,32,112,97,116,104,126,97,28,23,198,2,248,22,65,23,
|
||||
199,2,6,0,0,23,201,2,27,28,248,22,179,7,23,195,2,249,22,184,7,
|
||||
23,196,2,35,249,22,162,13,248,22,163,13,23,197,2,11,27,28,248,22,179,
|
||||
7,23,196,2,249,22,184,7,23,197,2,36,248,80,158,42,51,23,195,2,91,
|
||||
159,38,11,90,161,38,35,11,28,248,22,179,7,23,199,2,250,22,7,2,22,
|
||||
249,22,184,7,23,203,2,37,2,22,248,22,156,13,23,198,2,87,95,23,195,
|
||||
1,23,193,1,27,28,248,22,179,7,23,200,2,249,22,184,7,23,201,2,38,
|
||||
249,80,158,47,52,23,197,2,5,0,27,28,248,22,179,7,23,201,2,249,22,
|
||||
184,7,23,202,2,39,248,22,170,4,23,200,2,27,27,250,22,138,2,80,158,
|
||||
51,42,248,22,141,14,247,22,182,11,11,28,23,193,2,192,87,94,23,193,1,
|
||||
27,247,22,122,87,94,250,22,136,2,80,158,52,42,248,22,141,14,247,22,182,
|
||||
11,195,192,87,95,28,23,209,1,27,250,22,138,2,23,197,2,197,11,28,23,
|
||||
193,1,12,87,95,27,27,28,248,22,17,80,158,51,45,80,158,50,45,247,22,
|
||||
19,250,22,25,248,22,23,23,197,2,80,158,53,44,23,196,1,27,248,22,141,
|
||||
14,247,22,182,11,249,22,3,83,158,39,20,97,94,89,162,8,44,36,54,9,
|
||||
226,12,11,2,3,33,46,23,195,1,23,196,1,248,28,248,22,17,80,158,50,
|
||||
45,32,0,89,162,43,36,41,9,222,33,47,80,159,49,57,36,89,162,43,35,
|
||||
50,9,227,14,9,8,4,3,33,48,250,22,136,2,23,197,1,197,10,12,28,
|
||||
28,248,22,179,7,23,202,1,11,27,248,22,157,6,23,208,2,28,192,192,28,
|
||||
248,22,62,23,208,2,249,22,162,8,248,22,65,23,210,2,2,21,11,250,22,
|
||||
136,2,80,158,50,43,28,248,22,157,6,23,210,2,249,22,64,23,211,1,248,
|
||||
80,159,53,55,36,23,213,1,87,94,23,210,1,249,22,64,23,211,1,247,22,
|
||||
176,13,252,22,181,7,23,208,1,23,207,1,23,205,1,23,203,1,201,12,193,
|
||||
91,159,37,10,90,161,36,35,10,11,90,161,36,36,10,83,158,38,20,96,96,
|
||||
2,20,89,162,8,44,36,50,9,224,2,0,33,42,89,162,43,38,48,9,223,
|
||||
1,33,43,89,162,43,39,8,30,9,225,2,3,0,33,49,208,87,95,248,22,
|
||||
150,4,248,80,158,37,49,247,22,182,11,248,22,188,4,80,158,36,36,248,22,
|
||||
173,12,80,159,36,41,36,159,35,20,103,159,35,16,1,65,98,101,103,105,110,
|
||||
16,0,83,158,41,20,100,138,66,35,37,98,111,111,116,2,1,11,11,10,10,
|
||||
36,80,158,35,35,20,103,159,39,16,19,30,2,1,2,2,193,30,2,1,2,
|
||||
3,193,30,2,5,72,112,97,116,104,45,115,116,114,105,110,103,63,10,30,2,
|
||||
5,75,112,97,116,104,45,97,100,100,45,115,117,102,102,105,120,7,30,2,6,
|
||||
1,20,112,97,114,97,109,101,116,101,114,105,122,97,116,105,111,110,45,107,101,
|
||||
121,4,30,2,6,1,23,101,120,116,101,110,100,45,112,97,114,97,109,101,116,
|
||||
101,114,105,122,97,116,105,111,110,3,30,2,1,2,7,193,30,2,1,2,8,
|
||||
193,30,2,1,2,9,193,30,2,1,2,10,193,30,2,1,2,11,193,30,2,
|
||||
1,2,12,193,30,2,1,2,13,193,30,2,1,2,14,193,30,2,1,2,15,
|
||||
193,30,2,5,69,45,102,105,110,100,45,99,111,108,0,30,2,5,76,110,111,
|
||||
114,109,97,108,45,99,97,115,101,45,112,97,116,104,6,30,2,5,79,112,97,
|
||||
116,104,45,114,101,112,108,97,99,101,45,115,117,102,102,105,120,9,30,2,1,
|
||||
2,16,193,16,0,11,11,16,11,2,10,2,11,2,8,2,9,2,12,2,13,
|
||||
2,3,2,7,2,2,2,15,2,14,46,11,38,35,11,11,16,1,2,16,16,
|
||||
1,11,16,1,2,16,36,36,36,11,11,16,0,16,0,16,0,35,35,11,11,
|
||||
11,16,0,16,0,16,0,35,35,16,0,16,16,83,158,35,16,2,89,162,43,
|
||||
36,44,9,223,0,33,23,80,159,35,57,36,83,158,35,16,2,89,162,43,36,
|
||||
44,9,223,0,33,24,80,159,35,56,36,83,158,35,16,2,89,162,43,36,48,
|
||||
67,103,101,116,45,100,105,114,223,0,33,25,80,159,35,55,36,83,158,35,16,
|
||||
2,89,162,43,37,48,68,119,105,116,104,45,100,105,114,223,0,33,26,80,159,
|
||||
35,54,36,83,158,35,16,2,248,22,176,7,69,115,111,45,115,117,102,102,105,
|
||||
120,80,159,35,35,36,83,158,35,16,2,89,162,43,37,59,2,3,223,0,33,
|
||||
35,80,159,35,36,36,83,158,35,16,2,32,0,89,162,8,44,36,41,2,7,
|
||||
222,192,80,159,35,41,36,83,158,35,16,2,247,22,125,80,159,35,42,36,83,
|
||||
158,35,16,2,247,22,124,80,159,35,43,36,83,158,35,16,2,247,22,60,80,
|
||||
159,35,44,36,83,158,35,16,2,248,22,18,74,109,111,100,117,108,101,45,108,
|
||||
111,97,100,105,110,103,80,159,35,45,36,83,158,35,16,2,11,80,158,35,46,
|
||||
83,158,35,16,2,11,80,158,35,47,83,158,35,16,2,32,0,89,162,43,37,
|
||||
44,2,14,222,33,41,80,159,35,48,36,83,158,35,16,2,89,162,8,44,36,
|
||||
44,2,15,223,0,33,50,80,159,35,49,36,83,158,35,16,2,89,162,43,35,
|
||||
43,2,16,223,0,33,51,80,159,35,53,36,95,29,94,2,4,68,35,37,107,
|
||||
101,114,110,101,108,11,29,94,2,4,69,35,37,109,105,110,45,115,116,120,11,
|
||||
2,5,9,9,9,35,0};
|
||||
EVAL_ONE_SIZED_STR((char *)expr, 4122);
|
||||
40,11,247,22,177,13,27,89,162,43,36,49,62,122,111,225,7,5,3,33,28,
|
||||
27,89,162,43,36,51,9,225,8,6,4,33,29,27,249,22,5,89,162,8,44,
|
||||
36,46,9,223,5,33,30,23,203,2,27,28,23,195,1,27,249,22,5,89,162,
|
||||
8,44,36,52,9,225,13,11,9,33,31,23,205,2,27,28,23,196,2,11,193,
|
||||
28,192,192,28,193,28,23,196,2,28,249,22,166,3,248,22,66,196,248,22,66,
|
||||
23,199,2,193,11,11,11,11,28,23,193,2,249,80,159,47,54,36,202,89,162,
|
||||
43,35,45,9,224,14,2,33,32,87,94,23,193,1,27,28,23,197,1,27,249,
|
||||
22,5,83,158,39,20,97,94,89,162,8,44,36,50,9,225,14,12,10,33,33,
|
||||
23,203,1,23,206,1,27,28,196,11,193,28,192,192,28,193,28,196,28,249,22,
|
||||
166,3,248,22,66,196,248,22,66,199,193,11,11,11,11,28,192,249,80,159,48,
|
||||
54,36,203,89,162,43,35,45,9,224,15,2,33,34,249,80,159,48,54,36,203,
|
||||
89,162,43,35,44,9,224,15,7,33,35,32,37,89,162,8,44,36,54,2,20,
|
||||
222,33,39,0,17,35,114,120,34,94,40,46,42,63,41,47,40,46,42,41,36,
|
||||
34,27,249,22,185,13,2,38,23,196,2,28,23,193,2,87,94,23,194,1,249,
|
||||
22,64,248,22,89,23,196,2,27,248,22,98,23,197,1,27,249,22,185,13,2,
|
||||
38,23,196,2,28,23,193,2,87,94,23,194,1,249,22,64,248,22,89,23,196,
|
||||
2,27,248,22,98,23,197,1,27,249,22,185,13,2,38,23,196,2,28,23,193,
|
||||
2,87,94,23,194,1,249,22,64,248,22,89,23,196,2,248,2,37,248,22,98,
|
||||
23,197,1,248,22,74,194,248,22,74,194,248,22,74,194,32,40,89,162,43,36,
|
||||
54,2,20,222,33,41,28,248,22,72,248,22,66,23,195,2,249,22,7,9,248,
|
||||
22,65,195,91,159,37,11,90,161,37,35,11,27,248,22,66,23,197,2,28,248,
|
||||
22,72,248,22,66,23,195,2,249,22,7,9,248,22,65,195,91,159,37,11,90,
|
||||
161,37,35,11,27,248,22,66,23,197,2,28,248,22,72,248,22,66,23,195,2,
|
||||
249,22,7,9,248,22,65,195,91,159,37,11,90,161,37,35,11,248,2,40,248,
|
||||
22,66,23,197,2,249,22,7,249,22,64,248,22,65,23,200,1,23,197,1,195,
|
||||
249,22,7,249,22,64,248,22,65,23,200,1,23,197,1,195,249,22,7,249,22,
|
||||
64,248,22,65,23,200,1,23,197,1,195,27,248,2,37,23,195,1,28,194,192,
|
||||
248,2,40,193,87,95,28,248,22,169,4,195,12,250,22,128,9,2,21,6,20,
|
||||
20,114,101,115,111,108,118,101,100,45,109,111,100,117,108,101,45,112,97,116,104,
|
||||
197,28,24,193,2,248,24,194,1,195,87,94,23,193,1,12,27,27,250,22,138,
|
||||
2,80,158,41,42,248,22,141,14,247,22,182,11,11,28,23,193,2,192,87,94,
|
||||
23,193,1,27,247,22,122,87,94,250,22,136,2,80,158,42,42,248,22,141,14,
|
||||
247,22,182,11,195,192,250,22,136,2,195,198,66,97,116,116,97,99,104,251,211,
|
||||
197,198,199,10,28,192,250,22,191,8,11,196,195,248,22,189,8,194,28,249,22,
|
||||
163,6,194,6,1,1,46,2,17,28,249,22,163,6,194,6,2,2,46,46,62,
|
||||
117,112,192,28,249,22,164,8,248,22,66,23,200,2,23,197,1,28,249,22,162,
|
||||
8,248,22,65,23,200,2,23,196,1,251,22,189,8,2,21,6,26,26,99,121,
|
||||
99,108,101,32,105,110,32,108,111,97,100,105,110,103,32,97,116,32,126,101,58,
|
||||
32,126,101,23,200,1,249,22,2,22,66,248,22,79,249,22,64,23,206,1,23,
|
||||
202,1,12,12,247,192,20,14,159,80,158,39,44,249,22,64,248,22,141,14,247,
|
||||
22,182,11,23,197,1,20,14,159,80,158,39,39,250,80,158,42,40,249,22,27,
|
||||
11,80,158,44,39,22,151,4,23,196,1,249,247,22,188,4,23,198,1,248,22,
|
||||
53,248,22,139,13,23,198,1,87,94,28,28,248,22,135,13,23,197,2,10,248,
|
||||
22,175,4,23,197,2,12,28,23,198,2,250,22,191,8,11,6,15,15,98,97,
|
||||
100,32,109,111,100,117,108,101,32,112,97,116,104,23,201,2,250,22,128,9,2,
|
||||
21,6,19,19,109,111,100,117,108,101,45,112,97,116,104,32,111,114,32,112,97,
|
||||
116,104,23,199,2,28,28,248,22,62,23,197,2,249,22,162,8,248,22,65,23,
|
||||
199,2,2,4,11,248,22,170,4,248,22,89,197,28,28,248,22,62,23,197,2,
|
||||
249,22,162,8,248,22,65,23,199,2,66,112,108,97,110,101,116,11,87,94,28,
|
||||
207,12,20,14,159,80,158,37,39,250,80,158,40,40,249,22,27,11,80,158,42,
|
||||
39,22,182,11,23,197,1,90,161,36,35,10,249,22,152,4,21,94,2,22,6,
|
||||
18,18,112,108,97,110,101,116,47,114,101,115,111,108,118,101,114,46,115,115,1,
|
||||
27,112,108,97,110,101,116,45,109,111,100,117,108,101,45,110,97,109,101,45,114,
|
||||
101,115,111,108,118,101,114,12,251,211,199,200,201,202,87,94,23,193,1,27,89,
|
||||
162,8,44,36,45,79,115,104,111,119,45,99,111,108,108,101,99,116,105,111,110,
|
||||
45,101,114,114,223,6,33,45,27,28,248,22,52,23,199,2,27,250,22,138,2,
|
||||
80,158,43,43,249,22,64,23,204,2,247,22,176,13,11,28,23,193,2,192,87,
|
||||
94,23,193,1,91,159,37,11,90,161,37,35,11,249,80,159,44,48,36,248,22,
|
||||
55,23,204,2,11,27,251,80,158,47,50,2,21,23,202,1,28,248,22,72,23,
|
||||
199,2,23,199,2,248,22,65,23,199,2,28,248,22,72,23,199,2,9,248,22,
|
||||
66,23,199,2,249,22,153,13,23,195,1,28,248,22,72,23,197,1,87,94,23,
|
||||
197,1,6,7,7,109,97,105,110,46,115,115,249,22,180,6,23,199,1,6,3,
|
||||
3,46,115,115,28,248,22,157,6,23,199,2,87,94,23,194,1,27,248,80,159,
|
||||
41,55,36,23,201,2,27,250,22,138,2,80,158,44,43,249,22,64,23,205,2,
|
||||
23,199,2,11,28,23,193,2,192,87,94,23,193,1,91,159,37,11,90,161,37,
|
||||
35,11,249,80,159,45,48,36,23,204,2,11,250,22,1,22,153,13,23,199,1,
|
||||
249,22,78,249,22,2,32,0,89,162,8,44,36,43,9,222,33,46,23,200,1,
|
||||
248,22,74,23,200,1,28,248,22,135,13,23,199,2,87,94,23,194,1,28,248,
|
||||
22,158,13,23,199,2,23,198,2,248,22,74,6,26,26,32,40,97,32,112,97,
|
||||
116,104,32,109,117,115,116,32,98,101,32,97,98,115,111,108,117,116,101,41,28,
|
||||
249,22,162,8,248,22,65,23,201,2,2,22,27,250,22,138,2,80,158,43,43,
|
||||
249,22,64,23,204,2,247,22,176,13,11,28,23,193,2,192,87,94,23,193,1,
|
||||
91,159,38,11,90,161,37,35,11,249,80,159,45,48,36,248,22,89,23,205,2,
|
||||
11,90,161,36,37,11,28,248,22,72,248,22,91,23,204,2,28,248,22,72,23,
|
||||
194,2,249,22,187,13,0,8,35,114,120,34,91,46,93,34,23,196,2,11,10,
|
||||
27,27,28,23,197,2,249,22,78,28,248,22,72,248,22,91,23,208,2,21,93,
|
||||
6,5,5,109,122,108,105,98,249,22,1,22,78,249,22,2,80,159,51,56,36,
|
||||
248,22,91,23,211,2,23,197,2,28,248,22,72,23,196,2,248,22,74,23,197,
|
||||
2,23,195,2,251,80,158,49,50,2,21,23,204,1,248,22,65,23,198,2,248,
|
||||
22,66,23,198,1,249,22,153,13,23,195,1,28,23,198,1,87,94,23,196,1,
|
||||
23,197,1,28,248,22,72,23,197,1,87,94,23,197,1,6,7,7,109,97,105,
|
||||
110,46,115,115,28,249,22,187,13,0,8,35,114,120,34,91,46,93,34,23,199,
|
||||
2,23,197,1,249,22,180,6,23,199,1,6,3,3,46,115,115,28,249,22,162,
|
||||
8,248,22,65,23,201,2,64,102,105,108,101,249,22,160,13,248,22,164,13,248,
|
||||
22,89,23,202,2,248,80,159,42,55,36,23,202,2,12,87,94,28,28,248,22,
|
||||
135,13,23,194,2,10,248,22,179,7,23,194,2,87,94,23,200,1,12,28,23,
|
||||
200,2,250,22,191,8,67,114,101,113,117,105,114,101,249,22,141,7,6,17,17,
|
||||
98,97,100,32,109,111,100,117,108,101,32,112,97,116,104,126,97,28,23,198,2,
|
||||
248,22,65,23,199,2,6,0,0,23,203,1,87,94,23,200,1,250,22,128,9,
|
||||
2,21,249,22,141,7,6,13,13,109,111,100,117,108,101,32,112,97,116,104,126,
|
||||
97,28,23,198,2,248,22,65,23,199,2,6,0,0,23,201,2,27,28,248,22,
|
||||
179,7,23,195,2,249,22,184,7,23,196,2,35,249,22,162,13,248,22,163,13,
|
||||
23,197,2,11,27,28,248,22,179,7,23,196,2,249,22,184,7,23,197,2,36,
|
||||
248,80,158,42,51,23,195,2,91,159,38,11,90,161,38,35,11,28,248,22,179,
|
||||
7,23,199,2,250,22,7,2,23,249,22,184,7,23,203,2,37,2,23,248,22,
|
||||
156,13,23,198,2,87,95,23,195,1,23,193,1,27,28,248,22,179,7,23,200,
|
||||
2,249,22,184,7,23,201,2,38,249,80,158,47,52,23,197,2,5,0,27,28,
|
||||
248,22,179,7,23,201,2,249,22,184,7,23,202,2,39,248,22,170,4,23,200,
|
||||
2,27,27,250,22,138,2,80,158,51,42,248,22,141,14,247,22,182,11,11,28,
|
||||
23,193,2,192,87,94,23,193,1,27,247,22,122,87,94,250,22,136,2,80,158,
|
||||
52,42,248,22,141,14,247,22,182,11,195,192,87,95,28,23,209,1,27,250,22,
|
||||
138,2,23,197,2,197,11,28,23,193,1,12,87,95,27,27,28,248,22,17,80,
|
||||
158,51,45,80,158,50,45,247,22,19,250,22,25,248,22,23,23,197,2,80,158,
|
||||
53,44,23,196,1,27,248,22,141,14,247,22,182,11,249,22,3,83,158,39,20,
|
||||
97,94,89,162,8,44,36,54,9,226,12,11,2,3,33,47,23,195,1,23,196,
|
||||
1,248,28,248,22,17,80,158,50,45,32,0,89,162,43,36,41,9,222,33,48,
|
||||
80,159,49,57,36,89,162,43,35,50,9,227,14,9,8,4,3,33,49,250,22,
|
||||
136,2,23,197,1,197,10,12,28,28,248,22,179,7,23,202,1,11,27,248,22,
|
||||
157,6,23,208,2,28,192,192,28,248,22,62,23,208,2,249,22,162,8,248,22,
|
||||
65,23,210,2,2,22,11,250,22,136,2,80,158,50,43,28,248,22,157,6,23,
|
||||
210,2,249,22,64,23,211,1,248,80,159,53,55,36,23,213,1,87,94,23,210,
|
||||
1,249,22,64,23,211,1,247,22,176,13,252,22,181,7,23,208,1,23,207,1,
|
||||
23,205,1,23,203,1,201,12,193,91,159,37,10,90,161,36,35,10,11,90,161,
|
||||
36,36,10,83,158,38,20,96,96,2,21,89,162,8,44,36,50,9,224,2,0,
|
||||
33,43,89,162,43,38,48,9,223,1,33,44,89,162,43,39,8,30,9,225,2,
|
||||
3,0,33,50,208,87,95,248,22,150,4,248,80,158,37,49,247,22,182,11,248,
|
||||
22,188,4,80,158,36,36,248,22,173,12,80,159,36,41,36,159,35,20,103,159,
|
||||
35,16,1,65,98,101,103,105,110,16,0,83,158,41,20,100,138,66,35,37,98,
|
||||
111,111,116,2,1,11,11,10,10,36,80,158,35,35,20,103,159,39,16,19,30,
|
||||
2,1,2,2,193,30,2,1,2,3,193,30,2,5,72,112,97,116,104,45,115,
|
||||
116,114,105,110,103,63,10,30,2,5,75,112,97,116,104,45,97,100,100,45,115,
|
||||
117,102,102,105,120,7,30,2,6,1,20,112,97,114,97,109,101,116,101,114,105,
|
||||
122,97,116,105,111,110,45,107,101,121,4,30,2,6,1,23,101,120,116,101,110,
|
||||
100,45,112,97,114,97,109,101,116,101,114,105,122,97,116,105,111,110,3,30,2,
|
||||
1,2,7,193,30,2,1,2,8,193,30,2,1,2,9,193,30,2,1,2,10,
|
||||
193,30,2,1,2,11,193,30,2,1,2,12,193,30,2,1,2,13,193,30,2,
|
||||
1,2,14,193,30,2,1,2,15,193,30,2,5,69,45,102,105,110,100,45,99,
|
||||
111,108,0,30,2,5,76,110,111,114,109,97,108,45,99,97,115,101,45,112,97,
|
||||
116,104,6,30,2,5,79,112,97,116,104,45,114,101,112,108,97,99,101,45,115,
|
||||
117,102,102,105,120,9,30,2,1,2,16,193,16,0,11,11,16,11,2,10,2,
|
||||
11,2,8,2,9,2,12,2,13,2,3,2,7,2,2,2,15,2,14,46,11,
|
||||
38,35,11,11,16,1,2,16,16,1,11,16,1,2,16,36,36,36,11,11,16,
|
||||
0,16,0,16,0,35,35,11,11,11,16,0,16,0,16,0,35,35,16,0,16,
|
||||
16,83,158,35,16,2,89,162,43,36,44,9,223,0,33,24,80,159,35,57,36,
|
||||
83,158,35,16,2,89,162,43,36,44,9,223,0,33,25,80,159,35,56,36,83,
|
||||
158,35,16,2,89,162,43,36,48,67,103,101,116,45,100,105,114,223,0,33,26,
|
||||
80,159,35,55,36,83,158,35,16,2,89,162,43,37,48,68,119,105,116,104,45,
|
||||
100,105,114,223,0,33,27,80,159,35,54,36,83,158,35,16,2,248,22,176,7,
|
||||
69,115,111,45,115,117,102,102,105,120,80,159,35,35,36,83,158,35,16,2,89,
|
||||
162,43,37,59,2,3,223,0,33,36,80,159,35,36,36,83,158,35,16,2,32,
|
||||
0,89,162,8,44,36,41,2,7,222,192,80,159,35,41,36,83,158,35,16,2,
|
||||
247,22,125,80,159,35,42,36,83,158,35,16,2,247,22,124,80,159,35,43,36,
|
||||
83,158,35,16,2,247,22,60,80,159,35,44,36,83,158,35,16,2,248,22,18,
|
||||
74,109,111,100,117,108,101,45,108,111,97,100,105,110,103,80,159,35,45,36,83,
|
||||
158,35,16,2,11,80,158,35,46,83,158,35,16,2,11,80,158,35,47,83,158,
|
||||
35,16,2,32,0,89,162,43,37,44,2,14,222,33,42,80,159,35,48,36,83,
|
||||
158,35,16,2,89,162,8,44,36,44,2,15,223,0,33,51,80,159,35,49,36,
|
||||
83,158,35,16,2,89,162,43,35,43,2,16,223,0,33,52,80,159,35,53,36,
|
||||
95,29,94,2,4,68,35,37,107,101,114,110,101,108,11,29,94,2,4,69,35,
|
||||
37,109,105,110,45,115,116,120,11,2,5,9,9,9,35,0};
|
||||
EVAL_ONE_SIZED_STR((char *)expr, 4131);
|
||||
}
|
||||
|
|
|
@ -96,6 +96,9 @@ static Scheme_Object *local_exp_time_name(int argc, Scheme_Object *argv[]);
|
|||
static Scheme_Object *local_context(int argc, Scheme_Object *argv[]);
|
||||
static Scheme_Object *local_phase_level(int argc, Scheme_Object *argv[]);
|
||||
static Scheme_Object *local_make_intdef_context(int argc, Scheme_Object *argv[]);
|
||||
static Scheme_Object *intdef_context_seal(int argc, Scheme_Object *argv[]);
|
||||
static Scheme_Object *intdef_context_p(int argc, Scheme_Object *argv[]);
|
||||
static Scheme_Object *id_intdef_remove(int argc, Scheme_Object *argv[]);
|
||||
static Scheme_Object *local_introduce(int argc, Scheme_Object *argv[]);
|
||||
static Scheme_Object *local_module_introduce(int argc, Scheme_Object *argv[]);
|
||||
static Scheme_Object *local_get_shadower(int argc, Scheme_Object *argv[]);
|
||||
|
@ -108,6 +111,7 @@ static Scheme_Object *local_lift_expr(int argc, Scheme_Object *argv[]);
|
|||
static Scheme_Object *local_lift_context(int argc, Scheme_Object *argv[]);
|
||||
static Scheme_Object *local_lift_end_statement(int argc, Scheme_Object *argv[]);
|
||||
static Scheme_Object *make_introducer(int argc, Scheme_Object *argv[]);
|
||||
static Scheme_Object *local_make_delta_introduce(int argc, Scheme_Object *argv[]);
|
||||
static Scheme_Object *make_set_transformer(int argc, Scheme_Object *argv[]);
|
||||
static Scheme_Object *set_transformer_p(int argc, Scheme_Object *argv[]);
|
||||
static Scheme_Object *set_transformer_proc(int argc, Scheme_Object *argv[]);
|
||||
|
@ -150,6 +154,7 @@ typedef struct Compile_Data {
|
|||
Scheme_Object **const_names;
|
||||
Scheme_Object **const_vals;
|
||||
Scheme_Object **const_uids;
|
||||
int *sealed; /* NULL => already sealed */
|
||||
int *use;
|
||||
Scheme_Object *lifts;
|
||||
} Compile_Data;
|
||||
|
@ -510,10 +515,15 @@ static void make_kernel_env(void)
|
|||
GLOBAL_PRIM_W_ARITY("syntax-local-context", local_context, 0, 0, env);
|
||||
GLOBAL_PRIM_W_ARITY("syntax-local-phase-level", local_phase_level, 0, 0, env);
|
||||
GLOBAL_PRIM_W_ARITY("syntax-local-make-definition-context", local_make_intdef_context, 0, 0, env);
|
||||
GLOBAL_PRIM_W_ARITY("internal-definition-context-seal", intdef_context_seal, 1, 1, env);
|
||||
GLOBAL_PRIM_W_ARITY("internal-definition-context?", intdef_context_p, 1, 1, env);
|
||||
GLOBAL_PRIM_W_ARITY("identifier-remove-from-definition-context", id_intdef_remove, 2, 2, env);
|
||||
GLOBAL_PRIM_W_ARITY("syntax-local-get-shadower", local_get_shadower, 1, 1, env);
|
||||
GLOBAL_PRIM_W_ARITY("syntax-local-introduce", local_introduce, 1, 1, env);
|
||||
GLOBAL_PRIM_W_ARITY("make-syntax-introducer", make_introducer, 0, 1, env);
|
||||
GLOBAL_PRIM_W_ARITY("syntax-local-make-delta-introducer", local_make_delta_introduce, 1, 1, env);
|
||||
GLOBAL_PRIM_W_ARITY("syntax-local-certifier", local_certify, 0, 1, env);
|
||||
|
||||
GLOBAL_PRIM_W_ARITY("syntax-local-module-exports", local_module_exports, 1, 1, env);
|
||||
GLOBAL_PRIM_W_ARITY("syntax-local-module-defined-identifiers", local_module_definitions, 0, 0, env);
|
||||
GLOBAL_PRIM_W_ARITY("syntax-local-module-required-identifiers", local_module_imports, 2, 2, env);
|
||||
|
@ -523,7 +533,7 @@ static void make_kernel_env(void)
|
|||
GLOBAL_PRIM_W_ARITY("set!-transformer?", set_transformer_p, 1, 1, env);
|
||||
GLOBAL_PRIM_W_ARITY("set!-transformer-procedure", set_transformer_proc, 1, 1, env);
|
||||
|
||||
GLOBAL_PRIM_W_ARITY("make-rename-transformer", make_rename_transformer, 1, 1, env);
|
||||
GLOBAL_PRIM_W_ARITY("make-rename-transformer", make_rename_transformer, 1, 2, env);
|
||||
GLOBAL_PRIM_W_ARITY("rename-transformer?", rename_transformer_p, 1, 1, env);
|
||||
GLOBAL_PRIM_W_ARITY("rename-transformer-target", rename_transformer_target, 1, 1, env);
|
||||
|
||||
|
@ -1759,7 +1769,7 @@ Scheme_Object *scheme_tl_id_sym(Scheme_Env *env, Scheme_Object *id, Scheme_Objec
|
|||
sym = SCHEME_STX_SYM(id);
|
||||
|
||||
if (_skipped)
|
||||
*_skipped = 0;
|
||||
*_skipped = -1;
|
||||
|
||||
if (SCHEME_HASHTP((Scheme_Object *)env)) {
|
||||
marked_names = (Scheme_Hash_Table *)env;
|
||||
|
@ -2122,6 +2132,12 @@ Scheme_Object *scheme_add_env_renames(Scheme_Object *stx, Scheme_Comp_Env *env,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if (SCHEME_RIBP(stx)) {
|
||||
GC_CAN_IGNORE int *s;
|
||||
s = scheme_stx_get_rib_sealed(stx);
|
||||
COMPILE_DATA(env)->sealed = s;
|
||||
}
|
||||
|
||||
while (env != upto) {
|
||||
if (!(env->flags & (SCHEME_NO_RENAME | SCHEME_CAPTURE_WITHOUT_RENAME
|
||||
| SCHEME_CAPTURE_LIFTED | SCHEME_INTDEF_SHADOW))) {
|
||||
|
@ -2525,11 +2541,22 @@ scheme_lookup_binding(Scheme_Object *find_id, Scheme_Comp_Env *env, int flags,
|
|||
}
|
||||
}
|
||||
|
||||
if (_lexical_binding_id) {
|
||||
if (!(frame->flags & SCHEME_CAPTURE_WITHOUT_RENAME))
|
||||
val = scheme_stx_remove_extra_marks(find_id, COMPILE_DATA(frame)->const_names[i],
|
||||
((frame->flags & SCHEME_CAPTURE_LIFTED)
|
||||
? NULL
|
||||
: uid));
|
||||
else
|
||||
val = find_id;
|
||||
*_lexical_binding_id = val;
|
||||
}
|
||||
|
||||
val = COMPILE_DATA(frame)->const_vals[i];
|
||||
|
||||
if (!val) {
|
||||
scheme_wrong_syntax(scheme_compile_stx_string, NULL, find_id,
|
||||
"identifier used out of context");
|
||||
scheme_wrong_syntax(scheme_compile_stx_string, NULL, find_id,
|
||||
"identifier used out of context");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -4230,6 +4257,38 @@ local_make_intdef_context(int argc, Scheme_Object *argv[])
|
|||
return c;
|
||||
}
|
||||
|
||||
static Scheme_Object *
|
||||
intdef_context_p(int argc, Scheme_Object *argv[])
|
||||
{
|
||||
return (SAME_TYPE(SCHEME_TYPE(argv[0]), scheme_intdef_context_type)
|
||||
? scheme_true
|
||||
: scheme_false);
|
||||
}
|
||||
|
||||
static Scheme_Object *intdef_context_seal(int argc, Scheme_Object *argv[])
|
||||
{
|
||||
if (!SAME_TYPE(SCHEME_TYPE(argv[0]), scheme_intdef_context_type))
|
||||
scheme_wrong_type("internal-definition-context-seal",
|
||||
"internal-definition context", 0, argc, argv);
|
||||
|
||||
scheme_stx_seal_rib(SCHEME_PTR2_VAL(argv[0]));
|
||||
return scheme_void;
|
||||
}
|
||||
|
||||
static Scheme_Object *
|
||||
id_intdef_remove(int argc, Scheme_Object *argv[])
|
||||
{
|
||||
if (!SCHEME_STXP(argv[0]) || !SCHEME_SYMBOLP(SCHEME_STX_VAL(argv[0])))
|
||||
scheme_wrong_type("identifier-from-from-definition-context",
|
||||
"syntax identifier", 0, argc, argv);
|
||||
|
||||
if (!SAME_TYPE(SCHEME_TYPE(argv[1]), scheme_intdef_context_type))
|
||||
scheme_wrong_type("identifier-remove-from-definition-context",
|
||||
"internal-definition context", 1, argc, argv);
|
||||
|
||||
return scheme_stx_id_remove_rib(argv[0], SCHEME_PTR2_VAL(argv[1]));
|
||||
}
|
||||
|
||||
static Scheme_Object *
|
||||
local_introduce(int argc, Scheme_Object *argv[])
|
||||
{
|
||||
|
@ -4302,8 +4361,9 @@ local_get_shadower(int argc, Scheme_Object *argv[])
|
|||
sym_marks = scheme_stx_extract_marks(sym);
|
||||
|
||||
/* Walk backward through the frames, looking for a renaming binding
|
||||
with the same marks as the given identifier, sym. When we find
|
||||
it, rename the given identifier so that it matches frame */
|
||||
with the same marks as the given identifier, sym. Skip over
|
||||
unsealed ribs, though. When we find a match, rename the given
|
||||
identifier so that it matches frame. */
|
||||
for (frame = env; frame->next != NULL; frame = frame->next) {
|
||||
int i;
|
||||
|
||||
|
@ -4326,19 +4386,21 @@ local_get_shadower(int argc, Scheme_Object *argv[])
|
|||
if (uid)
|
||||
break;
|
||||
|
||||
for (i = COMPILE_DATA(frame)->num_const; i--; ) {
|
||||
if (!(frame->flags & SCHEME_CAPTURE_WITHOUT_RENAME)) {
|
||||
if (SAME_OBJ(SCHEME_STX_VAL(sym),
|
||||
SCHEME_STX_VAL(COMPILE_DATA(frame)->const_names[i]))) {
|
||||
esym = COMPILE_DATA(frame)->const_names[i];
|
||||
env_marks = scheme_stx_extract_marks(esym);
|
||||
if (scheme_equal(env_marks, sym_marks)) {
|
||||
sym = esym;
|
||||
if (COMPILE_DATA(frame)->const_uids) {
|
||||
uid = COMPILE_DATA(frame)->const_uids[i];
|
||||
} else
|
||||
uid = frame->uid;
|
||||
break;
|
||||
if (!COMPILE_DATA(frame)->sealed || *COMPILE_DATA(frame)->sealed) {
|
||||
for (i = COMPILE_DATA(frame)->num_const; i--; ) {
|
||||
if (!(frame->flags & SCHEME_CAPTURE_WITHOUT_RENAME)) {
|
||||
if (SAME_OBJ(SCHEME_STX_VAL(sym),
|
||||
SCHEME_STX_VAL(COMPILE_DATA(frame)->const_names[i]))) {
|
||||
esym = COMPILE_DATA(frame)->const_names[i];
|
||||
env_marks = scheme_stx_extract_marks(esym);
|
||||
if (scheme_equal(env_marks, sym_marks)) { /* This used to have 1 || --- why? */
|
||||
sym = esym;
|
||||
if (COMPILE_DATA(frame)->const_uids)
|
||||
uid = COMPILE_DATA(frame)->const_uids[i];
|
||||
else
|
||||
uid = frame->uid;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4348,9 +4410,9 @@ local_get_shadower(int argc, Scheme_Object *argv[])
|
|||
}
|
||||
|
||||
if (!uid) {
|
||||
/* No lexical shadower, but strip module context and mark barriers, if any. */
|
||||
/* No lexical shadower, but strip module context, if any */
|
||||
sym = scheme_stx_strip_module_context(sym);
|
||||
/* Add current module context, if any. */
|
||||
/* Add current module context, if any */
|
||||
sym = local_module_introduce(1, &sym);
|
||||
return sym;
|
||||
}
|
||||
|
@ -4364,7 +4426,9 @@ local_get_shadower(int argc, Scheme_Object *argv[])
|
|||
rn = scheme_make_rename(uid, 1);
|
||||
scheme_set_rename(rn, 0, result);
|
||||
|
||||
return scheme_add_rename(result, rn);
|
||||
result = scheme_add_rename(result, rn);
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4391,6 +4455,115 @@ make_introducer(int argc, Scheme_Object *argv[])
|
|||
"syntax-introducer", 1, 1);
|
||||
}
|
||||
|
||||
static Scheme_Object *
|
||||
delta_introducer_proc(void *_i_plus_m, int argc, Scheme_Object *argv[])
|
||||
{
|
||||
Scheme_Object *p = (Scheme_Object *)_i_plus_m, *l, *v, *a[1];
|
||||
const char *who = "delta introducer attached to a rename transformer";
|
||||
|
||||
v = argv[0];
|
||||
if (!SCHEME_STXP(v) || !SCHEME_SYMBOLP(SCHEME_STX_VAL(v))) {
|
||||
scheme_wrong_type(who, "identifier", 0, argc, argv);
|
||||
}
|
||||
|
||||
/* Apply mapping functions: */
|
||||
l = SCHEME_CDR(p);
|
||||
while (SCHEME_PAIRP(l)) {
|
||||
a[0] = v;
|
||||
v = _scheme_apply(SCHEME_CAR(l), 1, a);
|
||||
l = SCHEME_CDR(l);
|
||||
}
|
||||
|
||||
/* Apply delta-introducing functions: */
|
||||
l = SCHEME_CAR(p);
|
||||
while (SCHEME_PAIRP(l)) {
|
||||
a[0] = v;
|
||||
v = _scheme_apply(SCHEME_CAR(l), 1, a);
|
||||
if (!SCHEME_STXP(v) || !SCHEME_SYMBOLP(SCHEME_STX_VAL(v))) {
|
||||
a[0] = v;
|
||||
scheme_wrong_type(who, "identifier", -1, -1, a);
|
||||
}
|
||||
l = SCHEME_CDR(l);
|
||||
}
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
static Scheme_Object *
|
||||
local_make_delta_introduce(int argc, Scheme_Object *argv[])
|
||||
{
|
||||
Scheme_Object *sym, *binder, *introducer, *a[2], *v;
|
||||
Scheme_Object *introducers = scheme_null, *mappers = scheme_null;
|
||||
int renamed = 0;
|
||||
Scheme_Comp_Env *env;
|
||||
|
||||
env = scheme_current_thread->current_local_env;
|
||||
if (!env)
|
||||
scheme_raise_exn(MZEXN_FAIL_CONTRACT,
|
||||
"syntax-local-make-delta-introducer: not currently transforming");
|
||||
|
||||
if (!SCHEME_STXP(argv[0]) || !SCHEME_SYMBOLP(SCHEME_STX_VAL(argv[0])))
|
||||
scheme_wrong_type("syntax-local-make-delta-introducer", "syntax identifier", 0, argc, argv);
|
||||
|
||||
sym = argv[0];
|
||||
|
||||
sym = scheme_stx_activate_certs(sym);
|
||||
|
||||
while (1) {
|
||||
binder = NULL;
|
||||
|
||||
v = scheme_lookup_binding(sym, env,
|
||||
(SCHEME_NULL_FOR_UNBOUND
|
||||
+ SCHEME_RESOLVE_MODIDS
|
||||
+ SCHEME_APP_POS + SCHEME_ENV_CONSTANTS_OK
|
||||
+ SCHEME_OUT_OF_CONTEXT_OK + SCHEME_ELIM_CONST),
|
||||
scheme_current_thread->current_local_certs,
|
||||
scheme_current_thread->current_local_modidx,
|
||||
NULL, NULL, &binder);
|
||||
|
||||
/* Deref globals */
|
||||
if (v && SAME_TYPE(SCHEME_TYPE(v), scheme_variable_type))
|
||||
v = (Scheme_Object *)(SCHEME_VAR_BUCKET(v))->val;
|
||||
|
||||
if (!v || NOT_SAME_TYPE(SCHEME_TYPE(v), scheme_macro_type)) {
|
||||
scheme_arg_mismatch("syntax-local-make-delta-introducer",
|
||||
(renamed
|
||||
? "not defined as syntax (after renaming): "
|
||||
: "not defined as syntax: "),
|
||||
argv[0]);
|
||||
}
|
||||
|
||||
if (!binder) {
|
||||
/* Not a lexical biding. Tell make-syntax-delta-introducer to
|
||||
use module-binding information. */
|
||||
binder = scheme_false;
|
||||
}
|
||||
|
||||
a[0] = sym;
|
||||
a[1] = binder;
|
||||
introducer = scheme_syntax_make_transfer_intro(2, a);
|
||||
introducers = scheme_make_pair(introducer, introducers);
|
||||
|
||||
v = SCHEME_PTR_VAL(v);
|
||||
if (SAME_TYPE(SCHEME_TYPE(v), scheme_id_macro_type)) {
|
||||
sym = SCHEME_PTR1_VAL(v);
|
||||
|
||||
v = SCHEME_PTR2_VAL(v);
|
||||
if (!SCHEME_FALSEP(v))
|
||||
mappers = scheme_make_pair(v, mappers);
|
||||
|
||||
renamed = 1;
|
||||
SCHEME_USE_FUEL(1);
|
||||
} else {
|
||||
/* that's the end of the chain */
|
||||
mappers = scheme_reverse(mappers);
|
||||
return scheme_make_closed_prim_w_arity(delta_introducer_proc,
|
||||
scheme_make_pair(introducers, mappers),
|
||||
"syntax-delta-introducer", 1, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static Scheme_Object *
|
||||
certifier(void *_data, int argc, Scheme_Object **argv)
|
||||
{
|
||||
|
@ -4689,9 +4862,13 @@ make_rename_transformer(int argc, Scheme_Object *argv[])
|
|||
if (!SCHEME_STXP(argv[0]) || !SCHEME_SYMBOLP(SCHEME_STX_VAL(argv[0])))
|
||||
scheme_wrong_type("make-rename-transformer", "syntax identifier", 0, argc, argv);
|
||||
|
||||
v = scheme_alloc_small_object();
|
||||
if (argc > 1)
|
||||
scheme_check_proc_arity("make-rename-transformer", 1, 1, argc, argv);
|
||||
|
||||
v = scheme_alloc_object();
|
||||
v->type = scheme_id_macro_type;
|
||||
SCHEME_PTR_VAL(v) = argv[0];
|
||||
SCHEME_PTR1_VAL(v) = argv[0];
|
||||
SCHEME_PTR2_VAL(v) = ((argc > 1) ? argv[1] : scheme_false);
|
||||
|
||||
return v;
|
||||
}
|
||||
|
|
|
@ -5052,6 +5052,9 @@ Scheme_Object *scheme_check_immediate_macro(Scheme_Object *first,
|
|||
SCHEME_NULL_FOR_UNBOUND
|
||||
+ SCHEME_APP_POS + SCHEME_ENV_CONSTANTS_OK
|
||||
+ SCHEME_DONT_MARK_USE
|
||||
+ ((!rec[drec].comp && (rec[drec].depth == -2))
|
||||
? SCHEME_OUT_OF_CONTEXT_OK
|
||||
: 0)
|
||||
+ ((rec[drec].comp && rec[drec].resolve_module_ids)
|
||||
? SCHEME_RESOLVE_MODIDS
|
||||
: 0),
|
||||
|
@ -5253,7 +5256,10 @@ scheme_compile_expand_expr(Scheme_Object *form, Scheme_Comp_Env *env,
|
|||
: 0)
|
||||
+ ((rec[drec].comp && rec[drec].resolve_module_ids)
|
||||
? SCHEME_RESOLVE_MODIDS
|
||||
: 0),
|
||||
: 0)
|
||||
+ ((!rec[drec].comp && (rec[drec].depth == -2))
|
||||
? SCHEME_OUT_OF_CONTEXT_OK
|
||||
: 0),
|
||||
rec[drec].certs, env->in_modidx,
|
||||
&menv, &protected, &lexical_binding_id);
|
||||
|
||||
|
@ -5357,7 +5363,10 @@ scheme_compile_expand_expr(Scheme_Object *form, Scheme_Comp_Env *env,
|
|||
+ SCHEME_DONT_MARK_USE
|
||||
+ ((rec[drec].comp && rec[drec].resolve_module_ids)
|
||||
? SCHEME_RESOLVE_MODIDS
|
||||
: 0),
|
||||
: 0)
|
||||
+ ((!rec[drec].comp && (rec[drec].depth == -2))
|
||||
? SCHEME_OUT_OF_CONTEXT_OK
|
||||
: 0),
|
||||
erec1.certs, env->in_modidx,
|
||||
&menv, NULL, NULL);
|
||||
|
||||
|
@ -5440,7 +5449,10 @@ scheme_compile_expand_expr(Scheme_Object *form, Scheme_Comp_Env *env,
|
|||
var = scheme_lookup_binding(find_name, env,
|
||||
SCHEME_NULL_FOR_UNBOUND
|
||||
+ SCHEME_APP_POS + SCHEME_ENV_CONSTANTS_OK
|
||||
+ SCHEME_DONT_MARK_USE,
|
||||
+ SCHEME_DONT_MARK_USE
|
||||
+ ((!rec[drec].comp && (rec[drec].depth == -2))
|
||||
? SCHEME_OUT_OF_CONTEXT_OK
|
||||
: 0),
|
||||
rec[drec].certs, env->in_modidx,
|
||||
&menv, NULL, NULL);
|
||||
|
||||
|
@ -5480,7 +5492,10 @@ scheme_compile_expand_expr(Scheme_Object *form, Scheme_Comp_Env *env,
|
|||
var = scheme_lookup_binding(stx, env,
|
||||
SCHEME_NULL_FOR_UNBOUND
|
||||
+ SCHEME_APP_POS + SCHEME_ENV_CONSTANTS_OK
|
||||
+ SCHEME_DONT_MARK_USE,
|
||||
+ SCHEME_DONT_MARK_USE
|
||||
+ ((!rec[drec].comp && (rec[drec].depth == -2))
|
||||
? SCHEME_OUT_OF_CONTEXT_OK
|
||||
: 0),
|
||||
rec[drec].certs, env->in_modidx,
|
||||
&menv, NULL, NULL);
|
||||
}
|
||||
|
@ -6453,6 +6468,7 @@ scheme_compile_expand_block(Scheme_Object *forms, Scheme_Comp_Env *env,
|
|||
|
||||
if (!more) {
|
||||
/* We've converted to a letrec or letrec-values+syntaxes */
|
||||
scheme_stx_seal_rib(rib);
|
||||
rec[drec].env_already = 1;
|
||||
|
||||
if (rec[drec].comp) {
|
||||
|
@ -6473,6 +6489,8 @@ scheme_compile_expand_block(Scheme_Object *forms, Scheme_Comp_Env *env,
|
|||
}
|
||||
}
|
||||
|
||||
scheme_stx_seal_rib(rib);
|
||||
|
||||
if (rec[drec].comp) {
|
||||
Scheme_Object *vname, *rest;
|
||||
|
||||
|
@ -9535,6 +9553,11 @@ local_eval(int argc, Scheme_Object **argv)
|
|||
|
||||
stx_env = (Scheme_Comp_Env *)SCHEME_PTR1_VAL(argv[2]);
|
||||
rib = SCHEME_PTR2_VAL(argv[2]);
|
||||
|
||||
if (*scheme_stx_get_rib_sealed(rib)) {
|
||||
scheme_raise_exn(MZEXN_FAIL_CONTRACT, "syntax-local-bind-syntaxes: given "
|
||||
"internal-definition context has been sealed");
|
||||
}
|
||||
|
||||
if (!scheme_is_sub_env(stx_env, env)) {
|
||||
scheme_raise_exn(MZEXN_FAIL_CONTRACT, "syntax-local-bind-syntaxes: transforming context does "
|
||||
|
|
|
@ -2765,6 +2765,7 @@ static int mark_comp_env_MARK(void *p) {
|
|||
gcMARK(e->data.const_names);
|
||||
gcMARK(e->data.const_vals);
|
||||
gcMARK(e->data.const_uids);
|
||||
gcMARK(e->data.sealed);
|
||||
gcMARK(e->data.use);
|
||||
gcMARK(e->data.lifts);
|
||||
|
||||
|
@ -2792,6 +2793,7 @@ static int mark_comp_env_FIXUP(void *p) {
|
|||
gcFIXUP(e->data.const_names);
|
||||
gcFIXUP(e->data.const_vals);
|
||||
gcFIXUP(e->data.const_uids);
|
||||
gcFIXUP(e->data.sealed);
|
||||
gcFIXUP(e->data.use);
|
||||
gcFIXUP(e->data.lifts);
|
||||
|
||||
|
@ -5184,6 +5186,8 @@ static int lex_rib_SIZE(void *p) {
|
|||
static int lex_rib_MARK(void *p) {
|
||||
Scheme_Lexical_Rib *rib = (Scheme_Lexical_Rib *)p;
|
||||
gcMARK(rib->rename);
|
||||
gcMARK(rib->timestamp);
|
||||
gcMARK(rib->sealed);
|
||||
gcMARK(rib->next);
|
||||
return
|
||||
gcBYTES_TO_WORDS(sizeof(Scheme_Lexical_Rib));
|
||||
|
@ -5192,6 +5196,8 @@ static int lex_rib_MARK(void *p) {
|
|||
static int lex_rib_FIXUP(void *p) {
|
||||
Scheme_Lexical_Rib *rib = (Scheme_Lexical_Rib *)p;
|
||||
gcFIXUP(rib->rename);
|
||||
gcFIXUP(rib->timestamp);
|
||||
gcFIXUP(rib->sealed);
|
||||
gcFIXUP(rib->next);
|
||||
return
|
||||
gcBYTES_TO_WORDS(sizeof(Scheme_Lexical_Rib));
|
||||
|
|
|
@ -1114,6 +1114,7 @@ mark_comp_env {
|
|||
gcMARK(e->data.const_names);
|
||||
gcMARK(e->data.const_vals);
|
||||
gcMARK(e->data.const_uids);
|
||||
gcMARK(e->data.sealed);
|
||||
gcMARK(e->data.use);
|
||||
gcMARK(e->data.lifts);
|
||||
|
||||
|
@ -2118,6 +2119,8 @@ lex_rib {
|
|||
mark:
|
||||
Scheme_Lexical_Rib *rib = (Scheme_Lexical_Rib *)p;
|
||||
gcMARK(rib->rename);
|
||||
gcMARK(rib->timestamp);
|
||||
gcMARK(rib->sealed);
|
||||
gcMARK(rib->next);
|
||||
size:
|
||||
gcBYTES_TO_WORDS(sizeof(Scheme_Lexical_Rib));
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
#define USE_COMPILED_STARTUP 1
|
||||
|
||||
#define EXPECTED_PRIM_COUNT 938
|
||||
#define EXPECTED_PRIM_COUNT 942
|
||||
|
||||
#ifdef MZSCHEME_SOMETHING_OMITTED
|
||||
# undef USE_COMPILED_STARTUP
|
||||
|
|
|
@ -720,6 +720,9 @@ void scheme_set_rename(Scheme_Object *rnm, int pos, Scheme_Object *oldname);
|
|||
Scheme_Object *scheme_make_rename_rib(void);
|
||||
void scheme_add_rib_rename(Scheme_Object *ro, Scheme_Object *rename);
|
||||
void scheme_drop_first_rib_rename(Scheme_Object *ro);
|
||||
Scheme_Object *scheme_stx_id_remove_rib(Scheme_Object *stx, Scheme_Object *ro);
|
||||
void scheme_stx_seal_rib(Scheme_Object *rib);
|
||||
int *scheme_stx_get_rib_sealed(Scheme_Object *rib);
|
||||
|
||||
Scheme_Object *scheme_add_rename(Scheme_Object *o, Scheme_Object *rename);
|
||||
Scheme_Object *scheme_add_rename_rib(Scheme_Object *o, Scheme_Object *rib);
|
||||
|
@ -727,6 +730,8 @@ Scheme_Object *scheme_add_rename_rib(Scheme_Object *o, Scheme_Object *rib);
|
|||
Scheme_Object *scheme_stx_remove_extra_marks(Scheme_Object *o, Scheme_Object *relative_to,
|
||||
Scheme_Object *uid);
|
||||
|
||||
Scheme_Object *scheme_syntax_make_transfer_intro(int argc, Scheme_Object **argv);
|
||||
|
||||
#define mzMOD_RENAME_TOPLEVEL 0
|
||||
#define mzMOD_RENAME_NORMAL 1
|
||||
#define mzMOD_RENAME_MARKED 2
|
||||
|
|
|
@ -13,12 +13,12 @@
|
|||
consistently.)
|
||||
*/
|
||||
|
||||
#define MZSCHEME_VERSION "4.1.3.1"
|
||||
#define MZSCHEME_VERSION "4.1.3.2"
|
||||
|
||||
#define MZSCHEME_VERSION_X 4
|
||||
#define MZSCHEME_VERSION_Y 1
|
||||
#define MZSCHEME_VERSION_Z 3
|
||||
#define MZSCHEME_VERSION_W 1
|
||||
#define MZSCHEME_VERSION_W 2
|
||||
|
||||
#define MZSCHEME_VERSION_MAJOR ((MZSCHEME_VERSION_X * 100) + MZSCHEME_VERSION_Y)
|
||||
#define MZSCHEME_VERSION_MINOR ((MZSCHEME_VERSION_Z * 1000) + MZSCHEME_VERSION_W)
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -577,7 +577,7 @@ void scheme_register_traversers(void)
|
|||
GC_REG_TRAV(scheme_svector_type, svector_val);
|
||||
|
||||
GC_REG_TRAV(scheme_set_macro_type, small_object);
|
||||
GC_REG_TRAV(scheme_id_macro_type, small_object);
|
||||
GC_REG_TRAV(scheme_id_macro_type, twoptr_obj);
|
||||
|
||||
GC_REG_TRAV(scheme_stx_type, stx_val);
|
||||
GC_REG_TRAV(scheme_stx_offset_type, stx_off_val);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity
|
||||
version="4.1.3.1"
|
||||
version="4.1.3.2"
|
||||
processorArchitecture="X86"
|
||||
name="Org.PLT-Scheme.MrEd"
|
||||
type="win32"
|
||||
|
|
|
@ -20,8 +20,8 @@ APPLICATION ICON DISCARDABLE "mred.ico"
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 4,1,3,1
|
||||
PRODUCTVERSION 4,1,3,1
|
||||
FILEVERSION 4,1,3,2
|
||||
PRODUCTVERSION 4,1,3,2
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -39,11 +39,11 @@ BEGIN
|
|||
VALUE "CompanyName", "PLT Scheme Inc.\0"
|
||||
VALUE "FileDescription", "PLT Scheme GUI application\0"
|
||||
VALUE "InternalName", "MrEd\0"
|
||||
VALUE "FileVersion", "4, 1, 3, 1\0"
|
||||
VALUE "FileVersion", "4, 1, 3, 2\0"
|
||||
VALUE "LegalCopyright", "Copyright © 1995-2008\0"
|
||||
VALUE "OriginalFilename", "MrEd.exe\0"
|
||||
VALUE "ProductName", "PLT Scheme\0"
|
||||
VALUE "ProductVersion", "4, 1, 3, 1\0"
|
||||
VALUE "ProductVersion", "4, 1, 3, 2\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
|
@ -53,8 +53,8 @@ END
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 4,1,3,1
|
||||
PRODUCTVERSION 4,1,3,1
|
||||
FILEVERSION 4,1,3,2
|
||||
PRODUCTVERSION 4,1,3,2
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -70,12 +70,12 @@ BEGIN
|
|||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "FileDescription", "MzCOM Module"
|
||||
VALUE "FileVersion", "4, 1, 3, 1"
|
||||
VALUE "FileVersion", "4, 1, 3, 2"
|
||||
VALUE "InternalName", "MzCOM"
|
||||
VALUE "LegalCopyright", "Copyright 2000-2008 PLT (Paul Steckler)"
|
||||
VALUE "OriginalFilename", "MzCOM.EXE"
|
||||
VALUE "ProductName", "MzCOM Module"
|
||||
VALUE "ProductVersion", "4, 1, 3, 1"
|
||||
VALUE "ProductVersion", "4, 1, 3, 2"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
HKCR
|
||||
{
|
||||
MzCOM.MzObj.4.1.3.1 = s 'MzObj Class'
|
||||
MzCOM.MzObj.4.1.3.2 = s 'MzObj Class'
|
||||
{
|
||||
CLSID = s '{A3B0AF9E-2AB0-11D4-B6D2-0060089002FE}'
|
||||
}
|
||||
MzCOM.MzObj = s 'MzObj Class'
|
||||
{
|
||||
CLSID = s '{A3B0AF9E-2AB0-11D4-B6D2-0060089002FE}'
|
||||
CurVer = s 'MzCOM.MzObj.4.1.3.1'
|
||||
CurVer = s 'MzCOM.MzObj.4.1.3.2'
|
||||
}
|
||||
NoRemove CLSID
|
||||
{
|
||||
ForceRemove {A3B0AF9E-2AB0-11D4-B6D2-0060089002FE} = s 'MzObj Class'
|
||||
{
|
||||
ProgID = s 'MzCOM.MzObj.4.1.3.1'
|
||||
ProgID = s 'MzCOM.MzObj.4.1.3.2'
|
||||
VersionIndependentProgID = s 'MzCOM.MzObj'
|
||||
ForceRemove 'Programmable'
|
||||
LocalServer32 = s '%MODULE%'
|
||||
|
|
|
@ -29,8 +29,8 @@ APPLICATION ICON DISCARDABLE "mzscheme.ico"
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 4,1,3,1
|
||||
PRODUCTVERSION 4,1,3,1
|
||||
FILEVERSION 4,1,3,2
|
||||
PRODUCTVERSION 4,1,3,2
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -48,11 +48,11 @@ BEGIN
|
|||
VALUE "CompanyName", "PLT Scheme Inc.\0"
|
||||
VALUE "FileDescription", "PLT Scheme application\0"
|
||||
VALUE "InternalName", "MzScheme\0"
|
||||
VALUE "FileVersion", "4, 1, 3, 1\0"
|
||||
VALUE "FileVersion", "4, 1, 3, 2\0"
|
||||
VALUE "LegalCopyright", "Copyright <20>© 1995-2008\0"
|
||||
VALUE "OriginalFilename", "mzscheme.exe\0"
|
||||
VALUE "ProductName", "PLT Scheme\0"
|
||||
VALUE "ProductVersion", "4, 1, 3, 1\0"
|
||||
VALUE "ProductVersion", "4, 1, 3, 2\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
|
@ -22,8 +22,8 @@ APPLICATION ICON DISCARDABLE "mzstart.ico"
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 4,1,3,1
|
||||
PRODUCTVERSION 4,1,3,1
|
||||
FILEVERSION 4,1,3,2
|
||||
PRODUCTVERSION 4,1,3,2
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -45,7 +45,7 @@ BEGIN
|
|||
#ifdef MZSTART
|
||||
VALUE "FileDescription", "PLT Scheme Launcher\0"
|
||||
#endif
|
||||
VALUE "FileVersion", "4, 1, 3, 1\0"
|
||||
VALUE "FileVersion", "4, 1, 3, 2\0"
|
||||
#ifdef MRSTART
|
||||
VALUE "InternalName", "mrstart\0"
|
||||
#endif
|
||||
|
@ -60,7 +60,7 @@ BEGIN
|
|||
VALUE "OriginalFilename", "MzStart.exe\0"
|
||||
#endif
|
||||
VALUE "ProductName", "PLT Scheme\0"
|
||||
VALUE "ProductVersion", "4, 1, 3, 1\0"
|
||||
VALUE "ProductVersion", "4, 1, 3, 2\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
Loading…
Reference in New Issue
Block a user