Created
April 11, 2024 18:35
-
-
Save Gozala/5af5ed5041e506d00adb895382efb641 to your computer and use it in GitHub Desktop.
Sketch of the workflow syntax
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Type definition for the Blob. It has no inputs and two outputs | |
; `digest` and `size`. It is kind of like a rule without a body | |
(Blob : { :digest Bytes :size Int }) | |
(Site : { :url String :headers (Map :key string :value string) }) | |
;; ℹ️ Unlabelled parameter can be refereced by `.` | |
(Result :error : (:ok . :error .error)) | |
;; Composed task is rule that maps input to tasks and maps task outputs | |
;; to the output of the composed task | |
(blob/add | |
;; Describes input parameters of the rule mapped to their types | |
:blob Blob | |
;; Describes output bindings of the rule mapped to their types | |
: (Result {:site Site}) | |
;; Describes set of labeled references that are either task invocations | |
;; or queries on the outputs they produce. Labels are only for the humans | |
;; and don't carry into the actual definitions where all references are | |
;; by hash of the labeled reference. | |
{ :location (/memory/allocate | |
;; binds space paramater to the unlabeled parameter - sub(ject) | |
;; of the invocation | |
:space . | |
;; binds blob parameter to the blob parameter of this invocation | |
:blob .blob) | |
:put (/http/put | |
;; binds url parameter to the `.location.out.ok.url` of the | |
;; location task | |
:url location.ok.url | |
:headers location.ok.headers | |
:body .blob) | |
:content (/memory/accept :space . :blob .blob :: put.ok) | |
:site content.ok.site | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment