From 3d35db12904aac0c25b607e5c844d0e8d9e65840 Mon Sep 17 00:00:00 2001 From: Joe Marshall Date: Sat, 27 Mar 2010 14:46:20 -0700 Subject: [PATCH] Add simple restart to sf/internal. --- src/sf/toplev.scm | 55 +++++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/src/sf/toplev.scm b/src/sf/toplev.scm index 9378d8d08..e666827f5 100644 --- a/src/sf/toplev.scm +++ b/src/sf/toplev.scm @@ -121,32 +121,35 @@ USA. (define (sf/internal input-pathname bin-pathname spec-pathname environment declarations) spec-pathname ;ignored - (let ((do-it - (let ((start-date (get-decoded-time))) - (lambda () - (fasdump (make-comment - `((SOURCE-FILE . ,(->namestring input-pathname)) - (DATE ,(decoded-time/year start-date) - ,(decoded-time/month start-date) - ,(decoded-time/day start-date)) - (TIME ,(decoded-time/hour start-date) - ,(decoded-time/minute start-date) - ,(decoded-time/second start-date))) - (sf/file->scode input-pathname bin-pathname - environment declarations)) - bin-pathname - #t))))) - (if sf:noisy? - (let ((message - (lambda (port) - (write-string "Generating SCode for file: " port) - (write (enough-namestring input-pathname) port) - (write-string " => " port) - (write (enough-namestring bin-pathname) port)))) - (if (eq? sf:noisy? 'old-style) - (timed message do-it) - (with-notification message do-it))) - (do-it)))) + (with-simple-restart + 'CONTINUE (string-append "Skip processing file " (->namestring input-pathname)) + (lambda () + (let ((do-it + (let ((start-date (get-decoded-time))) + (lambda () + (fasdump (make-comment + `((SOURCE-FILE . ,(->namestring input-pathname)) + (DATE ,(decoded-time/year start-date) + ,(decoded-time/month start-date) + ,(decoded-time/day start-date)) + (TIME ,(decoded-time/hour start-date) + ,(decoded-time/minute start-date) + ,(decoded-time/second start-date))) + (sf/file->scode input-pathname bin-pathname + environment declarations)) + bin-pathname + #t))))) + (if sf:noisy? + (let ((message + (lambda (port) + (write-string "Generating SCode for file: " port) + (write (enough-namestring input-pathname) port) + (write-string " => " port) + (write (enough-namestring bin-pathname) port)))) + (if (eq? sf:noisy? 'old-style) + (timed message do-it) + (with-notification message do-it))) + (do-it)))))) (define (sf/file->scode input-pathname output-pathname environment declarations) -- 2.25.1