From 0fb0944aa69d461088bd03df869d884382734e19 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Sun, 21 Mar 2021 16:17:23 +0530 Subject: Delete input field of object. * ccwl/ccwl.scm (): Delete input field. (command): Do not set inputs field. --- ccwl/ccwl.scm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/ccwl/ccwl.scm b/ccwl/ccwl.scm index a6ef95d..dc05c82 100644 --- a/ccwl/ccwl.scm +++ b/ccwl/ccwl.scm @@ -107,9 +107,8 @@ (field-appender step-out set-step-out)) (define-immutable-record-type - (make-command inputs outputs args stdin other) + (make-command outputs args stdin other) command? - (inputs command-inputs set-command-inputs) (outputs command-outputs set-command-outputs) (args command-args) (stdin command-stdin set-command-stdin) @@ -120,11 +119,13 @@ (define* (command id arguments #:key (additional-inputs '()) (outputs '()) (other '())) (make-step id - (make-command (append (filter input? arguments) - additional-inputs) - outputs arguments #f other) - (append (filter input? arguments) - additional-inputs) + (make-command outputs arguments #f other) + ;; A command can use the same input multiple times. So, + ;; deduplicate. + (delete-duplicates + (append (filter input? arguments) + additional-inputs) + input=?) outputs)) (define (input=? input1 input2) -- cgit v1.2.3