diff options
author | Arun Isaac | 2023-09-28 23:46:59 +0100 |
---|---|---|
committer | Arun Isaac | 2023-09-28 23:46:59 +0100 |
commit | a9039b5d116e10b8cb2213a276b071a234366842 (patch) | |
tree | a000699a77efd812876b1cdf93df101e40f715b7 | |
parent | 9dbb8a48d838ec1fc51c4770cb25741d4a173081 (diff) | |
download | ccwl-a9039b5d116e10b8cb2213a276b071a234366842.tar.gz ccwl-a9039b5d116e10b8cb2213a276b071a234366842.tar.lz ccwl-a9039b5d116e10b8cb2213a276b071a234366842.zip |
graphviz: Add generic workflow or command serialization function.
* ccwl/cwl.scm (workflow-or-command->dot): New public function.
-rw-r--r-- | ccwl/graphviz.scm | 10 |
1 files changed, 9 insertions, 1 deletions
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 <workflow> object, to PORT in the graphviz dot |