From 79285881c656261c214165f90cb54db9819f59d7 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Sat, 15 May 2021 20:46:28 +0530 Subject: Implement type and utilities. * ccwl/ccwl.scm (): New type. (key, cwl-key-address): New functions. --- ccwl/ccwl.scm | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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 + (make-key name step) + key? + (name key-name) + (step key-step)) + +(define* (key name #:optional step) + "Build and return a 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 -- cgit v1.2.3