From f06bb8f93b471b4080743b41365a18ab0f53c68b Mon Sep 17 00:00:00 2001
From: Arun Isaac
Date: Sun, 21 Mar 2021 15:37:50 +0530
Subject: Add prefix field to object.
* ccwl/ccwl.scm (): Add prefix field.
(input): Initialize prefix field.
(input-with-prefix): New public function.
---
ccwl/ccwl.scm | 18 +++++++++++++-----
1 file 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
- (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
(make-unspecified-default)
unspecified-default?)
(define* (input id #:key (type 'File) label (default (make-unspecified-default)) (other '()))
"Build and return an 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 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