From 38388b1d346ce16c33afe65e44ee7bbb3315b67a Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Wed, 30 Sep 2009 03:55:22 +0000 Subject: [PATCH] typo in DFlag svn: r16179 --- collects/mzlib/trace.ss | 37 ++++++++++---------- collects/scribblings/mzc/ext.scrbl | 2 +- collects/scribblings/reference/startup.scrbl | 4 +-- 3 files changed, 21 insertions(+), 22 deletions(-) diff --git a/collects/mzlib/trace.ss b/collects/mzlib/trace.ss index 5cc1929ff6..3f405057e1 100644 --- a/collects/mzlib/trace.ss +++ b/collects/mzlib/trace.ss @@ -151,29 +151,28 @@ ;; A traced-proc struct instance acts like a procedure, ;; but preserves the original, too. -(define-values (struct:traced-proc make-traced-proc traced-proc? traced-proc-ref traced-proc-set!) +(define-values (struct:traced-proc make-traced-proc traced-proc? + traced-proc-ref traced-proc-set!) (make-struct-type 'traced-proc #f 2 0 #f null (current-inspector) 0)) +(define-struct traced-proc (proc orig) + ) ;; Install traced versions of a given set of procedures. The traced ;; versions are also given, so that they can be constructed to have ;; a nice name. -(define (do-trace ids procs setters traced-procs) - (for-each (lambda (id proc) - (unless (procedure? proc) - (error 'trace - "the value of ~s is not a procedure: ~e" id proc))) - ids procs) - (for-each (lambda (proc setter traced-proc) - (unless (traced-proc? proc) - (setter (make-traced-proc - (let-values ([(a) (procedure-arity proc)] - [(req allowed) (procedure-keywords proc)]) - (procedure-reduce-keyword-arity traced-proc - a - req - allowed)) - proc)))) - procs setters traced-procs)) +(define (set-traced! ids procs setters traced-procs) + (for ([id (in-list ids)] [proc (in-list procs)]) + (unless (procedure? proc) + (error 'trace "the value of ~s is not a procedure: ~e" id proc))) + (for ([proc (in-list procs)] + [setter (in-list setters)] + [traced-proc (in-list traced-procs)]) + (unless (traced-proc? proc) + (setter (make-traced-proc + (let-values ([(a) (procedure-arity proc)] + [(req allowed) (procedure-keywords proc)]) + (procedure-reduce-keyword-arity traced-proc a req allowed)) + proc))))) ;; Key used for a continuation mark to indicate ;; the nesting depth: @@ -247,7 +246,7 @@ (for/list ([id (in-list (syntax->list #'(id ...)))]) (let ([tid (format "traced-~a" (syntax-e id))]) (datum->syntax id (string->symbol tid) #f)))]) - #'(do-trace + #'(set-traced! '(id ...) (list id ...) (list (lambda (v) (set! id v)) ...) diff --git a/collects/scribblings/mzc/ext.scrbl b/collects/scribblings/mzc/ext.scrbl index c0c12f1dd4..eac9ab7d36 100644 --- a/collects/scribblings/mzc/ext.scrbl +++ b/collects/scribblings/mzc/ext.scrbl @@ -21,7 +21,7 @@ it will be found automatically when loading the source. Use the subdirectory, where it will be found automatically when loading the source file. -The @DFlag{--c-source}/@Flag{c} mode for @|mzc| is like the +The @DFlag{c-source}/@Flag{c} mode for @|mzc| is like the @DFlag{extension}/@Flag{e} mode, except that compilation stops with the generation of C code. diff --git a/collects/scribblings/reference/startup.scrbl b/collects/scribblings/reference/startup.scrbl index 3a9e394db5..07fac92ff3 100644 --- a/collects/scribblings/reference/startup.scrbl +++ b/collects/scribblings/reference/startup.scrbl @@ -296,11 +296,11 @@ flags: If at least one command-line argument is provided, and if the first one after any @tech{configuration option} is not a flag, then a -@Flag{u}/@DFlag{--require-script} flag is implicitly added before the +@Flag{u}/@DFlag{require-script} flag is implicitly added before the first non-flag argument. If no command-line arguments are supplied other than -@tech{configuration options}, then the @Flag{i}/@DFlag{--repl} flag is +@tech{configuration options}, then the @Flag{i}/@DFlag{repl} flag is effectively added. For MrEd under X11, the follow flags are recognized when they appear