From 4f52ebf108d4d4535d5219e8861cb5832d187e30 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Fri, 29 Sep 2017 13:13:57 +0100 Subject: [PATCH] Simplify make.rkt slightly --- racket/syndicate/examples/actor/make.rkt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/racket/syndicate/examples/actor/make.rkt b/racket/syndicate/examples/actor/make.rkt index 9d18565..82bfbe7 100644 --- a/racket/syndicate/examples/actor/make.rkt +++ b/racket/syndicate/examples/actor/make.rkt @@ -13,12 +13,11 @@ (when (not (string-suffix? name ".c")) (define name.c (string-append name ".c")) (on-start (printf "Tracking ~a, to see if we can use it to build ~a\n" name.c name)) - (during (file-content name.c file->sha1 $hash) ;; nb. $hash, not _ - (on-start - (if hash - (begin (printf "~a has changed hash to ~a, recompiling\n" name.c hash) - (system* (find-executable-path "cc") "-o" name name.c)) - (printf "~a doesn't exist.\n" name.c))))))) + (on (asserted (file-content name.c file->sha1 $hash)) ;; nb. $hash, not _ + (if hash + (begin (printf "~a has changed hash to ~a, recompiling\n" name.c hash) + (system* (find-executable-path "cc") "-o" name name.c)) + (printf "~a doesn't exist.\n" name.c)))))) (spawn (on (asserted (file-content "." directory-list $files)) (for [(name-path (in-list files))]