diff options
author | Arun Isaac | 2021-05-15 20:46:28 +0530 |
---|---|---|
committer | Arun Isaac | 2021-05-15 20:49:44 +0530 |
commit | 79285881c656261c214165f90cb54db9819f59d7 (patch) | |
tree | 6018ba5a695ca2a2cc6285738e4bfac13c496515 | |
parent | b14dcf9c5ca294475d67228821e280c327e01530 (diff) | |
download | ccwl-79285881c656261c214165f90cb54db9819f59d7.tar.gz ccwl-79285881c656261c214165f90cb54db9819f59d7.tar.lz ccwl-79285881c656261c214165f90cb54db9819f59d7.zip |
Implement <key> type and utilities.
* ccwl/ccwl.scm (<key>): New type.
(key, cwl-key-address): New functions.
-rw-r--r-- | ccwl/ccwl.scm | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ccwl/ccwl.scm b/ccwl/ccwl.scm index 25a9950..28ade9c 100644 --- a/ccwl/ccwl.scm +++ b/ccwl/ccwl.scm @@ -274,6 +274,25 @@ (define (workflow-steps x) (syntax-case x () +(define-immutable-record-type <key> + (make-key name step) + key? + (name key-name) + (step key-step)) + +(define* (key name #:optional step) + "Build and return a <key> object." + (make-key name 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))) + ;; Global input/output + (symbol->string (key-name key)))) + ((command (step-id) args ...) (cons #`(invoke-command step-id command |