aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorArun Isaac2021-08-03 16:31:46 +0530
committerArun Isaac2021-08-16 17:15:40 +0530
commit36ebdebb6bc0064c904f069b77e66fce98d704c5 (patch)
treee82fa7cb5f1e4ffff2f81721fb3489f30574edc1 /doc
parentc9c12e0e396475533ef987e3969b2ec847a8af9f (diff)
downloadccwl-36ebdebb6bc0064c904f069b77e66fce98d704c5.tar.gz
ccwl-36ebdebb6bc0064c904f069b77e66fce98d704c5.tar.lz
ccwl-36ebdebb6bc0064c904f069b77e66fce98d704c5.zip
ccwl: Define input objects using a macro instead of a function.
This allows us to do sophisticated syntax checking at an early stage, very close to the user interface. That way error messages from ccwl will make a lot more sense. * ccwl/ccwl.scm (input): Re-implement as macro. (<input>): Add new functional setters set-input-position and set-input-prefix. (input-spec-id, run-arg-position, run-arg-prefix): New functions. (command, workflow): Use the new macro interface. * doc/capture-output-file-with-parameter-reference.scm, doc/capture-output-file.scm, doc/capture-stdout.scm, doc/checksum.scm, doc/decompress-compile-run.scm, doc/hello-world.scm, doc/pass-stdin.scm: Use new quoting syntax for input types.
Diffstat (limited to 'doc')
-rw-r--r--doc/capture-output-file-with-parameter-reference.scm2
-rw-r--r--doc/capture-output-file.scm2
-rw-r--r--doc/capture-stdout.scm2
-rw-r--r--doc/checksum.scm6
-rw-r--r--doc/decompress-compile-run.scm4
-rw-r--r--doc/hello-world.scm2
-rw-r--r--doc/pass-stdin.scm2
7 files changed, 10 insertions, 10 deletions
diff --git a/doc/capture-output-file-with-parameter-reference.scm b/doc/capture-output-file-with-parameter-reference.scm
index bb5476b..88d17ad 100644
--- a/doc/capture-output-file-with-parameter-reference.scm
+++ b/doc/capture-output-file-with-parameter-reference.scm
@@ -1,5 +1,5 @@
(define extract-specific-file
- (command #:inputs (archive #:type 'File) (extractfile #:type 'string)
+ (command #:inputs (archive #:type File) (extractfile #:type string)
#:run "tar" "--extract" "--file" archive extractfile
#:outputs (extracted-file
#:type 'File
diff --git a/doc/capture-output-file.scm b/doc/capture-output-file.scm
index 6c5dbbd..ddeb218 100644
--- a/doc/capture-output-file.scm
+++ b/doc/capture-output-file.scm
@@ -1,5 +1,5 @@
(define extract
- (command #:inputs (archive #:type 'File)
+ (command #:inputs (archive #:type File)
#:run "tar" "--extract" "--file" archive
#:outputs (extracted-file
#:type 'File
diff --git a/doc/capture-stdout.scm b/doc/capture-stdout.scm
index 6913809..1aed277 100644
--- a/doc/capture-stdout.scm
+++ b/doc/capture-stdout.scm
@@ -1,5 +1,5 @@
(define print
- (command #:inputs (message #:type 'string)
+ (command #:inputs (message #:type string)
#:run "echo" message
#:outputs (printed-message #:type 'stdout)))
diff --git a/doc/checksum.scm b/doc/checksum.scm
index 4d8bfaf..e746779 100644
--- a/doc/checksum.scm
+++ b/doc/checksum.scm
@@ -1,15 +1,15 @@
(define md5sum
- (command #:inputs (file #:type 'File)
+ (command #:inputs (file #:type File)
#:run "md5sum" file
#:outputs (md5 #:type 'stdout)))
(define sha1sum
- (command #:inputs (file #:type 'File)
+ (command #:inputs (file #:type File)
#:run "sha1sum" file
#:outputs (sha1 #:type 'stdout)))
(define sha256sum
- (command #:inputs (file #:type 'File)
+ (command #:inputs (file #:type File)
#:run "sha256sum" file
#:outputs (sha256 #:type 'stdout)))
diff --git a/doc/decompress-compile-run.scm b/doc/decompress-compile-run.scm
index a2c58bb..4e916b2 100644
--- a/doc/decompress-compile-run.scm
+++ b/doc/decompress-compile-run.scm
@@ -1,10 +1,10 @@
(define decompress
- (command #:inputs (compressed #:type 'File)
+ (command #:inputs (compressed #:type File)
#:run "gzip" "--stdout" "--decompress" compressed
#:outputs (decompressed #:type 'stdout)))
(define compile
- (command #:inputs (source #:type 'File)
+ (command #:inputs (source #:type File)
#:run "gcc" "-x" "c" source
#:outputs (executable
#:type 'File
diff --git a/doc/hello-world.scm b/doc/hello-world.scm
index 1624053..3b44dbb 100644
--- a/doc/hello-world.scm
+++ b/doc/hello-world.scm
@@ -1,5 +1,5 @@
(define print
- (command #:inputs (message #:type 'string)
+ (command #:inputs (message #:type string)
#:run "echo" message))
(workflow ((message #:type string))
diff --git a/doc/pass-stdin.scm b/doc/pass-stdin.scm
index 3bdc70b..af125ba 100644
--- a/doc/pass-stdin.scm
+++ b/doc/pass-stdin.scm
@@ -1,5 +1,5 @@
(define count-bytes
- (command #:inputs (file #:type 'File)
+ (command #:inputs (file #:type File)
#:run "wc" "-c"
#:stdin file))