diff options
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/ccwl-load.scm | 6 | ||||
| -rw-r--r-- | doc/ccwl.skb | 19 | ||||
| -rw-r--r-- | doc/prefix-arguments.scm | 5 | ||||
| -rw-r--r-- | doc/unseparated-prefix-arguments.scm | 2 |
4 files changed, 27 insertions, 5 deletions
diff --git a/doc/ccwl-load.scm b/doc/ccwl-load.scm new file mode 100644 index 0000000..a899a51 --- /dev/null +++ b/doc/ccwl-load.scm @@ -0,0 +1,6 @@ +(define checksum + (ccwl-load "checksum.scm")) + +(workflow ((input #:type File)) + (pipe (checksum …) + […])) diff --git a/doc/ccwl.skb b/doc/ccwl.skb index 9001f20..4bc3f39 100644 --- a/doc/ccwl.skb +++ b/doc/ccwl.skb @@ -1,5 +1,5 @@ ;;; ccwl --- Concise Common Workflow Language -;;; Copyright © 2021, 2023–2024 Arun Isaac <arunisaac@systemreboot.net> +;;; Copyright © 2021, 2023–2026 Arun Isaac <arunisaac@systemreboot.net> ;;; ;;; This file is part of ccwl. ;;; @@ -232,6 +232,7 @@ following output.]) compiled executable is in ,(file "run-output.txt"). Success!])) (subsection :title [tee] + :ident "section-tee" (p [Next, the tee topology. The following workflow computes three different checksums of a given input file.]) @@ -363,6 +364,14 @@ prefix. For example, in the following example, we associate the input ,(code "output_filename") to the prefix ,(code "-o"). Notice the parentheses around ,(code "-o output_filename").] (scheme-source "doc/prefix-arguments.scm"))) + (section :title [Unseparated prefix arguments] + :ident "section-unseparated-prefix-arguments" + (p [Some programs don't like it when you separate arguments from +their prefixes. You can specify this using the ,(code [#:separate?]) +flag.] + (scheme-source "doc/unseparated-prefix-arguments.scm") + [This is executed as ,(samp [gcc foo.c -ofoo]), rather than +as ,(samp [gcc foo.c -o foo]).])) (section :title [Array types] :ident "section-array-types" (p [ccwl supports array types using the following syntax.] @@ -388,6 +397,14 @@ workflow is an array of strings that is scattered over the ,(code [print]) step. Each run of the ,(code [print]) step gets an element of ,(code [other-messages]) as its ,(code [other-message]) argument.] (scheme-source "doc/scatter-gather.scm"))) + (section :title [Reuse workflows from other files] + :ident "section-reuse-workflows-from-other-files" + (p [It's sometimes useful to break up long ccwl workflows into +separate files. You can load a ccwl workflow from another file using +,(code "ccwl-load"). Here is an example that loads the ,(file +"checksum.scm") from the ,(ref :ident "section-tee" :text "tee") +section and reuses it in another workflow.] + (scheme-source "doc/ccwl-load.scm"))) (section :title [Reuse external CWL workflows] :ident "section-reuse-external-cwl-workflows" (p [Even though you may be a ccwl convert (hurrah!), others may diff --git a/doc/prefix-arguments.scm b/doc/prefix-arguments.scm index ec95aeb..bb54620 100644 --- a/doc/prefix-arguments.scm +++ b/doc/prefix-arguments.scm @@ -1,5 +1,2 @@ (command #:inputs (source #:type File) (output_filename #:type string) - #:run "gcc" source ("-o" output_filename) - #:outputs (executable - #:type File - #:binding ((glob . "$(inputs.output_filename)")))) + #:run "gcc" source ("-o" output_filename)) diff --git a/doc/unseparated-prefix-arguments.scm b/doc/unseparated-prefix-arguments.scm new file mode 100644 index 0000000..9e1e767 --- /dev/null +++ b/doc/unseparated-prefix-arguments.scm @@ -0,0 +1,2 @@ +(command #:inputs (source #:type File) (output_filename #:type string) + #:run "gcc" source ("-o" output_filename #:separate? #f)) |
