diff options
Diffstat (limited to 'stdlib/source/library/lux/tool/compiler.lux')
-rw-r--r-- | stdlib/source/library/lux/tool/compiler.lux | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/stdlib/source/library/lux/tool/compiler.lux b/stdlib/source/library/lux/tool/compiler.lux new file mode 100644 index 000000000..1acd9aeea --- /dev/null +++ b/stdlib/source/library/lux/tool/compiler.lux @@ -0,0 +1,47 @@ +(.module: + [library + [lux (#- Module Code) + [control + ["." try (#+ Try)] + ["." exception (#+ exception:)]] + [data + [binary (#+ Binary)] + ["." text] + [collection + ["." row (#+ Row)]]] + [world + ["." file (#+ Path)]]]] + [/ + [meta + ["." archive (#+ Output Archive) + [key (#+ Key)] + [descriptor (#+ Descriptor Module)] + [document (#+ Document)]]]]) + +(type: #export Code + Text) + +(type: #export Parameter + Text) + +(type: #export Input + {#module Module + #file Path + #hash Nat + #code Code}) + +(type: #export (Compilation s d o) + {#dependencies (List Module) + #process (-> s Archive + (Try [s (Either (Compilation s d o) + [Descriptor (Document d) Output])]))}) + +(type: #export (Compiler s d o) + (-> Input (Compilation s d o))) + +(type: #export (Instancer s d o) + (-> (Key d) (List Parameter) (Compiler s d o))) + +(exception: #export (cannot_compile {module Module}) + (exception.report + ["Module" module])) |