From f5ce804ed0f1aaf8498177133424c10be83108d2 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Sat, 29 Nov 2025 02:35:40 +0000 Subject: workflow: Let optional-input? be a true predicate. optional-input? must be a predicate that returns #t or #f. It must not return the id of the input. --- ravanan/workflow.scm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ravanan/workflow.scm b/ravanan/workflow.scm index 1ae7f98..f3b9968 100644 --- a/ravanan/workflow.scm +++ b/ravanan/workflow.scm @@ -175,11 +175,10 @@ requirements and hints of the step." (define (optional-input? input) "Return @code{#t} if @var{input} is optional. Else, return @code{#f}." ;; Inputs that either have a default or accept null values are optional. - (and (or (assoc-ref input "default") - (match-type 'null - (formal-parameter-type - (assoc-ref* input "type")))) - (assoc-ref input "id"))) + (or (assoc-ref input "default") + (match-type 'null + (formal-parameter-type + (assoc-ref* input "type"))))) (define* (workflow->scheduler-proc name cwl scheduler manifest-file inferior scratch store @@ -287,7 +286,9 @@ command-line-tool)}." (assoc-ref run "inputs")) ;; Inputs that either have a default or accept null values are ;; optional. - (vector-filter-map->list optional-input? + (vector-filter-map->list (lambda (input) + (and (optional-input? input) + (assoc-ref input "id"))) (assoc-ref run "inputs")) (vector-map->list (lambda (output) (let ((output-id (assoc-ref output "id"))) -- cgit 1.4.1