summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2021-10-18 00:19:12 +0530
committerArun Isaac2021-10-18 00:29:28 +0530
commit4507044300366c91e965cca905a9abc1a63ef0e5 (patch)
tree1cef9e7ee316171bc1e238fe96eebe1d4cd14300
parent5453bae3d18e92712b0d2ee36c59a5ff191af9e3 (diff)
downloadccwl-4507044300366c91e965cca905a9abc1a63ef0e5.tar.gz
ccwl-4507044300366c91e965cca905a9abc1a63ef0e5.tar.lz
ccwl-4507044300366c91e965cca905a9abc1a63ef0e5.zip
ccwl: Separate ccwl key from CWL input/output id.
* ccwl/ccwl.scm (<key>): Add cwl-id field. (key): Initialize cwl-id field. (key->output): Match the cwl-id of keys to the id of outputs, instead of matching the name of keys to the id of outputs. (cwl-key-address): Use the cwl-id of keys when outputting to CWL.
-rw-r--r--ccwl/ccwl.scm13
1 files changed, 7 insertions, 6 deletions
diff --git a/ccwl/ccwl.scm b/ccwl/ccwl.scm
index 4c15d98..fa79827 100644
--- a/ccwl/ccwl.scm
+++ b/ccwl/ccwl.scm
@@ -222,23 +222,24 @@ RUN-ARGS. If such an input is not present in RUN-ARGS, return #f."
(map input-id (command-inputs command)))
(define-immutable-record-type <key>
- (make-key name step)
+ (make-key name cwl-id step)
key?
(name key-name)
+ (cwl-id key-cwl-id)
(step key-step))
-(define* (key name #:optional step)
+(define* (key name #:optional step (cwl-id name))
"Build and return a <key> object."
- (make-key name step))
+ (make-key name cwl-id step))
;; TODO: Add docstring.
(define (cwl-key-address key)
(if (key-step key)
;; Input/output of particular step
(string-append (symbol->string (key-step key))
- "/" (symbol->string (key-name key)))
+ "/" (symbol->string (key-cwl-id key)))
;; Global input/output
- (symbol->string (key-name key))))
+ (symbol->string (key-cwl-id key))))
(define (command-object command-syntax)
"Return the command object described by COMMAND-SYNTAX. If such a
@@ -357,7 +358,7 @@ return #f."
steps))
(output (find (lambda (output)
(eq? (output-id output)
- (key-name key)))
+ (key-cwl-id key)))
(step-out step-with-output))))
(set-output-source output (cwl-key-address key))))