diff options
| author | Arun Isaac | 2025-12-18 14:37:26 +0000 |
|---|---|---|
| committer | Arun Isaac | 2025-12-18 14:37:26 +0000 |
| commit | 7f3c672999b90c5eb261b3a935fed6bc292eb8d5 (patch) | |
| tree | 769ea83439c3c8fba693b118fcd009ffeff59901 | |
| parent | 38dacb28f6cfde229eaf17d4fd937ad75e10f60e (diff) | |
| download | ravanan-7f3c672999b90c5eb261b3a935fed6bc292eb8d5.tar.gz ravanan-7f3c672999b90c5eb261b3a935fed6bc292eb8d5.tar.lz ravanan-7f3c672999b90c5eb261b3a935fed6bc292eb8d5.zip | |
work/command-line-tool: Return single binding for each input.
| -rw-r--r-- | ravanan/work/command-line-tool.scm | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/ravanan/work/command-line-tool.scm b/ravanan/work/command-line-tool.scm index 175a561..29d47c4 100644 --- a/ravanan/work/command-line-tool.scm +++ b/ravanan/work/command-line-tool.scm @@ -376,8 +376,8 @@ be defined in the context in which the G-expressions are inserted." (assoc-ref* argument "valueFrom"))) (define (collect-bindings ids+inputs+types+bindings) - (append-map id+input+type-tree+binding->command-line-binding - ids+inputs+types+bindings)) + (map id+input+type-tree+binding->command-line-binding + ids+inputs+types+bindings)) (define id+input+type-tree+binding->command-line-binding (match-lambda @@ -404,26 +404,26 @@ be defined in the context in which the G-expressions are inserted." ;; Recurse over array types. ;; TODO: Implement record and enum types. ((cwl-array-type? matched-type) - (list (command-line-binding - position - prefix - matched-type - (append-map (lambda (i input) - (id+input+type-tree+binding->command-line-binding - (list (append id (list i)) - input - (assoc-ref type-tree "items") - (maybe-assoc-ref (just type-tree) - "inputBinding")))) - (iota (vector-length input)) - (vector->list input)) - (maybe-assoc-ref binding "itemSeparator")))) + (command-line-binding + position + prefix + matched-type + (map (lambda (i input) + (id+input+type-tree+binding->command-line-binding + (list (append id (list i)) + input + (assoc-ref type-tree "items") + (maybe-assoc-ref (just type-tree) + "inputBinding")))) + (iota (vector-length input)) + (vector->list input)) + (maybe-assoc-ref binding "itemSeparator"))) (else - (list (command-line-binding position - prefix - matched-type - (apply json-ref inputs id) - %nothing))))))))) + (command-line-binding position + prefix + matched-type + (apply json-ref inputs id) + %nothing)))))))) ;; For details of this algorithm, see ยง4.1 Input binding of the CWL ;; 1.2 CommandLineTool specification: |
