diff options
author | Eduardo Julian | 2021-09-06 16:28:43 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-09-06 16:28:43 -0400 |
commit | b55cefcb258f11eeee32c1478faefd1bd09ec871 (patch) | |
tree | 8920d7c35bbb7adb3d5fd1a0a2a98fb328549ed2 /stdlib/source | |
parent | ddcfead3ebf30fd8fef26f495662ef61e652ba4f (diff) |
New chapter on compiler extensions.
Diffstat (limited to '')
21 files changed, 869 insertions, 14 deletions
diff --git a/stdlib/source/documentation/lux.lux b/stdlib/source/documentation/lux.lux index 94ccb3b38..88102d67a 100644 --- a/stdlib/source/documentation/lux.lux +++ b/stdlib/source/documentation/lux.lux @@ -35,7 +35,7 @@ ["#." target] ["#." test] ["#." time] - ... ["#." tool] ... TODO: Documentation for this + ["#." tool] ... TODO: Documentation for this ["#." type] ["#." world] ... ["#." target "_" @@ -1031,7 +1031,9 @@ ($.default /.Source) ($.default /.Module_State) ($.default /.Type_Context) - ($.default /.Macro')] + ($.default /.Macro') + ($.default /.Label) + ($.default /.macro)] [/abstract.documentation /control.documentation /data.documentation @@ -1048,6 +1050,7 @@ /target.documentation /test.documentation /time.documentation + /tool.documentation /type.documentation /world.documentation])) diff --git a/stdlib/source/documentation/lux/control/parser/code.lux b/stdlib/source/documentation/lux/control/parser/code.lux index 4c14304a0..ccd84d82c 100644 --- a/stdlib/source/documentation/lux/control/parser/code.lux +++ b/stdlib/source/documentation/lux/control/parser/code.lux @@ -1,6 +1,6 @@ (.module: [library - [lux {"-" [nat int rev local]} + [lux {"-" [nat int rev local not]} ["$" documentation {"+" [documentation:]}] [data [text {"+" [\n]} @@ -71,6 +71,13 @@ "Runs parser against the given list of inputs." [(local inputs parser)]) +(documentation: /.not + "Yields the next Code token if the parser fails." + [(not expected_to_fail)]) + +(documentation: /.next + "Yields the next Code token without consuming it from the input stream.") + (.def: .public documentation (.List $.Module) ($.module /._ @@ -109,5 +116,7 @@ ..end! ..end? ..result - ..local] + ..local + ..not + ..next] [])) diff --git a/stdlib/source/documentation/lux/meta.lux b/stdlib/source/documentation/lux/meta.lux index 16f7562a6..7bd9894fd 100644 --- a/stdlib/source/documentation/lux/meta.lux +++ b/stdlib/source/documentation/lux/meta.lux @@ -128,6 +128,10 @@ "Given a tag, finds out what is its index, its related tag-list and its associated type." [(tag tag_name)]) +(documentation: /.slot + "Given a slot, finds out what is its index, its related slot-list and its associated type." + [(slot slot_name)]) + (documentation: /.tag_lists "All the tag-lists defined in a module, with their associated types." [(tag_lists module)]) @@ -182,6 +186,7 @@ ..imported_by? ..imported? ..tag + ..slot ..tag_lists ..locals ..de_aliased @@ -191,6 +196,7 @@ ($.default /.functor) ($.default /.apply) ($.default /.monad) - ($.default /.lifted)] + ($.default /.lifted) + ($.default /.try)] [/annotation.documentation /location.documentation])) diff --git a/stdlib/source/documentation/lux/target.lux b/stdlib/source/documentation/lux/target.lux index d063b6894..831881f2f 100644 --- a/stdlib/source/documentation/lux/target.lux +++ b/stdlib/source/documentation/lux/target.lux @@ -8,7 +8,13 @@ [collection ["." list]]]]] [\\library - ["." /]]) + ["." /]] + ["." / "_" + ["#." js] + ["#." jvm] + ["#." lua] + ["#." python] + ["#." ruby]]) (documentation: /.Target (format "The name/ID of a platform targetted by a Lux compiler." @@ -29,4 +35,8 @@ ($.default /.php) ($.default /.r) ($.default /.scheme)] - [])) + [/js.documentation + /jvm.documentation + /lua.documentation + /python.documentation + /ruby.documentation])) diff --git a/stdlib/source/documentation/lux/target/js.lux b/stdlib/source/documentation/lux/target/js.lux new file mode 100644 index 000000000..fe87d7e40 --- /dev/null +++ b/stdlib/source/documentation/lux/target/js.lux @@ -0,0 +1,101 @@ +(.module: + [library + [lux {"-" [char]} + ["$" documentation {"+" [documentation:]}] + [data + [text {"+" [\n]} + ["%" format {"+" [format]}]] + [collection + ["." list]]]]] + [\\library + ["." /]]) + +(.def: .public documentation + (.List $.Module) + ($.module /._ + "" + [($.default /.Code) + ($.default /.code) + ($.default /.Expression) + ($.default /.Computation) + ($.default /.Location) + ($.default /.Statement) + ($.default /.Var) + ($.default /.Access) + ($.default /.Literal) + ($.default /.Loop) + ($.default /.Label) + ($.default /.null) + ($.default /.undefined) + ($.default /.boolean) + ($.default /.number) + ($.default /.string) + ($.default /.array) + ($.default /.var) + ($.default /.at) + ($.default /.the) + ($.default /.apply/*) + ($.default /.do) + ($.default /.object) + ($.default /.,) + ($.default /.then) + ($.default /.function!) + ($.default /.function) + ($.default /.closure) + ($.default /.=) + ($.default /.<) + ($.default /.<=) + ($.default /.>) + ($.default /.>=) + ($.default /.+) + ($.default /.-) + ($.default /.*) + ($.default /./) + ($.default /.%) + ($.default /.left_shift) + ($.default /.arithmetic_right_shift) + ($.default /.logic_right_shift) + ($.default /.or) + ($.default /.and) + ($.default /.bit_xor) + ($.default /.bit_or) + ($.default /.bit_and) + ($.default /.not) + ($.default /.bit_not) + ($.default /.opposite) + ($.default /.to_i32) + ($.default /.i32) + ($.default /.int) + ($.default /.?) + ($.default /.type_of) + ($.default /.new) + ($.default /.statement) + ($.default /.use_strict) + ($.default /.declare) + ($.default /.define) + ($.default /.set) + ($.default /.throw) + ($.default /.return) + ($.default /.delete) + ($.default /.if) + ($.default /.when) + ($.default /.while) + ($.default /.do_while) + ($.default /.try) + ($.default /.for) + ($.default /.label) + ($.default /.with_label) + ($.default /.break) + ($.default /.break_at) + ($.default /.continue) + ($.default /.continue_at) + ($.default /.++) + ($.default /.--) + ($.default /.comment) + ($.default /.switch) + ($.default /.cond) + ($.default /.apply/1) + ($.default /.not_a_number?) + ($.default /.apply/2) + ($.default /.apply/3)] + [])) diff --git a/stdlib/source/documentation/lux/target/jvm.lux b/stdlib/source/documentation/lux/target/jvm.lux new file mode 100644 index 000000000..85833ce7a --- /dev/null +++ b/stdlib/source/documentation/lux/target/jvm.lux @@ -0,0 +1,47 @@ +(.module: + [library + [lux {"-" [char]} + ["$" documentation {"+" [documentation:]}] + [data + [text {"+" [\n]} + ["%" format {"+" [format]}]] + [collection + ["." list]]]]] + [\\library + ["." /]]) + +(.def: .public documentation + (.List $.Module) + ($.module /._ + "" + [($.default /.Literal) + ($.default /.Constant) + ($.default /.Int_Arithmetic) + ($.default /.Long_Arithmetic) + ($.default /.Float_Arithmetic) + ($.default /.Double_Arithmetic) + ($.default /.Arithmetic) + ($.default /.Int_Bitwise) + ($.default /.Long_Bitwise) + ($.default /.Bitwise) + ($.default /.Conversion) + ($.default /.Array) + ($.default /.Object) + ($.default /.Register) + ($.default /.Local_Int) + ($.default /.Local_Long) + ($.default /.Local_Float) + ($.default /.Local_Double) + ($.default /.Local_Object) + ($.default /.Local) + ($.default /.Stack) + ($.default /.Comparison) + ($.default /.Label) + ($.default /.Branching) + ($.default /.Exception) + ($.default /.Concurrency) + ($.default /.Return) + ($.default /.Control) + ($.default /.Instruction) + ($.default /.Bytecode)] + [])) diff --git a/stdlib/source/documentation/lux/target/lua.lux b/stdlib/source/documentation/lux/target/lua.lux new file mode 100644 index 000000000..32870785f --- /dev/null +++ b/stdlib/source/documentation/lux/target/lua.lux @@ -0,0 +1,100 @@ +(.module: + [library + [lux {"-" [char]} + ["$" documentation {"+" [documentation:]}] + [data + [text {"+" [\n]} + ["%" format {"+" [format]}]] + [collection + ["." list]]]]] + [\\library + ["." /]]) + +(.def: .public documentation + (.List $.Module) + ($.module /._ + "" + [($.default /.Code) + ($.default /.equivalence) + ($.default /.hash) + ($.default /.manual) + ($.default /.code) + ($.default /.Expression) + ($.default /.Computation) + ($.default /.Location) + ($.default /.Statement) + ($.default /.Literal) + ($.default /.Var) + ($.default /.Access) + ($.default /.Label) + ($.default /.nil) + ($.default /.bool) + ($.default /.int) + ($.default /.float) + ($.default /.string) + ($.default /.multi) + ($.default /.array) + ($.default /.table) + ($.default /.item) + ($.default /.the) + ($.default /.length) + ($.default /.apply/*) + ($.default /.do) + ($.default /.=) + ($.default /.<) + ($.default /.<=) + ($.default /.>) + ($.default /.>=) + ($.default /.+) + ($.default /.-) + ($.default /.*) + ($.default /.^) + ($.default /./) + ($.default /.//) + ($.default /.%) + ($.default /.concat) + ($.default /.or) + ($.default /.and) + ($.default /.bit_or) + ($.default /.bit_and) + ($.default /.bit_xor) + ($.default /.bit_shl) + ($.default /.bit_shr) + ($.default /.not) + ($.default /.opposite) + ($.default /.var) + ($.default /.label) + ($.default /.statement) + ($.default /.then) + ($.default /.local) + ($.default /.set) + ($.default /.let) + ($.default /.local/1) + ($.default /.if) + ($.default /.when) + ($.default /.while) + ($.default /.repeat) + ($.default /.for_in) + ($.default /.for_step) + ($.default /.return) + ($.default /.closure) + ($.default /.function) + ($.default /.local_function) + ($.default /.break) + ($.default /.set_label) + ($.default /.go_to) + ($.default /.cond) + ($.default /.apply/1) + ($.default /.apply/2) + ($.default /.apply/3) + ($.default /.apply/4) + ($.default /.apply/5) + ($.default /.error/1) + ($.default /.print/1) + ($.default /.require/1) + ($.default /.type/1) + ($.default /.ipairs/1) + ($.default /.print/2) + ($.default /.error/2) + ($.default /.print/3)] + [])) diff --git a/stdlib/source/documentation/lux/target/python.lux b/stdlib/source/documentation/lux/target/python.lux new file mode 100644 index 000000000..2bb90ca9d --- /dev/null +++ b/stdlib/source/documentation/lux/target/python.lux @@ -0,0 +1,119 @@ +(.module: + [library + [lux {"-" [char]} + ["$" documentation {"+" [documentation:]}] + [data + [text {"+" [\n]} + ["%" format {"+" [format]}]] + [collection + ["." list]]]]] + [\\library + ["." /]]) + +(.def: .public documentation + (.List $.Module) + ($.module /._ + "" + [($.default /.Code) + ($.default /.equivalence) + ($.default /.hash) + ($.default /.manual) + ($.default /.code) + ($.default /.Expression) + ($.default /.Computation) + ($.default /.Location) + ($.default /.Var) + ($.default /.Statement) + ($.default /.Literal) + ($.default /.Access) + ($.default /.Loop) + ($.default /.Label) + ($.default /.SVar) + ($.default /.Single) + ($.default /.PVar) + ($.default /.Poly) + ($.default /.KVar) + ($.default /.Keyword) + ($.default /.var) + ($.default /.poly) + ($.default /.keyword) + ($.default /.none) + ($.default /.bool) + ($.default /.int) + ($.default /.long) + ($.default /.float) + ($.default /.string) + ($.default /.unicode) + ($.default /.tuple) + ($.default /.list) + ($.default /.slice) + ($.default /.slice_from) + ($.default /.dict) + ($.default /.apply/*) + ($.default /.apply_poly) + ($.default /.apply_keyword) + ($.default /.the) + ($.default /.do) + ($.default /.do_poly) + ($.default /.do_keyword) + ($.default /.item) + ($.default /.?) + ($.default /.is) + ($.default /.=) + ($.default /.<) + ($.default /.<=) + ($.default /.>) + ($.default /.>=) + ($.default /.+) + ($.default /.-) + ($.default /.*) + ($.default /./) + ($.default /.//) + ($.default /.%) + ($.default /.**) + ($.default /.bit_or) + ($.default /.bit_and) + ($.default /.bit_xor) + ($.default /.bit_shl) + ($.default /.bit_shr) + ($.default /.or) + ($.default /.and) + ($.default /.not) + ($.default /.opposite) + ($.default /.lambda) + ($.default /.set) + ($.default /.delete) + ($.default /.if) + ($.default /.when) + ($.default /.then) + ($.default /.break) + ($.default /.continue) + ($.default /.while) + ($.default /.for_in) + ($.default /.statement) + ($.default /.pass) + ($.default /.Except) + ($.default /.try) + ($.default /.raise) + ($.default /.return) + ($.default /.print) + ($.default /.exec) + ($.default /.def) + ($.default /.import) + ($.default /.comment) + ($.default /.cond) + ($.default /.apply/1) + ($.default /.apply/2) + ($.default /.apply/3) + ($.default /.str/1) + ($.default /.ord/1) + ($.default /.float/1) + ($.default /.int/1) + ($.default /.len/1) + ($.default /.chr/1) + ($.default /.unichr/1) + ($.default /.unicode/1) + ($.default /.repr/1) + ($.default /.__import__/1) + ($.default /.Exception/1)] + [])) diff --git a/stdlib/source/documentation/lux/target/ruby.lux b/stdlib/source/documentation/lux/target/ruby.lux new file mode 100644 index 000000000..f5fe5ae22 --- /dev/null +++ b/stdlib/source/documentation/lux/target/ruby.lux @@ -0,0 +1,117 @@ +(.module: + [library + [lux {"-" [char]} + ["$" documentation {"+" [documentation:]}] + [data + [text {"+" [\n]} + ["%" format {"+" [format]}]] + [collection + ["." list]]]]] + [\\library + ["." /]]) + +(.def: .public documentation + (.List $.Module) + ($.module /._ + "" + [($.default /.Code) + ($.default /.code_equivalence) + ($.default /.code_hash) + ($.default /.manual) + ($.default /.code) + ($.default /.Expression) + ($.default /.Computation) + ($.default /.Location) + ($.default /.Var) + ($.default /.LVar) + ($.default /.Statement) + ($.default /.Literal) + ($.default /.Access) + ($.default /.GVar) + ($.default /.IVar) + ($.default /.SVar) + ($.default /.LVar*) + ($.default /.LVar**) + ($.default /.global) + ($.default /.instance) + ($.default /.static) + ($.default /.local) + ($.default /.variadic) + ($.default /.splat) + ($.default /.variadic_kv) + ($.default /.double_splat) + ($.default /.latest_error) + ($.default /.last_string_read) + ($.default /.last_line_number_read) + ($.default /.last_string_matched) + ($.default /.last_regexp_match) + ($.default /.case_insensitivity_flag) + ($.default /.input_record_separator) + ($.default /.output_record_separator) + ($.default /.script_name) + ($.default /.process_id) + ($.default /.exit_status) + ($.default /.command_line_arguments) + ($.default /.nil) + ($.default /.bool) + ($.default /.int) + ($.default /.string) + ($.default /.symbol) + ($.default /.float) + ($.default /.array_range) + ($.default /.array) + ($.default /.hash) + ($.default /.apply/*) + ($.default /.apply_lambda/*) + ($.default /.the) + ($.default /.item) + ($.default /.?) + ($.default /.statement) + ($.default /.then) + ($.default /.set) + ($.default /.if) + ($.default /.when) + ($.default /.while) + ($.default /.for_in) + ($.default /.Rescue) + ($.default /.begin) + ($.default /.catch) + ($.default /.return) + ($.default /.raise) + ($.default /.next) + ($.default /.redo) + ($.default /.break) + ($.default /.function) + ($.default /.lambda) + ($.default /.=) + ($.default /.<) + ($.default /.<=) + ($.default /.>) + ($.default /.>=) + ($.default /.+) + ($.default /.-) + ($.default /.*) + ($.default /./) + ($.default /.%) + ($.default /.pow) + ($.default /.or) + ($.default /.and) + ($.default /.bit_or) + ($.default /.bit_and) + ($.default /.bit_xor) + ($.default /.bit_shl) + ($.default /.bit_shr) + ($.default /.not) + ($.default /.opposite) + ($.default /.comment) + ($.default /.do) + ($.default /.cond) + ($.default /.apply/1) + ($.default /.apply/2) + ($.default /.apply/3) + ($.default /.print/1) + ($.default /.require/1) + ($.default /.print/2) + ($.default /.print/3) + ($.default /.throw/1)] + [])) diff --git a/stdlib/source/documentation/lux/tool.lux b/stdlib/source/documentation/lux/tool.lux new file mode 100644 index 000000000..1cd0a11a1 --- /dev/null +++ b/stdlib/source/documentation/lux/tool.lux @@ -0,0 +1,28 @@ +(.module: + [library + [lux {"-" [char]} + ["$" documentation {"+" [documentation:]}] + [data + [text {"+" [\n]} + ["%" format {"+" [format]}]] + [collection + ["." list]]]]] + ["." / "_" + [compiler + ["#." phase] + [language + [lux + ["#." analysis] + ["#." directive] + ["#." generation] + ["#." synthesis]]]]]) + +(.def: .public documentation + (.List $.Module) + (list.together + (list /phase.documentation + /analysis.documentation + /directive.documentation + /generation.documentation + /synthesis.documentation + ))) diff --git a/stdlib/source/documentation/lux/tool/compiler/language/lux/analysis.lux b/stdlib/source/documentation/lux/tool/compiler/language/lux/analysis.lux new file mode 100644 index 000000000..b31cd23f9 --- /dev/null +++ b/stdlib/source/documentation/lux/tool/compiler/language/lux/analysis.lux @@ -0,0 +1,88 @@ +(.module: + [library + [lux {"-" [char]} + ["$" documentation {"+" [documentation:]}] + [data + [text {"+" [\n]} + ["%" format {"+" [format]}]] + [collection + ["." list]]]]] + [\\library + ["." /]]) + +(.def: .public documentation + (.List $.Module) + ($.module /._ + "" + [($.default /.Primitive) + ($.default /.Tag) + ($.default /.Variant) + ($.default /.tag) + ($.default /.choice) + ($.default /.Tuple) + ($.default /.Composite) + ($.default /.Pattern) + ($.default /.Branch') + ($.default /.Match') + ($.default /.Environment) + ($.default /.Analysis) + ($.default /.Branch) + ($.default /.Match) + ($.default /.composite_equivalence) + ($.default /.composite_hash) + ($.default /.equivalence) + ($.default /.control/case) + ($.default /.unit) + ($.default /.bit) + ($.default /.nat) + ($.default /.int) + ($.default /.rev) + ($.default /.frac) + ($.default /.text) + ($.default /.Abstraction) + ($.default /.Application) + ($.default /.no_op) + ($.default /.apply) + ($.default /.application) + ($.default /.variable) + ($.default /.constant) + ($.default /.variable/local) + ($.default /.variable/foreign) + ($.default /.pattern/variant) + ($.default /.pattern/tuple) + ($.default /.variant) + ($.default /.tuple) + ($.default /.pattern/unit) + ($.default /.pattern/bit) + ($.default /.pattern/nat) + ($.default /.pattern/int) + ($.default /.pattern/rev) + ($.default /.pattern/frac) + ($.default /.pattern/text) + ($.default /.pattern/bind) + ($.default /.%analysis) + ($.default /.State+) + ($.default /.Operation) + ($.default /.Phase) + ($.default /.Handler) + ($.default /.Bundle) + ($.default /.with_source_code) + ($.default /.with_scope) + ($.default /.without_scopes) + ($.default /.with_current_module) + ($.default /.with_location) + ($.default /.failure) + ($.default /.except) + ($.default /.assertion) + ($.default /.failure') + ($.default /.except') + ($.default /.with_stack) + ($.default /.install) + ($.default /.set_source_code) + ($.default /.set_current_module) + ($.default /.set_location) + ($.default /.location) + ($.default /.source) + ($.default /.info) + ($.default /.state)] + [])) diff --git a/stdlib/source/documentation/lux/tool/compiler/language/lux/directive.lux b/stdlib/source/documentation/lux/tool/compiler/language/lux/directive.lux new file mode 100644 index 000000000..e7aafa507 --- /dev/null +++ b/stdlib/source/documentation/lux/tool/compiler/language/lux/directive.lux @@ -0,0 +1,35 @@ +(.module: + [library + [lux {"-" [char]} + ["$" documentation {"+" [documentation:]}] + [data + [text {"+" [\n]} + ["%" format {"+" [format]}]] + [collection + ["." list]]]]] + [\\library + ["." /]]) + +(.def: .public documentation + (.List $.Module) + ($.module /._ + "" + [($.default /.Component) + ($.default /.State) + ($.default /.Import) + ($.default /.Requirements) + ($.default /.no_requirements) + ($.default /.merge_requirements) + ($.default /.State+) + ($.default /.Operation) + ($.default /.Phase) + ($.default /.Handler) + ($.default /.Bundle) + ($.default /.analysis) + ($.default /.synthesis) + ($.default /.generation) + ($.default /.lifted_analysis) + ($.default /.lifted_synthesis) + ($.default /.lifted_generation) + ($.default /.set_current_module)] + [])) diff --git a/stdlib/source/documentation/lux/tool/compiler/language/lux/generation.lux b/stdlib/source/documentation/lux/tool/compiler/language/lux/generation.lux new file mode 100644 index 000000000..7f7b2173c --- /dev/null +++ b/stdlib/source/documentation/lux/tool/compiler/language/lux/generation.lux @@ -0,0 +1,64 @@ +(.module: + [library + [lux {"-" [char]} + ["$" documentation {"+" [documentation:]}] + [data + [text {"+" [\n]} + ["%" format {"+" [format]}]] + [collection + ["." list]]]]] + [\\library + ["." /]]) + +(.def: .public documentation + (.List $.Module) + ($.module /._ + "" + [($.default /.Context) + ($.default /.Buffer) + ($.default /.cannot_interpret) + ($.default /.cannot_overwrite_output) + ($.default /.no_buffer_for_saving_code) + ($.default /.Host) + ($.default /.State) + ($.default /.State+) + ($.default /.Operation) + ($.default /.Phase) + ($.default /.Handler) + ($.default /.Bundle) + ($.default /.Extender) + ($.default /.state) + ($.default /.empty_buffer) + ($.default /.with_anchor) + ($.default /.set_anchor) + ($.default /.anchor) + ($.default /.no_anchor) + ($.default /.with_buffer) + ($.default /.set_buffer) + ($.default /.buffer) + ($.default /.no_active_buffer) + ($.default /.get_registry) + ($.default /.set_registry) + ($.default /.next) + ($.default /.identifier) + ($.default /.enter_module) + ($.default /.module) + ($.default /.evaluate!) + ($.default /.execute!) + ($.default /.define!) + ($.default /.save!) + ($.default /.learn) + ($.default /.learn_custom) + ($.default /.learn_analyser) + ($.default /.learn_synthesizer) + ($.default /.learn_generator) + ($.default /.learn_directive) + ($.default /.unknown_definition) + ($.default /.remember) + ($.default /.no_context) + ($.default /.module_id) + ($.default /.context) + ($.default /.with_context) + ($.default /.with_new_context) + ($.default /.log!)] + [])) diff --git a/stdlib/source/documentation/lux/tool/compiler/language/lux/synthesis.lux b/stdlib/source/documentation/lux/tool/compiler/language/lux/synthesis.lux new file mode 100644 index 000000000..d9163f261 --- /dev/null +++ b/stdlib/source/documentation/lux/tool/compiler/language/lux/synthesis.lux @@ -0,0 +1,91 @@ +(.module: + [library + [lux {"-" [char]} + ["$" documentation {"+" [documentation:]}] + [data + [text {"+" [\n]} + ["%" format {"+" [format]}]] + [collection + ["." list]]]]] + [\\library + ["." /]]) + +(.def: .public documentation + (.List $.Module) + ($.module /._ + "" + [($.default /.Resolver) + ($.default /.State) + ($.default /.fresh_resolver) + ($.default /.init) + ($.default /.Primitive) + ($.default /.Side) + ($.default /.Member) + ($.default /.Access) + ($.default /.Fork) + ($.default /.Path') + ($.default /.Abstraction') + ($.default /.Apply') + ($.default /.Branch) + ($.default /.Scope) + ($.default /.Loop) + ($.default /.Function) + ($.default /.Control) + ($.default /.Synthesis) + ($.default /.State+) + ($.default /.Operation) + ($.default /.Phase) + ($.default /.Handler) + ($.default /.Bundle) + ($.default /.Path) + ($.default /.path/pop) + ($.default /.path/side) + ($.default /.path/member) + ($.default /.side/left) + ($.default /.side/right) + ($.default /.member/left) + ($.default /.member/right) + ($.default /.path/bind) + ($.default /.path/then) + ($.default /.path/alt) + ($.default /.path/seq) + ($.default /.Abstraction) + ($.default /.Apply) + ($.default /.unit) + ($.default /.with_locals) + ($.default /.locals) + ($.default /.with_currying?) + ($.default /.currying?) + ($.default /.with_new_local) + ($.default /.bit) + ($.default /.i64) + ($.default /.f64) + ($.default /.text) + ($.default /.variant) + ($.default /.tuple) + ($.default /.variable) + ($.default /.constant) + ($.default /.variable/local) + ($.default /.variable/foreign) + ($.default /.branch/case) + ($.default /.branch/let) + ($.default /.branch/if) + ($.default /.branch/get) + ($.default /.loop/recur) + ($.default /.loop/scope) + ($.default /.function/abstraction) + ($.default /.function/apply) + ($.default /.%path') + ($.default /.%synthesis) + ($.default /.%path) + ($.default /.primitive_equivalence) + ($.default /.access_equivalence) + ($.default /.path'_equivalence) + ($.default /.equivalence) + ($.default /.path_equivalence) + ($.default /.hash) + ($.default /.!bind_top) + ($.default /.!multi_pop) + ($.default /.simple_left_side) + ($.default /.simple_right_side)] + [])) diff --git a/stdlib/source/documentation/lux/tool/compiler/phase.lux b/stdlib/source/documentation/lux/tool/compiler/phase.lux new file mode 100644 index 000000000..143ccb42f --- /dev/null +++ b/stdlib/source/documentation/lux/tool/compiler/phase.lux @@ -0,0 +1,33 @@ +(.module: + [library + [lux {"-" [char]} + ["$" documentation {"+" [documentation:]}] + [data + [text {"+" [\n]} + ["%" format {"+" [format]}]] + [collection + ["." list]]]]] + [\\library + ["." /]]) + +(.def: .public documentation + (.List $.Module) + ($.module /._ + "" + [($.default /.Operation) + ($.default /.monad) + ($.default /.Phase) + ($.default /.Wrapper) + ($.default /.result') + ($.default /.result) + ($.default /.get_state) + ($.default /.set_state) + ($.default /.sub) + ($.default /.failure) + ($.default /.except) + ($.default /.lifted) + ($.default /.assertion) + ($.default /.identity) + ($.default /.composite) + ($.default /.timed)] + [])) diff --git a/stdlib/source/library/lux/target/js.lux b/stdlib/source/library/lux/target/js.lux index fc1257fdc..2882fe5db 100644 --- a/stdlib/source/library/lux/target/js.lux +++ b/stdlib/source/library/lux/target/js.lux @@ -50,7 +50,7 @@ (template [<type> <super>+] [(with_expansions [<brand> (template.identifier [<type> "'"])] - (abstract: .public <brand> {} Any) + (abstract: <brand> {} Any) (`` (type: .public <type> (|> <brand> (~~ (template.spliced <super>+))))))] [Var [Location' Computation' Expression' Code]] diff --git a/stdlib/source/library/lux/target/lua.lux b/stdlib/source/library/lux/target/lua.lux index 540b8e7a0..d0c43b23d 100644 --- a/stdlib/source/library/lux/target/lua.lux +++ b/stdlib/source/library/lux/target/lua.lux @@ -73,7 +73,7 @@ (template [<type> <super>+] [(with_expansions [<brand> (template.identifier [<type> "'"])] - (abstract: .public <brand> {} Any) + (abstract: <brand> {} Any) (`` (type: .public <type> (|> <brand> (~~ (template.spliced <super>+))))))] [Literal [Computation' Expression' Code]] diff --git a/stdlib/source/library/lux/target/python.lux b/stdlib/source/library/lux/target/python.lux index 21aa9291f..db46ffe6b 100644 --- a/stdlib/source/library/lux/target/python.lux +++ b/stdlib/source/library/lux/target/python.lux @@ -74,7 +74,7 @@ (template [<type> <super>] [(with_expansions [<brand> (template.identifier [<type> "'"])] - (`` (abstract: .public (<brand> brand) {} Any)) + (`` (abstract: (<brand> brand) {} Any)) (`` (type: .public (<type> brand) (<super> (<brand> brand)))))] @@ -87,7 +87,7 @@ (template [<type> <super>] [(with_expansions [<brand> (template.identifier [<type> "'"])] - (`` (abstract: .public <brand> {} Any)) + (`` (abstract: <brand> {} Any)) (`` (type: .public <type> (<super> <brand>))))] [Literal Computation] diff --git a/stdlib/source/library/lux/target/ruby.lux b/stdlib/source/library/lux/target/ruby.lux index 22ca238d8..57aa8e41a 100644 --- a/stdlib/source/library/lux/target/ruby.lux +++ b/stdlib/source/library/lux/target/ruby.lux @@ -75,7 +75,7 @@ (template [<type> <super>+] [(with_expansions [<brand> (template.identifier [<type> "'"])] - (abstract: .public <brand> {} Any) + (abstract: <brand> {} Any) (`` (type: .public <type> (|> <brand> (~~ (template.spliced <super>+))))))] [Literal [Computation' Expression' Code]] diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/generation.lux b/stdlib/source/library/lux/tool/compiler/language/lux/generation.lux index 3646a0e9f..f5eb64da7 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/generation.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/generation.lux @@ -102,7 +102,9 @@ #context #.None #log row.empty]) -(def: .public empty_buffer Buffer row.empty) +(def: .public empty_buffer + Buffer + row.empty) (template [<tag> <with_declaration> <with_type> <with_value> diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/synthesis.lux b/stdlib/source/library/lux/tool/compiler/language/lux/synthesis.lux index df124fba8..3d1067415 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/synthesis.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/synthesis.lux @@ -198,7 +198,9 @@ (type: .public Apply (Apply' Synthesis)) -(def: .public unit Text "") +(def: .public unit + Text + "") (template [<with> <query> <tag> <type>] [(def: .public (<with> value) |