Improved requires and a bit more.

svn: r10757
This commit is contained in:
Eli Barzilay 2008-07-14 08:15:55 +00:00
parent 19095ff14b
commit fd569e49c4
3 changed files with 8 additions and 13 deletions

View File

@ -1,11 +1,12 @@
(module define-config mzscheme
(module define-config scheme/base
(require (for-syntax scheme/base))
(provide define-parameters)
(define-syntax (define-parameters stx)
(syntax-case stx ()
[(_ (name val) ...)
(andmap identifier? (syntax-e #'(name ...)))
(andmap identifier? (syntax->list #'(name ...)))
#'(begin
(provide name ...)
(define name (make-parameter val)) ...)])))

View File

@ -5,10 +5,10 @@ Various common pieces of code that both the client and server need to access
|#
#lang scheme/base
(require (only-in mzlib/file path-only)
mzlib/port
setup/getinfo
(prefix-in srfi1: srfi/1)
(require setup/getinfo
scheme/path
scheme/port
scheme/list
"../config.ss"
"data.ss")
@ -199,7 +199,7 @@ Various common pieces of code that both the client and server need to access
;; also updates auxiliary datastructures that might have dangling pointers to
;; the removed links
(define (filter-link-table! f on-delete)
(let-values ([(in-links out-links) (srfi1:partition f (get-hard-link-table))])
(let-values ([(in-links out-links) (partition f (get-hard-link-table))])
(for-each on-delete out-links)
(save-hard-link-table in-links)))

View File

@ -10,13 +10,7 @@
net/url
xml/xml
mzlib/file
mzlib/list
mzlib/etc
scheme/contract
scheme/port
scheme/path
setup/pack
setup/plt-single-installer