aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Julian2021-09-06 16:28:43 -0400
committerEduardo Julian2021-09-06 16:28:43 -0400
commitb55cefcb258f11eeee32c1478faefd1bd09ec871 (patch)
tree8920d7c35bbb7adb3d5fd1a0a2a98fb328549ed2
parentddcfead3ebf30fd8fef26f495662ef61e652ba4f (diff)
New chapter on compiler extensions.
-rw-r--r--documentation/book/the_lux_programming_language/chapter_18.md250
-rw-r--r--documentation/book/the_lux_programming_language/index.md2
-rw-r--r--stdlib/source/documentation/lux.lux7
-rw-r--r--stdlib/source/documentation/lux/control/parser/code.lux13
-rw-r--r--stdlib/source/documentation/lux/meta.lux8
-rw-r--r--stdlib/source/documentation/lux/target.lux14
-rw-r--r--stdlib/source/documentation/lux/target/js.lux101
-rw-r--r--stdlib/source/documentation/lux/target/jvm.lux47
-rw-r--r--stdlib/source/documentation/lux/target/lua.lux100
-rw-r--r--stdlib/source/documentation/lux/target/python.lux119
-rw-r--r--stdlib/source/documentation/lux/target/ruby.lux117
-rw-r--r--stdlib/source/documentation/lux/tool.lux28
-rw-r--r--stdlib/source/documentation/lux/tool/compiler/language/lux/analysis.lux88
-rw-r--r--stdlib/source/documentation/lux/tool/compiler/language/lux/directive.lux35
-rw-r--r--stdlib/source/documentation/lux/tool/compiler/language/lux/generation.lux64
-rw-r--r--stdlib/source/documentation/lux/tool/compiler/language/lux/synthesis.lux91
-rw-r--r--stdlib/source/documentation/lux/tool/compiler/phase.lux33
-rw-r--r--stdlib/source/library/lux/target/js.lux2
-rw-r--r--stdlib/source/library/lux/target/lua.lux2
-rw-r--r--stdlib/source/library/lux/target/python.lux4
-rw-r--r--stdlib/source/library/lux/target/ruby.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/generation.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/synthesis.lux4
23 files changed, 1121 insertions, 14 deletions
diff --git a/documentation/book/the_lux_programming_language/chapter_18.md b/documentation/book/the_lux_programming_language/chapter_18.md
new file mode 100644
index 000000000..b132446d2
--- /dev/null
+++ b/documentation/book/the_lux_programming_language/chapter_18.md
@@ -0,0 +1,250 @@
+# Chapter 18: Extensions
+
+_Where you will teach new tricks to an old compiler._
+
+Lux is a member of the Lisp family of languages.
+
+As such, it has macros, which are a classic staple of lisps which allow programmers to extend the syntax of their language to implement all sorts of new features, domain-specific-languages (or _DSLs_, for short), optimizations, and even entire paradigms, such as object-oriented programming.
+
+However, compilers do much more than just process syntax.
+
+In statically-typed languages, compilers also type-check code; and even in dynamically-typed languages, compilers often optimize your code, and generate output code for either the machine the program will run on, or some sort of virtual machine or interpreter.
+
+Macros, however, don't extend any of these other aspects of compilation; only the syntax of the language.
+
+And so, even lisps keep the programmer out of most of the activities of the compiler.
+
+Lisps may be more extensible than most other languages, but they are not _completely extensible_.
+
+With Lux, however, I want to take the traditional extensibility of lisps and take it to its ultimate expression.
+
+Not only should syntax be extensible, but also type-checking, optimization, and code-generation.
+
+And who knows? Maybe _even more_ aspects will be extensible in the future.
+
+But, for now, let's see what Lux has got to offer.
+
+---
+
+Now, before we get into the details, let's first discuss the syntax being used for just a moment.
+
+```clojure
+("js object do" "replaceAll" template [pattern replacement])
+```
+
+_What is up with that text-based syntax?_
+
+Well, here's the deal.
+
+Most lisps have what they call _special forms_.
+
+Basically, these are macro-like expressions which provide some fundamental features of the language.
+
+Special forms, however, are not macros.
+
+They are default types of expressions provided by the compiler/interpreter.
+
+They are named by symbols/identifiers, such as `let`, or `if`, and because of that, the symbols/identifiers used to name them are reserved.
+
+That is to say, if there is a special form named `if`, that means you cannot make your own definition named `if`, because then the compiler/interpreter might get confused as to whether somebody is using the special form, or an arbitrary definition.
+
+The term **keyword** is often used in programming languages to refer to symbols/identifiers considered to be special by the compiler/interpreter, and reserved for the exclusive use of the language designer.
+
+Personally, I hate the idea of having special privileges that users of Lux lack.
+
+I think that, as a designer, I'd be cheating if I could do things nobody else could, such as using reserved names.
+
+So, I didn't like the idea of naming extensions with identifiers, because then those identifiers would effectively become reserved keywords.
+
+Instead, since an expression that attempts to call `Text` as a function is meaningless in Lux, as `Text`s are not functions; I thought it would be nice to then use that otherwise meaningless syntax by having `Text` literals name extensions.
+
+So, that's the story.
+
+Extensions are named by `Text` literals to avoid reserving identifiers as keywords, thereby protecting the programmer's freedom to name their definitions however they want.
+
+---
+
+Now that we've got the origin story out of the way, let's talk business.
+
+How can you install your own extensions?
+
+Well, the first thing to note is that there are different types of extensions.
+
+Remember what I said about the compiler doing different activities, such as type-checking, optimization and code-generation?
+
+Well, you can't really expect an extension meant for type-checking to work during code-generation.
+
+The work done on either phase would be too different to what was necessary for the other phase.
+
+And so, Lux provides 4 different types of extensions.
+
+ However, as far as this tutorial is concerned, we will only be covering 3 of them, as the 4th one is very different to the other 3 in what its purpose is and what you're supposed to do with it, and I'd feel more comfortable teaching it later, once I figure out a reasonable way for normal Lux programmers to make use of it.
+
+---
+
+The first type of extension we'll see is the `Analysis` extension:
+
+```clojure
+(.module:
+ [library
+ [lux "*"
+ [extension {"+" [analysis: synthesis: generation:]}]
+ ["@" target
+ ["." jvm]
+ ["." js]
+ ["." python]
+ ["." lua]
+ ["." ruby]]
+ [abstract
+ ["." monad {"+" [do]}]]
+ [control
+ ["<>" parser
+ ["<.>" code]
+ ["<.>" analysis]
+ ["<.>" synthesis]]]
+ [data
+ [collection
+ ["." row]]]
+ [tool
+ [compiler
+ ["." phase]
+ [language
+ [lux
+ ["." analysis]
+ ["." synthesis]
+ ["." directive]
+ [phase
+ [analysis
+ ["." type]]]]]]]]])
+
+(analysis: ("my triple" self phase archive [elementC <code>.any])
+ (do phase.monad
+ [[type elementA] (type.with_inference
+ (phase archive elementC))
+ _ (type.infer (.Tuple type type type))]
+ (in (analysis.tuple (list elementA elementA elementA)))))
+```
+
+If you want to write your own extensions, the first you'll want to do is import the `library/lux/extension` module.
+
+It contains macros for easily implementing extensions.
+
+These macros handle parsing the inputs to your extensions using the monadic parsing infrastructure Lux provides.
+
+Each type of extension takes a different type of input, and produces a different type of output.
+
+In the case of `Analysis` extensions, they take `(List Code)` as an input, and produce a single `Analysis` node as output.
+
+ By the way, _"analysis"_ is the name Lux gives to the process of type-checking.
+
+Here, we've got a _trivial_ extension where we take a single value, and we produce a triple of the same value.
+
+As you can see, we're doing some type-inferencing to first figure out the type of our input value, and then to signal to the compiler what the type of our `("my triple" ???)` ought to be.
+
+ Also, one thing all phases of the compiler (such as analysis) have in common is that they are instances of the `Phase` type, defined in `library/lux/tool/compiler/phase`.
+ That is why I make use of the `Monad` implementation for `Phase` in this example.
+
+Now, we have converted fairly exceptional code, using our `"my triple"` extension, into fairly normal code that Lux knows how to handle, which is just a 3-tuple of the same value.
+
+As you can probably guess, this great power comes with great responsibility.
+
+Since you are in total control of the type-checking that is happening, it is entirely possible to fool the compiler into believing the wrong things about your code.
+
+It is **very important** to be **careful**, when _implementing extensions_, that the output of those extensions is **correct in every situation**; because, _unlike with normal Lux code_, the compiler **cannot verify** that _your extension_ is not doing something that it shouldn't.
+
+I have gifted you _Pandora's box_.
+
+**DO NOT MAKE ME REGRET IT** ;)
+
+Also, you might have noticed that, besides the input code we're parsing, our extension is receiving 3 extra parameters:
+
+* `self`: This is just a `Text` that contains the name of the extension itself (in this case, the value `"my triple"`). It might seem redundant, but it can be useful to refer to the extension's name within its own implementation without having to constantly repeat the name literally.
+* `phase`: This is the Lux compiler's implementation of the phase an extension is part of (in this case, the `Analysis` phase). It allows you to process your inputs the same way the Lux compiler does, before doing something special with them (like triplicating them, as in this example).
+* `archive`: The `Archive` is a special data-structure used by the Lux compiler to store valuable information gathered during the compilation process. It is very important, but this might not be the best place to get into its relevance and what can be done with it. For now, just make sure to pass it around when invoking the `phase` function.
+
+---
+
+```clojure
+(synthesis: ("my quadruple" self phase archive [elementA <analysis>.any])
+ (do phase.monad
+ [elementS (phase archive elementA)]
+ (in (synthesis.tuple (list elementS elementS elementS elementS)))))
+```
+
+The `Synthesis` phase is where we do optimizations.
+
+`Synthesis` extensions take a `(List Analysis)` as input, and produce a single `Synthesis` node as output.
+
+Currently, the optimization infrastructure Lux provides is not very sophisticated, and much of it has yet to be properly exposed to programmers, so you'll probably not be working too much in this layer for now.
+
+However, I'd like to use this opportunity to point out that when Lux encounters a usage of an extension during any phase, and it does not know this extension, it just proceeds to process the parameters to the extension, and then hands over the extension call, with the processed parameters, to the next phase.
+
+As a consequence, we can write a `Synthesis` extension without having to write the preceeding `Analysis` extension, because we can trust Lux to handle things reasonably and then use our `Synthesis` extension when its turn comes up.
+
+---
+
+```clojure
+(analysis: ("my quintuple" self phase archive [elementC <code>.any])
+ (do phase.monad
+ [[type elementA] (type.with_inference
+ (phase archive elementC))
+ _ (type.infer (.Tuple type type type type type))]
+ (in (#analysis.Extension self (list elementA)))))
+
+(generation: ("my quintuple" self phase archive [elementS <synthesis>.any])
+ (do phase.monad
+ [elementG (phase archive elementS)]
+ (in (for {@.jvm (row.row (#jvm.Embedded elementG)
+ (#jvm.Stack #jvm.DUP)
+ (#jvm.Stack #jvm.DUP)
+ (#jvm.Stack #jvm.DUP)
+ (#jvm.Stack #jvm.DUP))
+ @.js (js.array (list elementG
+ elementG
+ elementG
+ elementG
+ elementG))}))))
+```
+
+Now, let's talk about the star of the show: _generation extensions_.
+
+ _Generation_ is just a short way of saying _code-generation_, and it's the part of the compiler that generates the actual output that you eventually execute as a program.
+
+Generation extensions take a `(List Synthesis)` as input, and produce _suitable code_ as output.
+
+Since Lux offers different compilers that target different platforms, it is impossible for this phase to produce a single type of output.
+
+Instead, the type of the output of generation extensions will depend on which compiler you're using.
+
+In this case, we're implementing an extension that only works on the JVM, and on JavaScript.
+
+In the case of the JVM, our output type is `library/lux/target/jvm.Bytecode`; and in the case of JavaScript, our output type is `library/lux/target/js.Expression`.
+
+I will not go into detail about the machinery in these modules, as that is what the documentation of the Standard Library is for.
+
+But, suffice it to say, that there are plenty of functions and useful machinery in there to write syntactically correct output code; and this is the same machinery that the Lux compiler itself uses, so you don't need to worry about your output being in any way different from what Lux itself produces.
+
+---
+
+My goal with extensions has been to take the ideas of Lisp and take them to their ultimate conclusions.
+
+To push what is possible as far as imagination can reach.
+
+If you have no clue what to do with this power, you are in good company.
+
+The tools at our disposal both enable, and limit, our imagination.
+
+If you have been using lisp languages for a while, you're probably well aware of the immense power that macros can provide.
+
+Sadly, most programmers are unfamiliar with macros, and many among them want to stay away from macros, because they fear that all that power will be abused and get out of hand.
+
+They are afraid of power because they never learned how to use it.
+
+Even we lispers have been denied the power to completely control the behavior of our compilers, and so we do not know what's possible and what amazing progress can be made with these tools.
+
+It is my hope that now that I have exposed the means to control and extend the compiler in these new directions, brilliant minds will seize this opportunity to discover new means to extend the power of programmers.
+
+Perhaps you, _my dear reader_, will be one such mind.
+
+Before you close this book, you might want to read [the last few words I've got to offer](conclusion.md).
+
diff --git a/documentation/book/the_lux_programming_language/index.md b/documentation/book/the_lux_programming_language/index.md
index 6242b7dba..1edc17559 100644
--- a/documentation/book/the_lux_programming_language/index.md
+++ b/documentation/book/the_lux_programming_language/index.md
@@ -35,6 +35,8 @@
_Where you will learn how to avoid annoying bug reports._
* [Chapter 17: Cross-platform Lux](chapter_17.md)
_Where you will sail to exotic foreign platforms on the S.S. Lux._
+* [Chapter 18: Extensions](chapter_18.md)
+ _Where you will teach new tricks to an old compiler._
* [Conclusion](conclusion.md)
* [Appendix A: Import syntax](appendix_a.md)
* [Appendix B: Math](appendix_b.md)
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)