about summary refs log tree commit diff
diff options
context:
space:
mode:
authorArun Isaac2021-03-21 15:37:50 +0530
committerArun Isaac2021-03-21 15:39:50 +0530
commitf06bb8f93b471b4080743b41365a18ab0f53c68b (patch)
treeca4186de2ae35a0433de8b50a06e5ba7a112273a
parenta14ee063406f443a9435560c8690d7e335ecbf39 (diff)
downloadccwl-f06bb8f93b471b4080743b41365a18ab0f53c68b.tar.gz
ccwl-f06bb8f93b471b4080743b41365a18ab0f53c68b.tar.lz
ccwl-f06bb8f93b471b4080743b41365a18ab0f53c68b.zip
Add prefix field to <input> object.
* ccwl/ccwl.scm (<input>): Add prefix field.
(input): Initialize prefix field.
(input-with-prefix): New public function.
-rw-r--r--ccwl/ccwl.scm18
1 files changed, 13 insertions, 5 deletions
diff --git a/ccwl/ccwl.scm b/ccwl/ccwl.scm
index dd0ffd3..1923e66 100644
--- a/ccwl/ccwl.scm
+++ b/ccwl/ccwl.scm
@@ -13,31 +13,39 @@
   #:export (command
             workflow
             input
+            input-with-prefix
             output
             step
             pipeline
             write-cwl))
 
 (define-immutable-record-type <input>
-  (make-input id type label default source other)
+  (make-input id type label default source prefix other)
   input?
   (id input-id)
   (type input-type)
   (label input-label)
   (default input-default)
   (source input-source set-input-source)
+  (prefix input-prefix set-input-prefix)
   (other input-other))
 
+(define (input-with-prefix prefix input)
+  "Set PREFIX on INPUT object."
+  (set-input-prefix input prefix))
+
 (define-immutable-record-type <unspecified-default>
   (make-unspecified-default)
   unspecified-default?)
 
 (define* (input id #:key (type 'File) label (default (make-unspecified-default)) (other '()))
   "Build and return an <input> object."
-  ;; The user should not set source. Hence, do not expose it as a
-  ;; parameter of this constructor.
-  (let ((source #f))
-    (make-input id type label default source other)))
+  ;; The user should never set source, and should not set prefix
+  ;; directly during construction of the <input> object. Hence, do not
+  ;; expose it as a parameter of this constructor.
+  (let ((source #f)
+        (prefix #f))
+    (make-input id type label default source prefix other)))
 
 (define-immutable-record-type <output>
   (make-output id type binding source other)