diff options
author | Arun Isaac | 2021-03-21 16:17:23 +0530 |
---|---|---|
committer | Arun Isaac | 2021-03-22 01:12:13 +0530 |
commit | 0fb0944aa69d461088bd03df869d884382734e19 (patch) | |
tree | f6e3cedabe234c5a379c7bba67d203f09363ecc6 | |
parent | e4a36eb8b100bd1d0deea9929228ba476309d8fb (diff) | |
download | ccwl-0fb0944aa69d461088bd03df869d884382734e19.tar.gz ccwl-0fb0944aa69d461088bd03df869d884382734e19.tar.lz ccwl-0fb0944aa69d461088bd03df869d884382734e19.zip |
Delete input field of <command> object.
* ccwl/ccwl.scm (<command>): Delete input field.
(command): Do not set inputs field.
-rw-r--r-- | ccwl/ccwl.scm | 15 |
1 files 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 <command> - (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) |