summary refs log tree commit diff
diff options
context:
space:
mode:
authorArun Isaac2021-06-01 14:11:55 +0530
committerArun Isaac2021-06-01 14:11:55 +0530
commit35bcaaa67efbe9b60e69b0f7c17acc186c74e7c3 (patch)
treee5cdf85f38f2165e33285cffca828451e5009179
parent0d3e584d03131aae13aeaedfb2451d673b6d91f7 (diff)
downloadccwl-35bcaaa67efbe9b60e69b0f7c17acc186c74e7c3.tar.gz
ccwl-35bcaaa67efbe9b60e69b0f7c17acc186c74e7c3.tar.lz
ccwl-35bcaaa67efbe9b60e69b0f7c17acc186c74e7c3.zip
In pipe, pass through input keys to all expressions.
Earlier, the input keys would only be passed to the first
expression. The second expression would only receive the output keys
from the first expression. Passing input keys through to all
expressions is a common use case, since expressions often need to
access global inputs. If the original behavior is desired, we can
always introduce a new construct, say `pipe-strict'.

* ccwl/ccwl.scm (workflow-steps): In pipe, pass through input keys to
all expressions.
-rw-r--r--ccwl/ccwl.scm5
1 files changed, 3 insertions, 2 deletions
diff --git a/ccwl/ccwl.scm b/ccwl/ccwl.scm
index 0848c45..1f864e1 100644
--- a/ccwl/ccwl.scm
+++ b/ccwl/ccwl.scm
@@ -310,8 +310,9 @@ list of supplied input <key> objects."
     ;; pipe
     ((pipe expressions ...)
      (foldn (lambda (expression input-keys steps)
-              (let ((input-keys child-steps (workflow-steps expression input-keys)))
-                (values input-keys (append steps child-steps))))
+              (let ((child-output-keys child-steps (workflow-steps expression input-keys)))
+                (values (append input-keys child-output-keys)
+                        (append steps child-steps))))
             #'(expressions ...)
             input-keys
             (list)))