From a9039b5d116e10b8cb2213a276b071a234366842 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 28 Sep 2023 23:46:59 +0100 Subject: graphviz: Add generic workflow or command serialization function. * ccwl/cwl.scm (workflow-or-command->dot): New public function. --- ccwl/graphviz.scm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ccwl/graphviz.scm b/ccwl/graphviz.scm index 2dc4f8d..820aadc 100644 --- a/ccwl/graphviz.scm +++ b/ccwl/graphviz.scm @@ -33,7 +33,15 @@ #:use-module (ccwl ccwl) #:use-module (ccwl utils) #:export (workflow->dot - command->dot)) + command->dot + workflow-or-command->dot)) + +(define workflow-or-command->dot + (match-lambda* + (((? workflow? workflow) port) + (workflow->dot workflow port)) + (((? command? command) port) + (command->dot command port)))) (define (workflow->dot workflow port) "Render WORKFLOW, a object, to PORT in the graphviz dot -- cgit v1.2.3