From a4544793455688916caf67fc61e1b4cc6c5d0523 Mon Sep 17 00:00:00 2001 From: Kathy Gray Date: Wed, 17 Sep 2008 14:54:11 +0000 Subject: [PATCH] Correction for setup-plt error svn: r11791 --- collects/htdch/draw/SillyCanvas.java | 72 ++++++++++++++-------------- collects/profj/compile.ss | 13 ++--- collects/profj/types.ss | 11 +++-- 3 files changed, 51 insertions(+), 45 deletions(-) diff --git a/collects/htdch/draw/SillyCanvas.java b/collects/htdch/draw/SillyCanvas.java index 29776b8b3d..c8d7ba1865 100644 --- a/collects/htdch/draw/SillyCanvas.java +++ b/collects/htdch/draw/SillyCanvas.java @@ -4,40 +4,40 @@ import geometry.*; import colors.*; public class SillyCanvas extends Canvas { - private int x = 20; - private int y = 20; - - private boolean warning() { - return super.drawString(new Posn(x,y),"This is a Dummy Canvas."); - } - - SillyCanvas(int w, int h) { - super(w,h); - if ((w < x) || (h < y)) - throw new RuntimeException("SillyCanvas: bad size"); - } - - public boolean drawCircle(Posn p, int r, IColor c) { - return super.drawCircle(p,r,c) && warning(); - } - - public boolean drawDisk(Posn p, int r, IColor c) { - return super.drawDisk(p,r,c) && warning(); - } - - public boolean drawRect(Posn p, int width, int height, IColor c) { - return super.drawRect(p,width,height,c) && warning(); - } - - public boolean drawLine(Posn p0, Posn p1, IColor c) { - return super.drawLine(p0,p1,c) && warning(); - } - - public boolean drawString(Posn p, String s) { - return super.drawString(p,s) && warning(); - } - - public boolean show() { - return super.show() && warning(); - } + private int x = 20; + private int y = 20; + + private boolean warning() { + return super.drawString(new Posn(x,y),"This is a Dummy Canvas."); + } + + SillyCanvas(int w, int h) { + super(w,h); + if ((w < x) || (h < y)) + throw new RuntimeException("SillyCanvas: bad size"); + } + + public boolean drawCircle(Posn p, int r, IColor c) { + return super.drawCircle(p,r,c) && warning(); + } + + public boolean drawDisk(Posn p, int r, IColor c) { + return super.drawDisk(p,r,c) && warning(); + } + + public boolean drawRect(Posn p, int width, int height, IColor c) { + return super.drawRect(p,width,height,c) && warning(); + } + + public boolean drawLine(Posn p0, Posn p1, IColor c) { + return super.drawLine(p0,p1,c) && warning(); + } + + public boolean drawString(Posn p, String s) { + return super.drawString(p,s) && warning(); + } + + public boolean show() { + return super.show() && warning(); + } } diff --git a/collects/profj/compile.ss b/collects/profj/compile.ss index c20061a7d8..d39f4de4f7 100644 --- a/collects/profj/compile.ss +++ b/collects/profj/compile.ss @@ -93,12 +93,12 @@ (let ((names (compilation-unit-contains dependents)) (syntaxes (compilation-unit-code dependents)) (locations (compilation-unit-locations dependents))) - ;(print-struct #t) - ;(printf "names ~a~n" names) - ;(printf "depends ~a~n~n" (compilation-unit-depends dependents)) + (print-struct #t) + #;(printf "names ~a~n" names) + #;(printf "depends ~a~n~n" (compilation-unit-depends dependents)) (unless (= (length names) (length syntaxes)) - ;(printf "Writing a composite file out~n") - ;(printf "~a~n~n" (syntax-object->datum (car syntaxes))) + #;(printf "Writing a composite file out~n") + #;(printf "~a~n~n" (syntax->datum (car syntaxes))) (call-with-output-zo-file* location (build-path (send type-recs get-compilation-location) (file-name-from-path @@ -108,7 +108,8 @@ (unless (= (length names) (length syntaxes) (length locations)) (error 'compile-to-file "Internal error: compilation unit not represented as expected")) (for-each (lambda (name code location) - ;(printf "~a~n~n" (syntax-object->datum code)) + #;(printf "writing out ~a~n" name) + #;(printf "~a~n~n" (syntax->datum code)) (send type-recs set-location! location) (let ((directory (send type-recs get-compilation-location))) (unless (directory-exists? directory) (make-directory directory)) diff --git a/collects/profj/types.ss b/collects/profj/types.ss index aafd44db81..faaf5c7c74 100644 --- a/collects/profj/types.ss +++ b/collects/profj/types.ss @@ -863,8 +863,10 @@ (lambda (input) (and (= (length input) type-length) (equal? type-version (list-ref input 9)) - (or (equal? (version) (list-ref input 10)) - (equal? "ignore" (list-ref input 10))) + (or (equal? "ignore" (list-ref input 10)) + (and (equal? (version) (list-ref input 10)) + (>= (file-or-directory-modify-seconds (build-path filename)) + (file-or-directory-modify-seconds (build-path (collection-path "mzlib") "contract.ss"))))) (make-class-record (list-ref input 1) (list-ref input 2) (symbol=? 'class (car input)) @@ -904,7 +906,10 @@ (make-array-type (parse-type (cadr input)) (car input))) (else (make-ref-type (car input) (cdr input))))))) - (parse-class/iface (call-with-input-file filename read)))) + #;(printf "~a ~a ~n" filename + (>= (file-or-directory-modify-seconds (build-path filename)) + (file-or-directory-modify-seconds (build-path (collection-path "mzlib") "contract.ss")))) + (parse-class/iface (call-with-input-file filename read)))) ;; write-record: class-record port-> (define (write-record rec port)