aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--documentation/bookmark/artificial_intelligence/machine_learning.md13
-rw-r--r--documentation/bookmark/business/hiring/remote.md5
-rw-r--r--documentation/bookmark/coding_style.md1
-rw-r--r--documentation/bookmark/compilation/target/js__javascript.md4
-rw-r--r--documentation/bookmark/compilation/target/jvm.md12
-rw-r--r--documentation/bookmark/documentation.md1
-rw-r--r--documentation/bookmark/open_source.md1
-rw-r--r--documentation/bookmark/open_source/commercialization.md1
-rw-r--r--documentation/bookmark/operating_system/shell.md5
-rw-r--r--documentation/bookmark/tool/search.md14
-rw-r--r--documentation/bookmark/tool/text_editor.md16
-rw-r--r--documentation/bookmark/tool/text_editor/structured.md18
-rw-r--r--documentation/bookmark/user_interface/dashboard.md5
-rw-r--r--stdlib/source/documentation/lux/meta.lux317
-rw-r--r--stdlib/source/documentation/lux/meta/code.lux192
-rw-r--r--stdlib/source/documentation/lux/meta/compiler/language/lux/analysis.lux172
-rw-r--r--stdlib/source/documentation/lux/meta/compiler/language/lux/declaration.lux49
-rw-r--r--stdlib/source/documentation/lux/meta/compiler/language/lux/generation.lux103
-rw-r--r--stdlib/source/documentation/lux/meta/compiler/language/lux/synthesis.lux257
-rw-r--r--stdlib/source/documentation/lux/meta/compiler/phase.lux43
-rw-r--r--stdlib/source/documentation/lux/meta/extension.lux47
-rw-r--r--stdlib/source/documentation/lux/meta/location.lux31
-rw-r--r--stdlib/source/documentation/lux/meta/macro.lux158
-rw-r--r--stdlib/source/documentation/lux/meta/macro/local.lux31
-rw-r--r--stdlib/source/documentation/lux/meta/macro/syntax.lux65
-rw-r--r--stdlib/source/documentation/lux/meta/macro/syntax/check.lux23
-rw-r--r--stdlib/source/documentation/lux/meta/macro/syntax/declaration.lux31
-rw-r--r--stdlib/source/documentation/lux/meta/macro/syntax/definition.lux35
-rw-r--r--stdlib/source/documentation/lux/meta/macro/syntax/export.lux21
-rw-r--r--stdlib/source/documentation/lux/meta/macro/syntax/input.lux25
-rw-r--r--stdlib/source/documentation/lux/meta/macro/syntax/type/variable.lux25
-rw-r--r--stdlib/source/documentation/lux/meta/macro/template.lux97
-rw-r--r--stdlib/source/documentation/lux/meta/static.lux81
-rw-r--r--stdlib/source/documentation/lux/meta/symbol.lux27
-rw-r--r--stdlib/source/documentation/lux/meta/target.lux53
-rw-r--r--stdlib/source/documentation/lux/meta/target/js.lux171
-rw-r--r--stdlib/source/documentation/lux/meta/target/jvm/type.lux95
-rw-r--r--stdlib/source/documentation/lux/meta/target/jvm/type/alias.lux19
-rw-r--r--stdlib/source/documentation/lux/meta/target/jvm/type/box.lux29
-rw-r--r--stdlib/source/documentation/lux/meta/target/jvm/type/category.lux39
-rw-r--r--stdlib/source/documentation/lux/meta/target/jvm/type/descriptor.lux63
-rw-r--r--stdlib/source/documentation/lux/meta/target/jvm/type/lux.lux35
-rw-r--r--stdlib/source/documentation/lux/meta/target/jvm/type/parser.lux85
-rw-r--r--stdlib/source/documentation/lux/meta/target/jvm/type/reflection.lux53
-rw-r--r--stdlib/source/documentation/lux/meta/target/jvm/type/signature.lux75
-rw-r--r--stdlib/source/documentation/lux/meta/target/lua.lux161
-rw-r--r--stdlib/source/documentation/lux/meta/target/python.lux201
-rw-r--r--stdlib/source/documentation/lux/meta/target/ruby.lux203
-rw-r--r--stdlib/source/documentation/lux/meta/type.lux506
-rw-r--r--stdlib/source/documentation/lux/meta/type/check.lux137
-rw-r--r--stdlib/source/documentation/lux/meta/type/dynamic.lux37
-rw-r--r--stdlib/source/documentation/lux/meta/type/implicit.lux81
-rw-r--r--stdlib/source/documentation/lux/meta/type/poly.lux21
-rw-r--r--stdlib/source/documentation/lux/meta/type/primitive.lux217
-rw-r--r--stdlib/source/documentation/lux/meta/type/quotient.lux67
-rw-r--r--stdlib/source/documentation/lux/meta/type/refinement.lux85
-rw-r--r--stdlib/source/documentation/lux/meta/type/resource.lux175
-rw-r--r--stdlib/source/documentation/lux/meta/type/unit.lux127
-rw-r--r--stdlib/source/documentation/lux/meta/type/variance.lux25
-rw-r--r--stdlib/source/library/lux/test.lux35
-rw-r--r--stdlib/source/library/lux/test/tally.lux45
-rw-r--r--stdlib/source/library/lux/test/unit.lux57
-rw-r--r--stdlib/source/test/lux/test.lux103
63 files changed, 2531 insertions, 2395 deletions
diff --git a/documentation/bookmark/artificial_intelligence/machine_learning.md b/documentation/bookmark/artificial_intelligence/machine_learning.md
index 0487c5626..69d028aa9 100644
--- a/documentation/bookmark/artificial_intelligence/machine_learning.md
+++ b/documentation/bookmark/artificial_intelligence/machine_learning.md
@@ -1,15 +1,22 @@
# Transformer
+0. []()
0. [Transformers from scratch](http://www.peterbloem.nl/blog/transformers)
# Exemplar
+0. []()
0. https://ml5js.org/
0. https://www.csie.ntu.edu.tw/~cjlin/libsvm/
0. http://halide-lang.org/
# Reference
+0. []()
+0. [Predibase: Declarative ML](https://predibase.com/)
+ 0. [ludwig: Data-centric declarative deep learning framework](https://github.com/ludwig-ai/ludwig)
+ 0. [horovod: Distributed training framework for TensorFlow, Keras, PyTorch, and Apache MXNet.](https://github.com/horovod/horovod)
+0. [AutoML: Automated Machine Learning](https://www.automl.org/automl/)
0. [Why are ML Compilers so Hard?](https://petewarden.com/2021/12/24/why-are-ml-compilers-so-hard/)
0. ["Multi-Level Intermediate Representation" Compiler Infrastructure](https://github.com/tensorflow/mlir)
0. [Sampling can be faster than optimization](https://www.pnas.org/content/116/42/20881)
@@ -31,10 +38,12 @@
# Inductive logic programming
+0. []()
0. [Inductive logic programming at 30: a new introduction](https://arxiv.org/abs/2008.07912)
# Deep learning
+0. []()
0. [GAME2020 4. Dr. Vincent Nozick Geometric Neurons](https://www.youtube.com/watch?v=KC3c_Mdj1dk)
0. [Evolution Strategies](https://lilianweng.github.io/lil-log/2019/09/05/evolution-strategies.html)
0. [Monadic Deep Learning: Performing monadic automatic differentiation in parallel](https://deeplearning.thoughtworks.school/assets/paper.pdf)
@@ -51,20 +60,24 @@
# Tensor
+0. []()
0. http://nlp.seas.harvard.edu/NamedTensor.html
0. http://nlp.seas.harvard.edu/NamedTensor2
# Meta-learning
+0. []()
0. https://blog.fastforwardlabs.com/2019/05/22/metalearners-learning-how-to-learn.html
0. https://www.bayeswatch.com/2018/11/30/HTYM/
0. https://bender.dreem.com/
# Model
+0. []()
0. http://onnx.ai/
# Training
+0. []()
0. https://ai.googleblog.com/2019/03/introducing-gpipe-open-source-library.html
diff --git a/documentation/bookmark/business/hiring/remote.md b/documentation/bookmark/business/hiring/remote.md
new file mode 100644
index 000000000..3ca9e4bde
--- /dev/null
+++ b/documentation/bookmark/business/hiring/remote.md
@@ -0,0 +1,5 @@
+# Reference
+
+0. []()
+0. [11 Reasons Remote Workers Are Choosing To Relocate](https://medium.com/@dantin1/11-reasons-remote-workers-are-choosing-to-relocate-2df44f956b6a)
+
diff --git a/documentation/bookmark/coding_style.md b/documentation/bookmark/coding_style.md
index 6df265f00..92a7719c5 100644
--- a/documentation/bookmark/coding_style.md
+++ b/documentation/bookmark/coding_style.md
@@ -1,6 +1,7 @@
# Reference
0. []()
+0. [A Guide to Naming Variables](https://a-nickels-worth.blogspot.com/2016/04/a-guide-to-naming-variables.html)
0. [the gizmo's role in markup](https://t-ravis.com/post/doc/the_gizmos_role_in_markup/)
0. [the hard problem: naming functions and other gizmos](https://t-ravis.com/post/doc/naming_functions_methods_and_other_gizmos/)
0. [WHAT functions and WHY functions](https://t-ravis.com/post/doc/what_functions_and_why_functions/)
diff --git a/documentation/bookmark/compilation/target/js__javascript.md b/documentation/bookmark/compilation/target/js__javascript.md
index e345bf4c4..6655cfa61 100644
--- a/documentation/bookmark/compilation/target/js__javascript.md
+++ b/documentation/bookmark/compilation/target/js__javascript.md
@@ -1,14 +1,18 @@
# Reference
+0. []()
+0. [Roll your own JavaScript runtime](https://deno.com/blog/roll-your-own-javascript-runtime)
0. [How JavaScript Array Works Internally?](https://blog.gauravthakur.in/how-javascript-array-works-internally)
0. [Maybe you don't need Rust and WASM to speed up your JS ](https://mrale.ph/blog/2018/02/03/maybe-you-dont-need-rust-to-speed-up-your-js.html)
# Debugging
+0. []()
0. [The JavaScript Self-Profiling API](https://addyosmani.com/blog/js-self-profiling/)
# Number
+0. []()
0. [BigInt: arbitrary-precision integers in JavaScript](https://v8.dev/features/bigint)
0. [WebAssembly integration with JavaScript BigInt](https://v8.dev/features/wasm-bigint)
diff --git a/documentation/bookmark/compilation/target/jvm.md b/documentation/bookmark/compilation/target/jvm.md
index 4ea87de28..6e7a0831f 100644
--- a/documentation/bookmark/compilation/target/jvm.md
+++ b/documentation/bookmark/compilation/target/jvm.md
@@ -1,8 +1,10 @@
# Reference
-1. [Journey to the Centre of the JVM — Daniel Spiewak](https://www.youtube.com/watch?v=EFkpmFt61Jo)
-1. [String concatenation, redux](https://cl4es.github.io/2019/05/14/String-Concat-Redux.html)
-1. [Beware of computation in static initializer](https://pangin.pro/posts/computation-in-static-initializer)
-1. [JVM Internals](https://blog.jamesdbloom.com/JVMInternals.html)
-1. [JVM Anatomy Quarks](https://shipilev.net/jvm/anatomy-quarks/)
+0. []()
+0. [Turn any Java program into a self-contained EXE](https://mccue.dev/pages/7-28-22-make-an-exe)
+0. [Journey to the Centre of the JVM — Daniel Spiewak](https://www.youtube.com/watch?v=EFkpmFt61Jo)
+0. [String concatenation, redux](https://cl4es.github.io/2019/05/14/String-Concat-Redux.html)
+0. [Beware of computation in static initializer](https://pangin.pro/posts/computation-in-static-initializer)
+0. [JVM Internals](https://blog.jamesdbloom.com/JVMInternals.html)
+0. [JVM Anatomy Quarks](https://shipilev.net/jvm/anatomy-quarks/)
diff --git a/documentation/bookmark/documentation.md b/documentation/bookmark/documentation.md
index 97b9ec1bd..ae2327158 100644
--- a/documentation/bookmark/documentation.md
+++ b/documentation/bookmark/documentation.md
@@ -66,6 +66,7 @@
# Reference
0. []()
+0. [Typst: Compose papers faster](https://typst.app/)
0. [Mintlify Writer](https://www.mintlify.com/writer)
0. [TimelineJS: Easy-to-make, beautiful timelines.](http://timeline.knightlab.com/)
0. [Introduction to the Zettelkasten Method](https://zettelkasten.de/introduction/)
diff --git a/documentation/bookmark/open_source.md b/documentation/bookmark/open_source.md
index a2f0da365..db237a9f8 100644
--- a/documentation/bookmark/open_source.md
+++ b/documentation/bookmark/open_source.md
@@ -1,6 +1,7 @@
# Reference
0. []()
+0. [Open Source Explained](https://blog.erlend.sh/open-source-explained)
0. [Trust Signals in Open Source Projects](https://hackernoon.com/the-signs-of-a-great-open-source-project)
0. [Awesome OSS Monetization](https://paydevs.github.io/awesome-oss-monetization/)
0. [Open Source Guides](https://opensource.guide/)
diff --git a/documentation/bookmark/open_source/commercialization.md b/documentation/bookmark/open_source/commercialization.md
index 2afcb3506..839b555b1 100644
--- a/documentation/bookmark/open_source/commercialization.md
+++ b/documentation/bookmark/open_source/commercialization.md
@@ -1,5 +1,6 @@
# Reference
0. []()
+0. [The Future of Open Source, or Why Open Core Is Dead](https://thenewstack.io/the-future-of-open-source-or-why-open-core-is-dead/)
0. [Better Than Free](https://kk.org/thetechnium/better-than-fre/)
diff --git a/documentation/bookmark/operating_system/shell.md b/documentation/bookmark/operating_system/shell.md
new file mode 100644
index 000000000..1c858e5b5
--- /dev/null
+++ b/documentation/bookmark/operating_system/shell.md
@@ -0,0 +1,5 @@
+# Reference
+
+0. []()
+0. [ShellHacks: Command-Line Tips and Tricks](https://www.shellhacks.com/)
+
diff --git a/documentation/bookmark/tool/search.md b/documentation/bookmark/tool/search.md
index 4ee62d626..b2898552d 100644
--- a/documentation/bookmark/tool/search.md
+++ b/documentation/bookmark/tool/search.md
@@ -1,9 +1,11 @@
# Semantic search
-1. [Query Source Code with Tree-sitter](https://noreasontopanic.substack.com/p/querying-source-code-with-tree-sitter)
-1. https://tree-sitter.github.io/tree-sitter/using-parsers#query-syntax
-1. https://github.com/askgitdev/askgit
-1. [The SOUL program query language](http://soft.vub.ac.be/SOUL/)
-1. [Git - how do I view the change history of a method/function?](https://stackoverflow.com/questions/4781405/git-how-do-i-view-the-change-history-of-a-method-function)
-1. https://github.com/returntocorp/semgrep
+0. []()
+0. [meilisearch](https://www.meilisearch.com/)
+0. [Query Source Code with Tree-sitter](https://noreasontopanic.substack.com/p/querying-source-code-with-tree-sitter)
+0. https://tree-sitter.github.io/tree-sitter/using-parsers#query-syntax
+0. https://github.com/askgitdev/askgit
+0. [The SOUL program query language](http://soft.vub.ac.be/SOUL/)
+0. [Git - how do I view the change history of a method/function?](https://stackoverflow.com/questions/4781405/git-how-do-i-view-the-change-history-of-a-method-function)
+0. https://github.com/returntocorp/semgrep
diff --git a/documentation/bookmark/tool/text_editor.md b/documentation/bookmark/tool/text_editor.md
index 623e0f0cd..0f087cc79 100644
--- a/documentation/bookmark/tool/text_editor.md
+++ b/documentation/bookmark/tool/text_editor.md
@@ -233,22 +233,6 @@
0. https://tratt.net/laurie/blog/entries/an_editor_for_composed_programs.html
0. [Hjalfi makes smalltalk (in Javascript)](https://www.youtube.com/watch?v=JDunc6Cr7YQ)
-## Structured editing
-
-0. [The Animated Guide to Symex](https://countvajhula.com/2021/09/25/the-animated-guide-to-symex/)
-0. [Leo](https://www.leoeditor.com/)
-0. [Inspiring a future Clojure editor with forgotten Lisp UX - Shaun Lebron](https://www.youtube.com/watch?v=K0Tsa3smr1w)
-0. [Dion Systems - The How And Why Of Reinventing The Wheel](https://vimeo.com/485177664)
-0. [Towards Tactic Metaprogramming in Haskell](https://reasonablypolymorphic.com/blog/towards-tactics/index.html)
-0. https://github.com/Raathigesh/waypoint
-0. [Going beyond regular expressions with structural code search](https://about.sourcegraph.com/blog/going-beyond-regular-expressions-with-structural-code-search)
-0. [俺のlisp](https://github.com/illiichi/orenolisp)
-0. [豆腐 (Tofu): meaningful code editing](https://gregoor.github.io/tofu/)
-0. [Tiled Text](http://www.tiledtext.com/projects/tiledtext)
-0. [Deuce: A Lightweight User Interface for Structured Editing](https://arxiv.org/abs/1707.00015)
-0. ["Structured Editing for Elm* in Elm" by Ravi Chugh](https://www.youtube.com/watch?v=-TFL6E1uSHE)
-0. [The TeXmacs user interface and structured text editing](https://www.youtube.com/watch?v=Sc55nOSN0kQ)
-
## Tree editor
0. http://justinpombrio.net/tree-editors/survey.html
diff --git a/documentation/bookmark/tool/text_editor/structured.md b/documentation/bookmark/tool/text_editor/structured.md
new file mode 100644
index 000000000..d2e7fd779
--- /dev/null
+++ b/documentation/bookmark/tool/text_editor/structured.md
@@ -0,0 +1,18 @@
+# Reference
+
+0. []()
+0. [Restructuring Structure Editing](https://tylr.fun/essay/)
+0. [The Animated Guide to Symex](https://countvajhula.com/2021/09/25/the-animated-guide-to-symex/)
+0. [Leo](https://www.leoeditor.com/)
+0. [Inspiring a future Clojure editor with forgotten Lisp UX - Shaun Lebron](https://www.youtube.com/watch?v=K0Tsa3smr1w)
+0. [Dion Systems - The How And Why Of Reinventing The Wheel](https://vimeo.com/485177664)
+0. [Towards Tactic Metaprogramming in Haskell](https://reasonablypolymorphic.com/blog/towards-tactics/index.html)
+0. https://github.com/Raathigesh/waypoint
+0. [Going beyond regular expressions with structural code search](https://about.sourcegraph.com/blog/going-beyond-regular-expressions-with-structural-code-search)
+0. [俺のlisp](https://github.com/illiichi/orenolisp)
+0. [豆腐 (Tofu): meaningful code editing](https://gregoor.github.io/tofu/)
+0. [Tiled Text](http://www.tiledtext.com/projects/tiledtext)
+0. [Deuce: A Lightweight User Interface for Structured Editing](https://arxiv.org/abs/1707.00015)
+0. ["Structured Editing for Elm* in Elm" by Ravi Chugh](https://www.youtube.com/watch?v=-TFL6E1uSHE)
+0. [The TeXmacs user interface and structured text editing](https://www.youtube.com/watch?v=Sc55nOSN0kQ)
+
diff --git a/documentation/bookmark/user_interface/dashboard.md b/documentation/bookmark/user_interface/dashboard.md
new file mode 100644
index 000000000..8365d246c
--- /dev/null
+++ b/documentation/bookmark/user_interface/dashboard.md
@@ -0,0 +1,5 @@
+# Reference
+
+0. []()
+0. [Tabler: A premium and open source dashboard template with a responsive and high-quality UI.](https://github.com/tabler/tabler)
+
diff --git a/stdlib/source/documentation/lux/meta.lux b/stdlib/source/documentation/lux/meta.lux
index 42e917dd5..df0c93de6 100644
--- a/stdlib/source/documentation/lux/meta.lux
+++ b/stdlib/source/documentation/lux/meta.lux
@@ -6,7 +6,7 @@
["[0]" text (.only \n)
["%" \\format (.only format)]]
[collection
- ["[0]" list]]]]]
+ ["[0]" list (.use "[1]#[0]" monoid)]]]]]
[\\library
["[0]" /]]
["[0]" /
@@ -27,8 +27,8 @@
["[1][0]" generation]
["[1][0]" synthesis]]]]])
-(.def /compiler
- (.List $.Module)
+(def /compiler
+ (List $.Documentation)
(list.together
(list /compiler/phase.documentation
/compiler/analysis.documentation
@@ -37,161 +37,166 @@
/compiler/synthesis.documentation
)))
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- "Functions for extracting information from the state of the compiler."
- [($.definition /.functor)
- ($.definition /.apply)
- ($.definition /.monad)
- ($.definition /.lifted)
- ($.definition /.try)
+(def .public documentation
+ (List $.Documentation)
+ (list.partial ($.module /._
+ "Functions for extracting information from the state of the compiler.")
- ($.definition /.result'
- (format "Evaluates a computation that depends on Lux's compiler state."
- \n "Also returns a (potentially modified) compiler state.")
- [(result' lux action)])
-
- ($.definition /.result
- "Evaluates a computation that depends on Lux's compiler state."
- [(result lux action)])
-
- ($.definition /.either
- "Pick whichever computation succeeds."
- [(either left right)])
-
- ($.definition /.assertion
- "Fails with the given message if the test is #0."
- [(assertion message test)])
-
- ($.definition /.failure
- "Fails with the given error message."
- [(failure error)])
-
- ($.definition /.module
- "Looks-up a module with the given name."
- [(module name)])
-
- ($.definition /.current_module_name
- "The name of the module currently being compiled, if any.")
+ ($.definition /.functor)
+ ($.definition /.apply)
+ ($.definition /.monad)
+ ($.definition /.lifted)
+ ($.definition /.try)
- ($.definition /.current_module
- "The module currently being compiled, if any.")
+ ($.definition /.result'
+ (format "Evaluates a computation that depends on Lux's compiler state."
+ \n "Also returns a (potentially modified) compiler state.")
+ [(result' lux action)])
- ($.definition /.normal
- (format "If given a name without a module prefix, gives it the current module's name as prefix."
- \n "Otherwise, returns the name as-is.")
- [(normal name)])
+ ($.definition /.result
+ "Evaluates a computation that depends on Lux's compiler state."
+ [(result lux action)])
- ($.definition /.macro
- "Looks-up a macro known by the given name."
- [(macro full_name)])
+ ($.definition /.either
+ "Pick whichever computation succeeds."
+ [(either left right)])
- ($.definition /.seed
- (format "The current value of a number tracked by the compiler."
- \n "Also increases the value, so it's different next time it is seen."
- \n "This number can be used for generating data 'randomly' during compilation."))
-
- ($.definition /.module_exists?
- ""
- [(module_exists? module)])
-
- ($.definition /.var_type
- "Looks-up the type of a local variable somewhere in the environment."
- [(var_type name)])
-
- ($.definition /.definition
- "Looks-up a definition's whole data in the available modules (including the current one)."
- [(definition name)])
-
- ($.definition /.export
- (format "Looks-up a definition in the available modules (including the current one)."
- \n "The look-up only succeeds if the definition has been exported.")
- [(export name)])
-
- ($.definition /.definition_type
- "Looks-up a definition's type in the available modules (including the current one)."
- [(definition_type name)])
-
- ($.definition /.type
- "Looks-up the type of either a local variable or a definition."
- [(type name)])
-
- ($.definition /.type_definition
- "Finds the value of a type definition (such as Int, Any or Lux)."
- [(type_definition name)])
-
- ($.definition /.globals
- "The entire list of globals in a module (including the non-exported/private ones)."
- [(globals module)])
-
- ($.definition /.definitions
- "The entire list of definitions in a module (including the non-exported/private ones)."
- [(definitions module)])
-
- ($.definition /.exports
- "All the exported definitions in a module."
- [(exports module_name)])
-
- ($.definition /.modules
- "All the available modules (including the current one).")
-
- ($.definition /.tags_of
- "All the tags associated with a type definition."
- [(tags_of type_name)])
-
- ($.definition /.location
- "The location of the current expression being analyzed.")
-
- ($.definition /.expected_type
- "The expected type of the current expression being analyzed.")
-
- ($.definition /.imported_modules
- "All the modules imported by a specified module."
- [(imported_modules module_name)])
-
- ($.definition /.imported_by?
- ""
- [(imported_by? import module)])
-
- ($.definition /.imported?
- "Checks if the given module has been imported by the current module."
- [(imported? import)])
-
- ($.definition /.tag
- "Given a tag, finds out what is its index, its related tag-list and its associated type."
- [(tag tag_name)])
-
- ($.definition /.slot
- "Given a slot, finds out what is its index, its related slot-list and its associated type."
- [(slot slot_name)])
-
- ($.definition /.tag_lists
- "All the tag-lists defined in a module, with their associated types."
- [(tag_lists module)])
-
- ($.definition /.locals
- "All the local variables currently in scope, separated in different scopes.")
-
- ($.definition /.de_aliased
- "Given an aliased definition's name, returns the original definition being referenced."
- [(de_aliased def_name)])
-
- ($.definition /.compiler_state
- "Obtains the current state of the compiler.")
-
- ($.definition /.type_context
- "The current type-checking context.")
-
- ($.definition /.eval
- ""
- [(eval type code)])]
- [/code.documentation
- /location.documentation
- /symbol.documentation
- /type.documentation
- /macro.documentation
- /static.documentation
- /extension.documentation
- /target.documentation
- ../compiler]))
+ ($.definition /.assertion
+ "Fails with the given message if the test is #0."
+ [(assertion message test)])
+
+ ($.definition /.failure
+ "Fails with the given error message."
+ [(failure error)])
+
+ ($.definition /.module
+ "Looks-up a module with the given name."
+ [(module name)])
+
+ ($.definition /.current_module_name
+ "The name of the module currently being compiled, if any.")
+
+ ($.definition /.current_module
+ "The module currently being compiled, if any.")
+
+ ($.definition /.normal
+ (format "If given a name without a module prefix, gives it the current module's name as prefix."
+ \n "Otherwise, returns the name as-is.")
+ [(normal name)])
+
+ ($.definition /.macro
+ "Looks-up a macro known by the given name."
+ [(macro full_name)])
+
+ ($.definition /.seed
+ (format "The current value of a number tracked by the compiler."
+ \n "Also increases the value, so it's different next time it is seen."
+ \n "This number can be used for generating data 'randomly' during compilation."))
+
+ ($.definition /.module_exists?
+ ""
+ [(module_exists? module)])
+
+ ($.definition /.var_type
+ "Looks-up the type of a local variable somewhere in the environment."
+ [(var_type name)])
+
+ ($.definition /.definition
+ "Looks-up a definition's whole data in the available modules (including the current one)."
+ [(definition name)])
+
+ ($.definition /.export
+ (format "Looks-up a definition in the available modules (including the current one)."
+ \n "The look-up only succeeds if the definition has been exported.")
+ [(export name)])
+
+ ($.definition /.definition_type
+ "Looks-up a definition's type in the available modules (including the current one)."
+ [(definition_type name)])
+
+ ($.definition /.type
+ "Looks-up the type of either a local variable or a definition."
+ [(type name)])
+
+ ($.definition /.type_definition
+ "Finds the value of a type definition (such as Int, Any or Lux)."
+ [(type_definition name)])
+
+ ($.definition /.globals
+ "The entire list of globals in a module (including the non-exported/private ones)."
+ [(globals module)])
+
+ ($.definition /.definitions
+ "The entire list of definitions in a module (including the non-exported/private ones)."
+ [(definitions module)])
+
+ ($.definition /.exports
+ "All the exported definitions in a module."
+ [(exports module_name)])
+
+ ($.definition /.modules
+ "All the available modules (including the current one).")
+
+ ($.definition /.tags_of
+ "All the tags associated with a type definition."
+ [(tags_of type_name)])
+
+ ($.definition /.location
+ "The location of the current expression being analyzed.")
+
+ ($.definition /.expected_type
+ "The expected type of the current expression being analyzed.")
+
+ ($.definition /.imported_modules
+ "All the modules imported by a specified module."
+ [(imported_modules module_name)])
+
+ ($.definition /.imported_by?
+ ""
+ [(imported_by? import module)])
+
+ ($.definition /.imported?
+ "Checks if the given module has been imported by the current module."
+ [(imported? import)])
+
+ ($.definition /.tag
+ "Given a tag, finds out what is its index, its related tag-list and its associated type."
+ [(tag tag_name)])
+
+ ($.definition /.slot
+ "Given a slot, finds out what is its index, its related slot-list and its associated type."
+ [(slot slot_name)])
+
+ ($.definition /.tag_lists
+ "All the tag-lists defined in a module, with their associated types."
+ [(tag_lists module)])
+
+ ($.definition /.locals
+ "All the local variables currently in scope, separated in different scopes.")
+
+ ($.definition /.de_aliased
+ "Given an aliased definition's name, returns the original definition being referenced."
+ [(de_aliased def_name)])
+
+ ($.definition /.compiler_state
+ "Obtains the current state of the compiler.")
+
+ ($.definition /.type_context
+ "The current type-checking context.")
+
+ ($.definition /.eval
+ ""
+ [(eval type code)])
+
+ (all list#composite
+ /code.documentation
+ /location.documentation
+ /symbol.documentation
+ /type.documentation
+ /macro.documentation
+ /static.documentation
+ /extension.documentation
+ /target.documentation
+ ../compiler
+ )
+ ))
diff --git a/stdlib/source/documentation/lux/meta/code.lux b/stdlib/source/documentation/lux/meta/code.lux
index ebba6189a..65e083e02 100644
--- a/stdlib/source/documentation/lux/meta/code.lux
+++ b/stdlib/source/documentation/lux/meta/code.lux
@@ -14,97 +14,101 @@
[\\library
["[0]" /]])
-(`` (.def \\parser
- (.List $.Module)
- ($.module \\parser._
- ""
- [($.definition (\\parser.Parser it)
- "A Lux code parser.")
-
- ($.definition \\parser.any
- "Yields the next input without applying any logic.")
-
- (,, (with_template [<query> <check>]
- [(`` ($.definition <query>
- (format "Parses the next " (,, (template.text [<query>])) " input.")))
- (`` ($.definition <check>
- (format "Checks for a specific " (,, (template.text [<query>])) " input.")))]
-
- [\\parser.bit \\parser.this_bit]
- [\\parser.nat \\parser.this_nat]
- [\\parser.int \\parser.this_int]
- [\\parser.rev \\parser.this_rev]
- [\\parser.frac \\parser.this_frac]
- [\\parser.text \\parser.this_text]
- [\\parser.symbol \\parser.this_symbol]
- ))
-
- ($.definition \\parser.this
- "Ensures the given Code is the next input."
- [(this code)])
-
- (,, (with_template [<query> <check> <desc>]
- [($.definition <query>
- (format "Parse a local " <desc> " (a " <desc> " that has no module prefix)."))
- ($.definition <check>
- (format "Checks for a specific local " <desc> " (a " <desc> " that has no module prefix)."))]
-
- [\\parser.local \\parser.this_local "local symbol"]
- ))
-
- (,, (with_template [<name>]
- [(`` ($.definition <name>
- (format "Parses the contents of a " (,, (template.text [<name>])) ".")))]
-
- [\\parser.form]
- [\\parser.variant]
- [\\parser.tuple]
- ))
-
- ($.definition \\parser.end
- "Verifies there are no more inputs.")
-
- ($.definition \\parser.end?
- "Checks whether there are no more inputs.")
-
- ($.definition \\parser.result
- "Executes a parser against a stream of code, and verifies all the inputs are consumed."
- [(result parser inputs)])
-
- ($.definition \\parser.locally
- "Runs parser against the given list of inputs."
- [(locally inputs parser)])
-
- ($.definition \\parser.not
- "Yields the next Code token if the parser fails."
- [(not expected_to_fail)])
-
- ($.definition \\parser.next
- "Yields the next Code token without consuming it from the input stream.")]
- [])))
-
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.bit)
- ($.definition /.nat)
- ($.definition /.int)
- ($.definition /.rev)
- ($.definition /.frac)
- ($.definition /.text)
- ($.definition /.symbol)
- ($.definition /.form)
- ($.definition /.variant)
- ($.definition /.tuple)
-
- ($.definition /.equivalence)
- ($.definition /.format)
-
- ($.definition /.local
- "Produces a local symbol (an symbol with no module prefix).")
-
- ($.definition /.replaced
- ""
- [(replaced original substitute ast)])]
- [..\\parser]))
+(`` (def \\parser
+ (List $.Documentation)
+ (list ($.module \\parser._
+ "")
+
+ ($.definition (\\parser.Parser it)
+ "A Lux code parser.")
+
+ ($.definition \\parser.any
+ "Yields the next input without applying any logic.")
+
+ (,, (with_template [<query> <check>]
+ [(`` ($.definition <query>
+ (format "Parses the next " (,, (template.text [<query>])) " input.")))
+ (`` ($.definition <check>
+ (format "Checks for a specific " (,, (template.text [<query>])) " input.")))]
+
+ [\\parser.bit \\parser.this_bit]
+ [\\parser.nat \\parser.this_nat]
+ [\\parser.int \\parser.this_int]
+ [\\parser.rev \\parser.this_rev]
+ [\\parser.frac \\parser.this_frac]
+ [\\parser.text \\parser.this_text]
+ [\\parser.symbol \\parser.this_symbol]
+ ))
+
+ ($.definition \\parser.this
+ "Ensures the given Code is the next input."
+ [(this code)])
+
+ (,, (with_template [<query> <check> <desc>]
+ [($.definition <query>
+ (format "Parse a local " <desc> " (a " <desc> " that has no module prefix)."))
+ ($.definition <check>
+ (format "Checks for a specific local " <desc> " (a " <desc> " that has no module prefix)."))]
+
+ [\\parser.local \\parser.this_local "local symbol"]
+ ))
+
+ (,, (with_template [<name>]
+ [(`` ($.definition <name>
+ (format "Parses the contents of a " (,, (template.text [<name>])) ".")))]
+
+ [\\parser.form]
+ [\\parser.variant]
+ [\\parser.tuple]
+ ))
+
+ ($.definition \\parser.end
+ "Verifies there are no more inputs.")
+
+ ($.definition \\parser.end?
+ "Checks whether there are no more inputs.")
+
+ ($.definition \\parser.result
+ "Executes a parser against a stream of code, and verifies all the inputs are consumed."
+ [(result parser inputs)])
+
+ ($.definition \\parser.locally
+ "Runs parser against the given list of inputs."
+ [(locally inputs parser)])
+
+ ($.definition \\parser.not
+ "Yields the next Code token if the parser fails."
+ [(not expected_to_fail)])
+
+ ($.definition \\parser.next
+ "Yields the next Code token without consuming it from the input stream.")
+ )))
+
+(def .public documentation
+ (List $.Documentation)
+ (list.partial ($.module /._
+ "")
+
+ ($.definition /.bit)
+ ($.definition /.nat)
+ ($.definition /.int)
+ ($.definition /.rev)
+ ($.definition /.frac)
+ ($.definition /.text)
+ ($.definition /.symbol)
+ ($.definition /.form)
+ ($.definition /.variant)
+ ($.definition /.tuple)
+
+ ($.definition /.equivalence)
+ ($.definition /.format)
+
+ ($.definition /.local
+ "Produces a local symbol (an symbol with no module prefix).")
+
+ ($.definition /.replaced
+ ""
+ [(replaced original substitute ast)])
+
+ ..\\parser
+ ))
diff --git a/stdlib/source/documentation/lux/meta/compiler/language/lux/analysis.lux b/stdlib/source/documentation/lux/meta/compiler/language/lux/analysis.lux
index 5069f761c..45d71946e 100644
--- a/stdlib/source/documentation/lux/meta/compiler/language/lux/analysis.lux
+++ b/stdlib/source/documentation/lux/meta/compiler/language/lux/analysis.lux
@@ -14,96 +14,100 @@
[\\library
["[0]" /]])
-(`` (.def \\parser
- (.List $.Module)
- ($.module \\parser._
- ""
- [($.definition \\parser.cannot_parse)
- ($.definition \\parser.unconsumed_input)
+(`` (def \\parser
+ (List $.Documentation)
+ (list ($.module \\parser._
+ "")
- ($.definition (\\parser.Parser it)
- "A parser for Lux code analysis nodes.")
+ ($.definition \\parser.cannot_parse)
+ ($.definition \\parser.unconsumed_input)
- ($.definition \\parser.result
- "Executes a parser and makes sure no inputs go unconsumed."
- [(result parser input)])
+ ($.definition (\\parser.Parser it)
+ "A parser for Lux code analysis nodes.")
- ($.definition \\parser.any
- "Matches any value, without discrimination.")
+ ($.definition \\parser.result
+ "Executes a parser and makes sure no inputs go unconsumed."
+ [(result parser input)])
- ($.definition \\parser.end
- "Ensures there are no more inputs.")
+ ($.definition \\parser.any
+ "Matches any value, without discrimination.")
- ($.definition \\parser.end?
- "Checks whether there are no more inputs.")
+ ($.definition \\parser.end
+ "Ensures there are no more inputs.")
- (,, (with_template [<query> <assertion>]
- [($.definition <query>
- (format "Queries for a " (template.text [<query>]) " value."))
- ($.definition <assertion>
- (format "Assert a specific " (template.text [<query>]) " value."))]
+ ($.definition \\parser.end?
+ "Checks whether there are no more inputs.")
- [\\parser.bit \\parser.this_bit]
- [\\parser.nat \\parser.this_nat]
- [\\parser.int \\parser.this_int]
- [\\parser.rev \\parser.this_rev]
- [\\parser.frac \\parser.this_frac]
- [\\parser.text \\parser.this_text]
- [\\parser.local \\parser.this_local]
- [\\parser.foreign \\parser.this_foreign]
- [\\parser.constant \\parser.this_constant]
- ))
+ (,, (with_template [<query> <assertion>]
+ [($.definition <query>
+ (format "Queries for a " (template.text [<query>]) " value."))
+ ($.definition <assertion>
+ (format "Assert a specific " (template.text [<query>]) " value."))]
- ($.definition \\parser.tuple
- "Parses only within the context of a tuple's contents."
- [(tuple parser)])]
- [])))
+ [\\parser.bit \\parser.this_bit]
+ [\\parser.nat \\parser.this_nat]
+ [\\parser.int \\parser.this_int]
+ [\\parser.rev \\parser.this_rev]
+ [\\parser.frac \\parser.this_frac]
+ [\\parser.text \\parser.this_text]
+ [\\parser.local \\parser.this_local]
+ [\\parser.foreign \\parser.this_foreign]
+ [\\parser.constant \\parser.this_constant]
+ ))
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.Branch')
- ($.definition /.Match')
- ($.definition /.Environment)
- ($.definition /.Analysis)
- ($.definition /.Branch)
- ($.definition /.Match)
- ($.definition /.equivalence)
- ($.definition /.case)
- ($.definition /.unit)
- ($.definition /.bit)
- ($.definition /.nat)
- ($.definition /.int)
- ($.definition /.rev)
- ($.definition /.frac)
- ($.definition /.text)
- ($.definition /.no_op)
- ($.definition /.variable)
- ($.definition /.constant)
- ($.definition /.local)
- ($.definition /.foreign)
- ($.definition /.variant)
- ($.definition /.tuple)
- ($.definition /.format)
- ($.definition /.State+)
- ($.definition /.Operation)
- ($.definition /.Phase)
- ($.definition /.Handler)
- ($.definition /.Bundle)
- ($.definition /.with_source_code)
- ($.definition /.with_current_module)
- ($.definition /.with_location)
- ($.definition /.failure)
- ($.definition /.except)
- ($.definition /.assertion)
- ($.definition /.with_exception)
- ($.definition /.set_state)
- ($.definition /.set_source_code)
- ($.definition /.set_current_module)
- ($.definition /.set_location)
- ($.definition /.location)
- ($.definition /.source)
- ($.definition /.info)
- ($.definition /.state)]
- [..\\parser]))
+ ($.definition \\parser.tuple
+ "Parses only within the context of a tuple's contents."
+ [(tuple parser)])
+ )))
+
+(def .public documentation
+ (List $.Documentation)
+ (list.partial ($.module /._
+ "")
+
+ ($.definition /.Branch')
+ ($.definition /.Match')
+ ($.definition /.Environment)
+ ($.definition /.Analysis)
+ ($.definition /.Branch)
+ ($.definition /.Match)
+ ($.definition /.equivalence)
+ ($.definition /.case)
+ ($.definition /.unit)
+ ($.definition /.bit)
+ ($.definition /.nat)
+ ($.definition /.int)
+ ($.definition /.rev)
+ ($.definition /.frac)
+ ($.definition /.text)
+ ($.definition /.no_op)
+ ($.definition /.variable)
+ ($.definition /.constant)
+ ($.definition /.local)
+ ($.definition /.foreign)
+ ($.definition /.variant)
+ ($.definition /.tuple)
+ ($.definition /.format)
+ ($.definition /.State+)
+ ($.definition /.Operation)
+ ($.definition /.Phase)
+ ($.definition /.Handler)
+ ($.definition /.Bundle)
+ ($.definition /.with_source_code)
+ ($.definition /.with_current_module)
+ ($.definition /.with_location)
+ ($.definition /.failure)
+ ($.definition /.except)
+ ($.definition /.assertion)
+ ($.definition /.with_exception)
+ ($.definition /.set_state)
+ ($.definition /.set_source_code)
+ ($.definition /.set_current_module)
+ ($.definition /.set_location)
+ ($.definition /.location)
+ ($.definition /.source)
+ ($.definition /.info)
+ ($.definition /.state)
+
+ ..\\parser
+ ))
diff --git a/stdlib/source/documentation/lux/meta/compiler/language/lux/declaration.lux b/stdlib/source/documentation/lux/meta/compiler/language/lux/declaration.lux
index 3242e04cc..f50268496 100644
--- a/stdlib/source/documentation/lux/meta/compiler/language/lux/declaration.lux
+++ b/stdlib/source/documentation/lux/meta/compiler/language/lux/declaration.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except char)
+ [lux (.except)
["$" documentation]
[data
[text (.only \n)
@@ -10,26 +10,27 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.Component)
- ($.definition /.State)
- ($.definition /.Import)
- ($.definition /.Requirements)
- ($.definition /.no_requirements)
- ($.definition /.merge_requirements)
- ($.definition /.State+)
- ($.definition /.Operation)
- ($.definition /.Phase)
- ($.definition /.Handler)
- ($.definition /.Bundle)
- ($.definition /.analysis)
- ($.definition /.synthesis)
- ($.definition /.generation)
- ($.definition /.lifted_analysis)
- ($.definition /.lifted_synthesis)
- ($.definition /.lifted_generation)
- ($.definition /.set_current_module)]
- []))
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
+
+ ($.definition /.Component)
+ ($.definition /.State)
+ ($.definition /.Import)
+ ($.definition /.Requirements)
+ ($.definition /.no_requirements)
+ ($.definition /.merge_requirements)
+ ($.definition /.State+)
+ ($.definition /.Operation)
+ ($.definition /.Phase)
+ ($.definition /.Handler)
+ ($.definition /.Bundle)
+ ($.definition /.analysis)
+ ($.definition /.synthesis)
+ ($.definition /.generation)
+ ($.definition /.lifted_analysis)
+ ($.definition /.lifted_synthesis)
+ ($.definition /.lifted_generation)
+ ($.definition /.set_current_module)
+ ))
diff --git a/stdlib/source/documentation/lux/meta/compiler/language/lux/generation.lux b/stdlib/source/documentation/lux/meta/compiler/language/lux/generation.lux
index 3c2c0de8b..28c844658 100644
--- a/stdlib/source/documentation/lux/meta/compiler/language/lux/generation.lux
+++ b/stdlib/source/documentation/lux/meta/compiler/language/lux/generation.lux
@@ -10,54 +10,55 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.Buffer)
- ($.definition /.cannot_interpret)
- ($.definition /.cannot_overwrite_output)
- ($.definition /.no_buffer_for_saving_code)
- ($.definition /.Host)
- ($.definition /.State)
- ($.definition /.State+)
- ($.definition /.Operation)
- ($.definition /.Phase)
- ($.definition /.Handler)
- ($.definition /.Bundle)
- ($.definition /.Extender)
- ($.definition /.state)
- ($.definition /.empty_buffer)
- ($.definition /.with_anchor)
- ($.definition /.set_anchor)
- ($.definition /.anchor)
- ($.definition /.no_anchor)
- ($.definition /.with_buffer)
- ($.definition /.set_buffer)
- ($.definition /.buffer)
- ($.definition /.no_active_buffer)
- ($.definition /.get_registry)
- ($.definition /.set_registry)
- ($.definition /.next)
- ($.definition /.symbol)
- ($.definition /.enter_module)
- ($.definition /.module)
- ($.definition /.evaluate!)
- ($.definition /.execute!)
- ($.definition /.define!)
- ($.definition /.save!)
- ($.definition /.learn)
- ($.definition /.learn_custom)
- ($.definition /.learn_analyser)
- ($.definition /.learn_synthesizer)
- ($.definition /.learn_generator)
- ($.definition /.learn_declaration)
- ($.definition /.unknown_definition)
- ($.definition /.remember)
- ($.definition /.no_context)
- ($.definition /.module_id)
- ($.definition /.context)
- ($.definition /.with_context)
- ($.definition /.with_new_context)
- ($.definition /.log!)]
- []))
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
+
+ ($.definition /.Buffer)
+ ($.definition /.cannot_interpret)
+ ($.definition /.cannot_overwrite_output)
+ ($.definition /.no_buffer_for_saving_code)
+ ($.definition /.Host)
+ ($.definition /.State)
+ ($.definition /.State+)
+ ($.definition /.Operation)
+ ($.definition /.Phase)
+ ($.definition /.Handler)
+ ($.definition /.Bundle)
+ ($.definition /.Extender)
+ ($.definition /.state)
+ ($.definition /.empty_buffer)
+ ($.definition /.with_anchor)
+ ($.definition /.set_anchor)
+ ($.definition /.anchor)
+ ($.definition /.no_anchor)
+ ($.definition /.with_buffer)
+ ($.definition /.set_buffer)
+ ($.definition /.buffer)
+ ($.definition /.no_active_buffer)
+ ($.definition /.get_registry)
+ ($.definition /.set_registry)
+ ($.definition /.next)
+ ($.definition /.symbol)
+ ($.definition /.enter_module)
+ ($.definition /.module)
+ ($.definition /.evaluate!)
+ ($.definition /.execute!)
+ ($.definition /.define!)
+ ($.definition /.save!)
+ ($.definition /.learn)
+ ($.definition /.learn_custom)
+ ($.definition /.learn_analyser)
+ ($.definition /.learn_synthesizer)
+ ($.definition /.learn_generator)
+ ($.definition /.learn_declaration)
+ ($.definition /.unknown_definition)
+ ($.definition /.remember)
+ ($.definition /.no_context)
+ ($.definition /.module_id)
+ ($.definition /.context)
+ ($.definition /.with_context)
+ ($.definition /.with_new_context)
+ ($.definition /.log!)
+ ))
diff --git a/stdlib/source/documentation/lux/meta/compiler/language/lux/synthesis.lux b/stdlib/source/documentation/lux/meta/compiler/language/lux/synthesis.lux
index 3ddafebcc..b74515da2 100644
--- a/stdlib/source/documentation/lux/meta/compiler/language/lux/synthesis.lux
+++ b/stdlib/source/documentation/lux/meta/compiler/language/lux/synthesis.lux
@@ -14,129 +14,134 @@
[\\library
["[0]" /]])
-(`` (.def \\parser
- (.List $.Module)
- ($.module \\parser._
- ""
- [($.definition \\parser.cannot_parse)
- ($.definition \\parser.unconsumed_input)
- ($.definition \\parser.expected_empty_input)
- ($.definition \\parser.wrong_arity)
- ($.definition \\parser.empty_input)
-
- ($.definition (\\parser.Parser it)
- "A parser for the Lux compiler's synthesis nodes using during optimization.")
-
- ($.definition \\parser.result
- (format "Executes the parser against the inputs."
- \n "Ensures all inputs are consumed by the parser.")
- [(result parser input)])
-
- ($.definition \\parser.any
- "Yields a synthesis node without subjecting it to any analysis.")
-
- ($.definition \\parser.end
- "Ensures there are no more inputs.")
-
- ($.definition \\parser.end?
- "Checks whether there are no more inputs.")
-
- (,, (with_template [<query> <assertion>]
- [($.definition <query>
- (format "Queries for a " (template.text [<query>]) " synthesis node."))
- ($.definition <assertion>
- (format "Checks for a specific " (template.text [<query>]) " synthesis node."))]
-
- [\\parser.bit \\parser.this_bit]
- [\\parser.i64 \\parser.this_i64]
- [\\parser.f64 \\parser.this_f64]
- [\\parser.text \\parser.this_text]
- [\\parser.local \\parser.this_local]
- [\\parser.foreign \\parser.this_foreign]
- [\\parser.constant \\parser.this_constant]
- ))
-
- ($.definition \\parser.tuple
- "Parses the contents of a tuple."
- [(tuple parser)])
-
- ($.definition \\parser.function
- "Parses the body of a function with the 'expected' arity."
- [(function expected parser)])
-
- ($.definition \\parser.loop
- "Parses the initial values and the body of a loop."
- [(loop init_parsers iteration_parser)])]
- [])))
-
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.Resolver)
- ($.definition /.State)
- ($.definition /.fresh_resolver)
- ($.definition /.init)
- ($.definition /.Fork)
- ($.definition /.Path')
- ($.definition /.Abstraction')
- ($.definition /.Apply')
- ($.definition /.Branch)
- ($.definition /.Scope)
- ($.definition /.Loop)
- ($.definition /.Function)
- ($.definition /.Control)
- ($.definition /.Synthesis)
- ($.definition /.State+)
- ($.definition /.Operation)
- ($.definition /.Phase)
- ($.definition /.Handler)
- ($.definition /.Bundle)
- ($.definition /.Path)
- ($.definition /.path/pop)
- ($.definition /.path/side)
- ($.definition /.path/member)
- ($.definition /.side/left)
- ($.definition /.side/right)
- ($.definition /.member/left)
- ($.definition /.member/right)
- ($.definition /.path/bind)
- ($.definition /.path/then)
- ($.definition /.path/alt)
- ($.definition /.path/seq)
- ($.definition /.Abstraction)
- ($.definition /.Apply)
- ($.definition /.unit)
- ($.definition /.with_locals)
- ($.definition /.locals)
- ($.definition /.with_currying?)
- ($.definition /.currying?)
- ($.definition /.with_new_local)
- ($.definition /.bit)
- ($.definition /.i64)
- ($.definition /.f64)
- ($.definition /.text)
- ($.definition /.variant)
- ($.definition /.tuple)
- ($.definition /.variable)
- ($.definition /.constant)
- ($.definition /.variable/local)
- ($.definition /.variable/foreign)
- ($.definition /.branch/case)
- ($.definition /.branch/let)
- ($.definition /.branch/if)
- ($.definition /.branch/get)
- ($.definition /.loop/again)
- ($.definition /.loop/scope)
- ($.definition /.function/abstraction)
- ($.definition /.function/apply)
- ($.definition /.%path')
- ($.definition /.%synthesis)
- ($.definition /.%path)
- ($.definition /.equivalence)
- ($.definition /.hash)
- ($.definition /.!bind_top)
- ($.definition /.!multi_pop)
- ($.definition /.simple_left_side)
- ($.definition /.simple_right_side)]
- [..\\parser]))
+(`` (def \\parser
+ (List $.Documentation)
+ (list ($.module \\parser._
+ "")
+
+ ($.definition \\parser.cannot_parse)
+ ($.definition \\parser.unconsumed_input)
+ ($.definition \\parser.expected_empty_input)
+ ($.definition \\parser.wrong_arity)
+ ($.definition \\parser.empty_input)
+
+ ($.definition (\\parser.Parser it)
+ "A parser for the Lux compiler's synthesis nodes using during optimization.")
+
+ ($.definition \\parser.result
+ (format "Executes the parser against the inputs."
+ \n "Ensures all inputs are consumed by the parser.")
+ [(result parser input)])
+
+ ($.definition \\parser.any
+ "Yields a synthesis node without subjecting it to any analysis.")
+
+ ($.definition \\parser.end
+ "Ensures there are no more inputs.")
+
+ ($.definition \\parser.end?
+ "Checks whether there are no more inputs.")
+
+ (,, (with_template [<query> <assertion>]
+ [($.definition <query>
+ (format "Queries for a " (template.text [<query>]) " synthesis node."))
+ ($.definition <assertion>
+ (format "Checks for a specific " (template.text [<query>]) " synthesis node."))]
+
+ [\\parser.bit \\parser.this_bit]
+ [\\parser.i64 \\parser.this_i64]
+ [\\parser.f64 \\parser.this_f64]
+ [\\parser.text \\parser.this_text]
+ [\\parser.local \\parser.this_local]
+ [\\parser.foreign \\parser.this_foreign]
+ [\\parser.constant \\parser.this_constant]
+ ))
+
+ ($.definition \\parser.tuple
+ "Parses the contents of a tuple."
+ [(tuple parser)])
+
+ ($.definition \\parser.function
+ "Parses the body of a function with the 'expected' arity."
+ [(function expected parser)])
+
+ ($.definition \\parser.loop
+ "Parses the initial values and the body of a loop."
+ [(loop init_parsers iteration_parser)])
+ )))
+
+(def .public documentation
+ (List $.Documentation)
+ (list.partial ($.module /._
+ "")
+
+ ($.definition /.Resolver)
+ ($.definition /.State)
+ ($.definition /.fresh_resolver)
+ ($.definition /.init)
+ ($.definition /.Fork)
+ ($.definition /.Path')
+ ($.definition /.Abstraction')
+ ($.definition /.Apply')
+ ($.definition /.Branch)
+ ($.definition /.Scope)
+ ($.definition /.Loop)
+ ($.definition /.Function)
+ ($.definition /.Control)
+ ($.definition /.Synthesis)
+ ($.definition /.State+)
+ ($.definition /.Operation)
+ ($.definition /.Phase)
+ ($.definition /.Handler)
+ ($.definition /.Bundle)
+ ($.definition /.Path)
+ ($.definition /.path/pop)
+ ($.definition /.path/side)
+ ($.definition /.path/member)
+ ($.definition /.side/left)
+ ($.definition /.side/right)
+ ($.definition /.member/left)
+ ($.definition /.member/right)
+ ($.definition /.path/bind)
+ ($.definition /.path/then)
+ ($.definition /.path/alt)
+ ($.definition /.path/seq)
+ ($.definition /.Abstraction)
+ ($.definition /.Apply)
+ ($.definition /.unit)
+ ($.definition /.with_locals)
+ ($.definition /.locals)
+ ($.definition /.with_currying?)
+ ($.definition /.currying?)
+ ($.definition /.with_new_local)
+ ($.definition /.bit)
+ ($.definition /.i64)
+ ($.definition /.f64)
+ ($.definition /.text)
+ ($.definition /.variant)
+ ($.definition /.tuple)
+ ($.definition /.variable)
+ ($.definition /.constant)
+ ($.definition /.variable/local)
+ ($.definition /.variable/foreign)
+ ($.definition /.branch/case)
+ ($.definition /.branch/let)
+ ($.definition /.branch/if)
+ ($.definition /.branch/get)
+ ($.definition /.loop/again)
+ ($.definition /.loop/scope)
+ ($.definition /.function/abstraction)
+ ($.definition /.function/apply)
+ ($.definition /.%path')
+ ($.definition /.%synthesis)
+ ($.definition /.%path)
+ ($.definition /.equivalence)
+ ($.definition /.hash)
+ ($.definition /.!bind_top)
+ ($.definition /.!multi_pop)
+ ($.definition /.simple_left_side)
+ ($.definition /.simple_right_side)
+
+
+ ..\\parser
+ ))
diff --git a/stdlib/source/documentation/lux/meta/compiler/phase.lux b/stdlib/source/documentation/lux/meta/compiler/phase.lux
index 84a898c31..fe549b6c9 100644
--- a/stdlib/source/documentation/lux/meta/compiler/phase.lux
+++ b/stdlib/source/documentation/lux/meta/compiler/phase.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except char)
+ [lux (.except)
["$" documentation]
[data
[text (.only \n)
@@ -10,23 +10,24 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.Operation)
- ($.definition /.monad)
- ($.definition /.Phase)
- ($.definition /.Wrapper)
- ($.definition /.result')
- ($.definition /.result)
- ($.definition /.state)
- ($.definition /.with)
- ($.definition /.sub)
- ($.definition /.failure)
- ($.definition /.except)
- ($.definition /.lifted)
- ($.definition /.assertion)
- ($.definition /.identity)
- ($.definition /.composite)]
- []))
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
+
+ ($.definition /.Operation)
+ ($.definition /.monad)
+ ($.definition /.Phase)
+ ($.definition /.Wrapper)
+ ($.definition /.result')
+ ($.definition /.result)
+ ($.definition /.state)
+ ($.definition /.with)
+ ($.definition /.sub)
+ ($.definition /.failure)
+ ($.definition /.except)
+ ($.definition /.lifted)
+ ($.definition /.assertion)
+ ($.definition /.identity)
+ ($.definition /.composite)
+ ))
diff --git a/stdlib/source/documentation/lux/meta/extension.lux b/stdlib/source/documentation/lux/meta/extension.lux
index 737d19387..e0ce6b4b0 100644
--- a/stdlib/source/documentation/lux/meta/extension.lux
+++ b/stdlib/source/documentation/lux/meta/extension.lux
@@ -22,29 +22,30 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.analysis
- "Mechanism for defining extensions to Lux's analysis/type-checking infrastructure."
- [(analysis ("my analysis" self phase archive [pass_through <code>.any])
- (phase archive pass_through))])
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
- ($.definition /.synthesis
- "Mechanism for defining extensions to Lux's synthesis/optimization infrastructure."
- [(synthesis ("my synthesis" self phase archive [pass_through <analysis>.any])
- (phase archive pass_through))])
+ ($.definition /.analysis
+ "Mechanism for defining extensions to Lux's analysis/type-checking infrastructure."
+ [(analysis ("my analysis" self phase archive [pass_through <code>.any])
+ (phase archive pass_through))])
- ($.definition /.generation
- ""
- [(generation ("my generation" self phase archive [pass_through <synthesis>.any])
- (phase archive pass_through))])
+ ($.definition /.synthesis
+ "Mechanism for defining extensions to Lux's synthesis/optimization infrastructure."
+ [(synthesis ("my synthesis" self phase archive [pass_through <analysis>.any])
+ (phase archive pass_through))])
- ($.definition /.declaration
- ""
- [(declaration ("my declaration" self phase archive [parameters (<>.some <code>.any)])
- (do phase.monad
- [.let [_ (debug.log! (format "Successfully installed declaration " (%.text self) "!"))]]
- (in declaration.no_requirements)))])]
- []))
+ ($.definition /.generation
+ ""
+ [(generation ("my generation" self phase archive [pass_through <synthesis>.any])
+ (phase archive pass_through))])
+
+ ($.definition /.declaration
+ ""
+ [(declaration ("my declaration" self phase archive [parameters (<>.some <code>.any)])
+ (do phase.monad
+ [.let [_ (debug.log! (format "Successfully installed declaration " (%.text self) "!"))]]
+ (in declaration.no_requirements)))])
+ ))
diff --git a/stdlib/source/documentation/lux/meta/location.lux b/stdlib/source/documentation/lux/meta/location.lux
index 9f587ef9e..e7e7ef30a 100644
--- a/stdlib/source/documentation/lux/meta/location.lux
+++ b/stdlib/source/documentation/lux/meta/location.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except private)
+ [lux (.except)
["$" documentation]
[data
["[0]" text (.only \n)
@@ -8,19 +8,20 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.equivalence)
- ($.definition /.dummy)
- ($.definition /.format)
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
- ($.definition /.here
- "The Location of the current form."
- [(here)])
+ ($.definition /.equivalence)
+ ($.definition /.dummy)
+ ($.definition /.format)
- ($.definition /.with
- ""
- [(with location error)])]
- []))
+ ($.definition /.here
+ "The Location of the current form."
+ [(here)])
+
+ ($.definition /.with
+ ""
+ [(with location error)])
+ ))
diff --git a/stdlib/source/documentation/lux/meta/macro.lux b/stdlib/source/documentation/lux/meta/macro.lux
index 204efdd8c..bde4fd2f4 100644
--- a/stdlib/source/documentation/lux/meta/macro.lux
+++ b/stdlib/source/documentation/lux/meta/macro.lux
@@ -1,12 +1,12 @@
(.require
[library
- [lux (.except char symbol)
+ [lux (.except)
["$" documentation]
[data
[text (.only \n)
["%" \\format (.only format)]]
[collection
- ["[0]" list]]]]]
+ ["[0]" list (.use "[1]#[0]" monoid)]]]]]
["[0]" /
["[1][0]" local]
["[1][0]" syntax]
@@ -14,87 +14,91 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [... ($.definition /.single_expansion
- ... (format "Given code that requires applying a macro, does it once and returns the result."
- ... \n "Otherwise, returns the code as-is.")
- ... [(single_expansion syntax)])
+(def .public documentation
+ (List $.Documentation)
+ (list.partial ($.module /._
+ "")
- ... ($.definition /.expansion
- ... (format "Given code that requires applying a macro, expands repeatedly until no more direct macro-calls are left."
- ... \n "Otherwise, returns the code as-is.")
- ... [(expansion syntax)])
+ ... ($.definition /.single_expansion
+ ... (format "Given code that requires applying a macro, does it once and returns the result."
+ ... \n "Otherwise, returns the code as-is.")
+ ... [(single_expansion syntax)])
- ... ($.definition /.full_expansion
- ... "Expands all macro-calls everywhere recursively, until only primitive/base code remains."
- ... [(full_expansion syntax)])
+ ... ($.definition /.expansion
+ ... (format "Given code that requires applying a macro, expands repeatedly until no more direct macro-calls are left."
+ ... \n "Otherwise, returns the code as-is.")
+ ... [(expansion syntax)])
- ($.definition /.symbol
- (format "Generates a unique name as a Code node (ready to be used in code templates)."
- \n "A prefix can be given (or just be empty text) to better identify the code for debugging purposes.")
- [(symbol prefix)])
+ ... ($.definition /.full_expansion
+ ... "Expands all macro-calls everywhere recursively, until only primitive/base code remains."
+ ... [(full_expansion syntax)])
- ($.definition /.wrong_syntax_error
- "A generic error message for macro syntax failures.")
+ ($.definition /.symbol
+ (format "Generates a unique name as a Code node (ready to be used in code templates)."
+ \n "A prefix can be given (or just be empty text) to better identify the code for debugging purposes.")
+ [(symbol prefix)])
- ($.definition /.with_symbols
- "Creates new symbols and offers them to the body expression."
- [(def synchronized
- (syntax (_ [lock any
- body any])
- (with_symbols [g!lock g!body g!_]
- (in (list (` (let [(, g!lock) (, lock)
- (, g!_) ("jvm monitorenter" (, g!lock))
- (, g!body) (, body)
- (, g!_) ("jvm monitorexit" (, g!lock))]
- (, g!body))))))))])
+ ($.definition /.wrong_syntax_error
+ "A generic error message for macro syntax failures.")
- ... ($.definition /.one_expansion
- ... "Works just like expand, except that it ensures that the output is a single Code token."
- ... [(one_expansion token)])
+ ($.definition /.with_symbols
+ "Creates new symbols and offers them to the body expression."
+ [(def synchronized
+ (syntax (_ [lock any
+ body any])
+ (with_symbols [g!lock g!body g!_]
+ (in (list (` (let [(, g!lock) (, lock)
+ (, g!_) ("jvm monitorenter" (, g!lock))
+ (, g!body) (, body)
+ (, g!_) ("jvm monitorexit" (, g!lock))]
+ (, g!body))))))))])
- ... ($.definition /.log_single_expansion!
- ... (format "Performs a macro-expansion and logs the resulting code."
- ... \n "You can either use the resulting code, or omit them."
- ... \n "By omitting them, this macro produces nothing (just like the lux.comment macro).")
- ... [(log_single_expansion!
- ... (def (foo bar baz)
- ... (-> Int Int Int)
- ... (int.+ bar baz)))
- ... (log_single_expansion! "omit"
- ... (def (foo bar baz)
- ... (-> Int Int Int)
- ... (int.+ bar baz)))])
+ ... ($.definition /.one_expansion
+ ... "Works just like expand, except that it ensures that the output is a single Code token."
+ ... [(one_expansion token)])
- ... ($.definition /.log_expansion!
- ... (format "Performs a macro-expansion and logs the resulting code."
- ... \n "You can either use the resulting code, or omit them."
- ... \n "By omitting them, this macro produces nothing (just like the lux.comment macro).")
- ... [(log_expansion!
- ... (def (foo bar baz)
- ... (-> Int Int Int)
- ... (int.+ bar baz)))
- ... (log_expansion! "omit"
- ... (def (foo bar baz)
- ... (-> Int Int Int)
- ... (int.+ bar baz)))])
+ ... ($.definition /.log_single_expansion!
+ ... (format "Performs a macro-expansion and logs the resulting code."
+ ... \n "You can either use the resulting code, or omit them."
+ ... \n "By omitting them, this macro produces nothing (just like the lux.comment macro).")
+ ... [(log_single_expansion!
+ ... (def (foo bar baz)
+ ... (-> Int Int Int)
+ ... (int.+ bar baz)))
+ ... (log_single_expansion! "omit"
+ ... (def (foo bar baz)
+ ... (-> Int Int Int)
+ ... (int.+ bar baz)))])
- ... ($.definition /.log_full_expansion!
- ... (format "Performs a macro-expansion and logs the resulting code."
- ... \n "You can either use the resulting code, or omit them."
- ... \n "By omitting them, this macro produces nothing (just like the lux.comment macro).")
- ... [(log_full_expansion!
- ... (def (foo bar baz)
- ... (-> Int Int Int)
- ... (int.+ bar baz)))
- ... (log_full_expansion! "omit"
- ... (def (foo bar baz)
- ... (-> Int Int Int)
- ... (int.+ bar baz)))])
- ]
- [/local.documentation
- /syntax.documentation
- /template.documentation]))
+ ... ($.definition /.log_expansion!
+ ... (format "Performs a macro-expansion and logs the resulting code."
+ ... \n "You can either use the resulting code, or omit them."
+ ... \n "By omitting them, this macro produces nothing (just like the lux.comment macro).")
+ ... [(log_expansion!
+ ... (def (foo bar baz)
+ ... (-> Int Int Int)
+ ... (int.+ bar baz)))
+ ... (log_expansion! "omit"
+ ... (def (foo bar baz)
+ ... (-> Int Int Int)
+ ... (int.+ bar baz)))])
+
+ ... ($.definition /.log_full_expansion!
+ ... (format "Performs a macro-expansion and logs the resulting code."
+ ... \n "You can either use the resulting code, or omit them."
+ ... \n "By omitting them, this macro produces nothing (just like the lux.comment macro).")
+ ... [(log_full_expansion!
+ ... (def (foo bar baz)
+ ... (-> Int Int Int)
+ ... (int.+ bar baz)))
+ ... (log_full_expansion! "omit"
+ ... (def (foo bar baz)
+ ... (-> Int Int Int)
+ ... (int.+ bar baz)))])
+
+ (all list#composite
+ /local.documentation
+ /syntax.documentation
+ /template.documentation
+ )
+ ))
diff --git a/stdlib/source/documentation/lux/meta/macro/local.lux b/stdlib/source/documentation/lux/meta/macro/local.lux
index 8c2ccb00c..47248b372 100644
--- a/stdlib/source/documentation/lux/meta/macro/local.lux
+++ b/stdlib/source/documentation/lux/meta/macro/local.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except char)
+ [lux (.except)
["$" documentation]
[data
[text (.only \n)
@@ -10,18 +10,19 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.unknown_module)
- ($.definition /.cannot_shadow_definition)
- ($.definition /.unknown_definition)
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
- ($.definition /.push
- (format "Installs macros in the compiler-state, with the given names."
- \n "Yields code that can be placed either as expression or as declarations."
- \n "This code un-installs the macros."
- \n "NOTE: Always use this code once to clean-up..")
- [(push macros)])]
- []))
+ ($.definition /.unknown_module)
+ ($.definition /.cannot_shadow_definition)
+ ($.definition /.unknown_definition)
+
+ ($.definition /.push
+ (format "Installs macros in the compiler-state, with the given names."
+ \n "Yields code that can be placed either as expression or as declarations."
+ \n "This code un-installs the macros."
+ \n "NOTE: Always use this code once to clean-up..")
+ [(push macros)])
+ ))
diff --git a/stdlib/source/documentation/lux/meta/macro/syntax.lux b/stdlib/source/documentation/lux/meta/macro/syntax.lux
index 4e3001f3f..4f924ea38 100644
--- a/stdlib/source/documentation/lux/meta/macro/syntax.lux
+++ b/stdlib/source/documentation/lux/meta/macro/syntax.lux
@@ -1,12 +1,12 @@
(.require
[library
- [lux (.except char)
+ [lux (.except)
["$" documentation]
[data
[text (.only \n)
["%" \\format (.only format)]]
[collection
- ["[0]" list]]]]]
+ ["[0]" list (.use "[1]#[0]" monoid)]]]]]
["[0]" /
["[1][0]" check]
["[1][0]" declaration]
@@ -18,31 +18,36 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.syntax
- (format \n "A more advanced way to define macros than 'macro'."
- \n "The inputs to the macro can be parsed in complex ways through the use of syntax parsers."
- \n "The macro body is also (implicitly) run in the Meta monad, to save some typing."
- \n "Also, the compiler state can be accessed through a special binding.")
- [(def .public object
- (syntax (_ lux_state [.let [imports (class_imports lux_state)]
- .let [class_vars (list)]
- super (opt (super_class_decl^ imports class_vars))
- interfaces (tuple (some (super_class_decl^ imports class_vars)))
- constructor_args (constructor_args^ imports class_vars)
- methods (some (overriden_method_def^ imports))])
- (let [def_code (all text#composite "anon-class:"
- (spaced (list (super_class_decl$ (maybe.else object_super_class super))
- (with_brackets (spaced (list#each super_class_decl$ interfaces)))
- (with_brackets (spaced (list#each constructor_arg$ constructor_args)))
- (with_brackets (spaced (list#each (method_def$ id) methods))))))]
- (in (list (` ((, (code.text def_code)))))))))])]
- [/check.documentation
- /declaration.documentation
- /definition.documentation
- /export.documentation
- /input.documentation
- /type/variable.documentation]))
+(def .public documentation
+ (List $.Documentation)
+ (list.partial ($.module /._
+ "")
+
+ ($.definition /.syntax
+ (format \n "A more advanced way to define macros than 'macro'."
+ \n "The inputs to the macro can be parsed in complex ways through the use of syntax parsers."
+ \n "The macro body is also (implicitly) run in the Meta monad, to save some typing."
+ \n "Also, the compiler state can be accessed through a special binding.")
+ [(def .public object
+ (syntax (_ lux_state [.let [imports (class_imports lux_state)]
+ .let [class_vars (list)]
+ super (opt (super_class_decl^ imports class_vars))
+ interfaces (tuple (some (super_class_decl^ imports class_vars)))
+ constructor_args (constructor_args^ imports class_vars)
+ methods (some (overriden_method_def^ imports))])
+ (let [def_code (all text#composite "anon-class:"
+ (spaced (list (super_class_decl$ (maybe.else object_super_class super))
+ (with_brackets (spaced (list#each super_class_decl$ interfaces)))
+ (with_brackets (spaced (list#each constructor_arg$ constructor_args)))
+ (with_brackets (spaced (list#each (method_def$ id) methods))))))]
+ (in (list (` ((, (code.text def_code)))))))))])
+
+ (all list#composite
+ /check.documentation
+ /declaration.documentation
+ /definition.documentation
+ /export.documentation
+ /input.documentation
+ /type/variable.documentation
+ )
+ ))
diff --git a/stdlib/source/documentation/lux/meta/macro/syntax/check.lux b/stdlib/source/documentation/lux/meta/macro/syntax/check.lux
index a793bb3e3..9fd16bda6 100644
--- a/stdlib/source/documentation/lux/meta/macro/syntax/check.lux
+++ b/stdlib/source/documentation/lux/meta/macro/syntax/check.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except char)
+ [lux (.except)
["$" documentation]
[data
[text
@@ -10,14 +10,15 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.equivalence)
- ($.definition /.format)
- ($.definition /.parser)
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
- ($.definition /.Check
- "A type annotation for an expression.")]
- []))
+ ($.definition /.equivalence)
+ ($.definition /.format)
+ ($.definition /.parser)
+
+ ($.definition /.Check
+ "A type annotation for an expression.")
+ ))
diff --git a/stdlib/source/documentation/lux/meta/macro/syntax/declaration.lux b/stdlib/source/documentation/lux/meta/macro/syntax/declaration.lux
index 07dd4ddc3..77290d620 100644
--- a/stdlib/source/documentation/lux/meta/macro/syntax/declaration.lux
+++ b/stdlib/source/documentation/lux/meta/macro/syntax/declaration.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except char)
+ [lux (.except)
["$" documentation]
[data
[text
@@ -10,19 +10,20 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.equivalence)
- ($.definition /.format)
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
- ($.definition /.Declaration
- "A declaration for either a constant or a function.")
+ ($.definition /.equivalence)
+ ($.definition /.format)
- ($.definition /.parser
- "A parser for declaration syntax."
- ["Such as:"
- quux
- (foo bar baz)])]
- []))
+ ($.definition /.Declaration
+ "A declaration for either a constant or a function.")
+
+ ($.definition /.parser
+ "A parser for declaration syntax."
+ ["Such as:"
+ quux
+ (foo bar baz)])
+ ))
diff --git a/stdlib/source/documentation/lux/meta/macro/syntax/definition.lux b/stdlib/source/documentation/lux/meta/macro/syntax/definition.lux
index 9434e3cf6..e429ba035 100644
--- a/stdlib/source/documentation/lux/meta/macro/syntax/definition.lux
+++ b/stdlib/source/documentation/lux/meta/macro/syntax/definition.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except Definition)
+ [lux (.except)
["$" documentation]
[data
[text
@@ -10,22 +10,23 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.equivalence)
- ($.definition /.lacks_type)
- ($.definition /.format)
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
- ($.definition /.Definition
- "Syntax for a constant definition.")
+ ($.definition /.equivalence)
+ ($.definition /.lacks_type)
+ ($.definition /.format)
- ($.definition /.parser
- "A reader that first macro-expands and then analyses the input Code, to ensure it is a definition."
- [(parser compiler)])
+ ($.definition /.Definition
+ "Syntax for a constant definition.")
- ($.definition /.typed
- "Only works for typed definitions."
- [(typed compiler)])]
- []))
+ ($.definition /.parser
+ "A reader that first macro-expands and then analyses the input Code, to ensure it is a definition."
+ [(parser compiler)])
+
+ ($.definition /.typed
+ "Only works for typed definitions."
+ [(typed compiler)])
+ ))
diff --git a/stdlib/source/documentation/lux/meta/macro/syntax/export.lux b/stdlib/source/documentation/lux/meta/macro/syntax/export.lux
index 2ebed7afa..f436ac551 100644
--- a/stdlib/source/documentation/lux/meta/macro/syntax/export.lux
+++ b/stdlib/source/documentation/lux/meta/macro/syntax/export.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except char)
+ [lux (.except)
["$" documentation]
[data
[text
@@ -10,13 +10,14 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- "Syntax for marking a definition as an export."
- [($.definition /.default_policy)
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "Syntax for marking a definition as an export.")
- ($.definition /.parser
- ""
- [(parser un_exported)])]
- []))
+ ($.definition /.default_policy)
+
+ ($.definition /.parser
+ ""
+ [(parser un_exported)])
+ ))
diff --git a/stdlib/source/documentation/lux/meta/macro/syntax/input.lux b/stdlib/source/documentation/lux/meta/macro/syntax/input.lux
index b0e2507da..cab9bd39b 100644
--- a/stdlib/source/documentation/lux/meta/macro/syntax/input.lux
+++ b/stdlib/source/documentation/lux/meta/macro/syntax/input.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except char)
+ [lux (.except)
["$" documentation]
[data
[text
@@ -10,16 +10,17 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.equivalence)
- ($.definition /.format)
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
- ($.definition /.Input
- "The common typed-argument syntax used by many macros.")
+ ($.definition /.equivalence)
+ ($.definition /.format)
- ($.definition /.parser
- "Parser for the common typed-argument syntax used by many macros.")]
- []))
+ ($.definition /.Input
+ "The common typed-argument syntax used by many macros.")
+
+ ($.definition /.parser
+ "Parser for the common typed-argument syntax used by many macros.")
+ ))
diff --git a/stdlib/source/documentation/lux/meta/macro/syntax/type/variable.lux b/stdlib/source/documentation/lux/meta/macro/syntax/type/variable.lux
index 5c5e1144a..a8a7bd52a 100644
--- a/stdlib/source/documentation/lux/meta/macro/syntax/type/variable.lux
+++ b/stdlib/source/documentation/lux/meta/macro/syntax/type/variable.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except char)
+ [lux (.except)
["$" documentation]
[data
[text
@@ -10,16 +10,17 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.equivalence)
- ($.definition /.format)
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
- ($.definition /.Variable
- "A variable's name.")
+ ($.definition /.equivalence)
+ ($.definition /.format)
- ($.definition /.parser
- "Parser for the common type variable/parameter used by many macros.")]
- []))
+ ($.definition /.Variable
+ "A variable's name.")
+
+ ($.definition /.parser
+ "Parser for the common type variable/parameter used by many macros.")
+ ))
diff --git a/stdlib/source/documentation/lux/meta/macro/template.lux b/stdlib/source/documentation/lux/meta/macro/template.lux
index bbeafc367..4ef001ef4 100644
--- a/stdlib/source/documentation/lux/meta/macro/template.lux
+++ b/stdlib/source/documentation/lux/meta/macro/template.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except let symbol)
+ [lux (.except)
["$" documentation]
[data
[text (.only \n)
@@ -10,56 +10,57 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- "Utilities commonly used while templating."
- [($.definition /.irregular_arguments)
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "Utilities commonly used while templating.")
- ($.definition /.spliced
- ""
- [(spliced [a b c d])
- "=>"
- a
- b
- c
- d])
+ ($.definition /.irregular_arguments)
- ($.definition /.amount
- ""
- [(amount [a b c d])
- "=>"
- 4])
+ ($.definition /.spliced
+ ""
+ [(spliced [a b c d])
+ "=>"
+ a
+ b
+ c
+ d])
- ($.definition /.with_locals
- "Creates names for local bindings aliased by the names you choose."
- [(with_locals [my_var]
- (let [my_var 123]
- (text [my_var])))
- "=>"
- "__gensym__my_var506"])
+ ($.definition /.amount
+ ""
+ [(amount [a b c d])
+ "=>"
+ 4])
- ($.definition /.text
- "A text literal made by concatenating pieces of code."
- [(text [#0 123 +456 +789.0 "abc" .def ..ghi])
- "=>"
- "#0123+456+789.0abcdefghi"])
+ ($.definition /.with_locals
+ "Creates names for local bindings aliased by the names you choose."
+ [(with_locals [my_var]
+ (let [my_var 123]
+ (text [my_var])))
+ "=>"
+ "__gensym__my_var506"])
- ($.definition /.symbol
- (format "An symbol made by concatenating pieces of code."
- \n "The (optional) module part and the short part are specified independently.")
- [(symbol ["abc" .def ..ghi])
- "=>"
- abcdefghi]
- [(symbol [.def] ["abc" .def ..ghi])
- "=>"
- .abcdefghi])
+ ($.definition /.text
+ "A text literal made by concatenating pieces of code."
+ [(text [#0 123 +456 +789.0 "abc" .def ..ghi])
+ "=>"
+ "#0123+456+789.0abcdefghi"])
- ($.definition /.let
- "Lexically-bound templates."
- [(let [(!square <root>)
- [(* <root> <root>)]]
- (def (square root)
- (-> Nat Nat)
- (!square root)))])]
- []))
+ ($.definition /.symbol
+ (format "An symbol made by concatenating pieces of code."
+ \n "The (optional) module part and the short part are specified independently.")
+ [(symbol ["abc" .def ..ghi])
+ "=>"
+ abcdefghi]
+ [(symbol [.def] ["abc" .def ..ghi])
+ "=>"
+ .abcdefghi])
+
+ ($.definition /.let
+ "Lexically-bound templates."
+ [(let [(!square <root>)
+ [(* <root> <root>)]]
+ (def (square root)
+ (-> Nat Nat)
+ (!square root)))])
+ ))
diff --git a/stdlib/source/documentation/lux/meta/static.lux b/stdlib/source/documentation/lux/meta/static.lux
index 585cec44f..51853785a 100644
--- a/stdlib/source/documentation/lux/meta/static.lux
+++ b/stdlib/source/documentation/lux/meta/static.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except nat int rev)
+ [lux (.except)
["$" documentation]
[data
[text
@@ -10,47 +10,48 @@
[\\library
["[0]" /]])
-(`` (.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [(,, (with_template [<name> <type>]
- [($.definition <name>
- (%.code (' (<name>
- (is <type>
- (value generating expression))))))]
+(`` (def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
- [/.nat .Nat]
- [/.int .Int]
- [/.rev .Rev]
- [/.frac .Frac]
- [/.text .Text]
- ))
+ (,, (with_template [<name> <type>]
+ [($.definition <name>
+ (%.code (' (<name>
+ (is <type>
+ (value generating expression))))))]
- ($.definition /.literal
- ""
- [(/.literal
- (is (-> ??? Code)
- format)
- (is ???
- (value generating expression)))])
+ [/.nat .Nat]
+ [/.int .Int]
+ [/.rev .Rev]
+ [/.frac .Frac]
+ [/.text .Text]
+ ))
- (,, (with_template [<name> <type>]
- [($.definition <name>
- (%.code (' (is <type>
- (<name>)))))]
+ ($.definition /.literal
+ ""
+ [(/.literal
+ (is (-> ??? Code)
+ format)
+ (is ???
+ (value generating expression)))])
- [/.random_nat .Nat]
- [/.random_int .Int]
- [/.random_rev .Rev]
- [/.random_frac .Frac]
- ))
+ (,, (with_template [<name> <type>]
+ [($.definition <name>
+ (%.code (' (is <type>
+ (<name>)))))]
- ($.definition /.random
- ""
- [(/.random
- (is (-> ??? Code)
- format)
- (is (Random ???)
- (random data generator)))])]
- [])))
+ [/.random_nat .Nat]
+ [/.random_int .Int]
+ [/.random_rev .Rev]
+ [/.random_frac .Frac]
+ ))
+
+ ($.definition /.random
+ ""
+ [(/.random
+ (is (-> ??? Code)
+ format)
+ (is (Random ???)
+ (random data generator)))])
+ )))
diff --git a/stdlib/source/documentation/lux/meta/symbol.lux b/stdlib/source/documentation/lux/meta/symbol.lux
index ae3ac84dd..66d24ef9b 100644
--- a/stdlib/source/documentation/lux/meta/symbol.lux
+++ b/stdlib/source/documentation/lux/meta/symbol.lux
@@ -8,18 +8,19 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.hash)
- ($.definition /.equivalence)
- ($.definition /.order)
- ($.definition /.codec)
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
- ($.definition /.module
- "The module part of a symbol.")
+ ($.definition /.hash)
+ ($.definition /.equivalence)
+ ($.definition /.order)
+ ($.definition /.codec)
- ($.definition /.short
- "The short part of a symbol.")]
- []))
+ ($.definition /.module
+ "The module part of a symbol.")
+
+ ($.definition /.short
+ "The short part of a symbol.")
+ ))
diff --git a/stdlib/source/documentation/lux/meta/target.lux b/stdlib/source/documentation/lux/meta/target.lux
index 8b3676d7f..4c027dabe 100644
--- a/stdlib/source/documentation/lux/meta/target.lux
+++ b/stdlib/source/documentation/lux/meta/target.lux
@@ -1,12 +1,12 @@
(.require
[library
- [lux (.except char)
+ [lux (.except)
["$" documentation]
[data
[text (.only \n)
["%" \\format (.only format)]]
[collection
- ["[0]" list]]]]]
+ ["[0]" list (.use "[1]#[0]" monoid)]]]]]
[\\library
["[0]" /]]
["[0]" /
@@ -16,26 +16,31 @@
["[1][0]" python]
["[1][0]" ruby]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.old)
- ($.definition /.js)
- ($.definition /.jvm)
- ($.definition /.lua)
- ($.definition /.python)
- ($.definition /.ruby)
- ($.definition /.common_lisp)
- ($.definition /.php)
- ($.definition /.r)
- ($.definition /.scheme)
+(def .public documentation
+ (List $.Documentation)
+ (list.partial ($.module /._
+ "")
- ($.definition /.Target
- (format "The name/ID of a platform targetted by a Lux compiler."
- \n "This information can be used to generate code targetting specific platforms, and to make programs cross-platform."))]
- [/js.documentation
- /jvm/type.documentation
- /lua.documentation
- /python.documentation
- /ruby.documentation]))
+ ($.definition /.old)
+ ($.definition /.js)
+ ($.definition /.jvm)
+ ($.definition /.lua)
+ ($.definition /.python)
+ ($.definition /.ruby)
+ ($.definition /.common_lisp)
+ ($.definition /.php)
+ ($.definition /.r)
+ ($.definition /.scheme)
+
+ ($.definition /.Target
+ (format "The name/ID of a platform targetted by a Lux compiler."
+ \n "This information can be used to generate code targetting specific platforms, and to make programs cross-platform."))
+
+ (all list#composite
+ /js.documentation
+ /jvm/type.documentation
+ /lua.documentation
+ /python.documentation
+ /ruby.documentation
+ )
+ ))
diff --git a/stdlib/source/documentation/lux/meta/target/js.lux b/stdlib/source/documentation/lux/meta/target/js.lux
index 2668e038f..b52e937f0 100644
--- a/stdlib/source/documentation/lux/meta/target/js.lux
+++ b/stdlib/source/documentation/lux/meta/target/js.lux
@@ -10,88 +10,89 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.Code)
- ($.definition /.code)
- ($.definition /.Expression)
- ($.definition /.Computation)
- ($.definition /.Location)
- ($.definition /.Statement)
- ($.definition /.Var)
- ($.definition /.Access)
- ($.definition /.Literal)
- ($.definition /.Loop)
- ($.definition /.Label)
- ($.definition /.null)
- ($.definition /.undefined)
- ($.definition /.boolean)
- ($.definition /.number)
- ($.definition /.string)
- ($.definition /.array)
- ($.definition /.var)
- ($.definition /.at)
- ($.definition /.the)
- ($.definition /.apply)
- ($.definition /.do)
- ($.definition /.object)
- ($.definition /.,)
- ($.definition /.then)
- ($.definition /.function_definition)
- ($.definition /.function)
- ($.definition /.closure)
- ($.definition /.=)
- ($.definition /.<)
- ($.definition /.<=)
- ($.definition /.>)
- ($.definition /.>=)
- ($.definition /.+)
- ($.definition /.-)
- ($.definition /.*)
- ($.definition /./)
- ($.definition /.%)
- ($.definition /.left_shift)
- ($.definition /.arithmetic_right_shift)
- ($.definition /.logic_right_shift)
- ($.definition /.or)
- ($.definition /.and)
- ($.definition /.bit_xor)
- ($.definition /.bit_or)
- ($.definition /.bit_and)
- ($.definition /.not)
- ($.definition /.bit_not)
- ($.definition /.opposite)
- ($.definition /.to_i32)
- ($.definition /.i32)
- ($.definition /.int)
- ($.definition /.?)
- ($.definition /.type_of)
- ($.definition /.new)
- ($.definition /.statement)
- ($.definition /.use_strict)
- ($.definition /.declare)
- ($.definition /.define)
- ($.definition /.set)
- ($.definition /.throw)
- ($.definition /.return)
- ($.definition /.delete)
- ($.definition /.if)
- ($.definition /.when)
- ($.definition /.while)
- ($.definition /.do_while)
- ($.definition /.try)
- ($.definition /.for)
- ($.definition /.label)
- ($.definition /.with_label)
- ($.definition /.break)
- ($.definition /.break_at)
- ($.definition /.continue)
- ($.definition /.continue_at)
- ($.definition /.++)
- ($.definition /.--)
- ($.definition /.comment)
- ($.definition /.switch)
- ($.definition /.not_a_number?)]
- []))
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
+
+ ($.definition /.Code)
+ ($.definition /.code)
+ ($.definition /.Expression)
+ ($.definition /.Computation)
+ ($.definition /.Location)
+ ($.definition /.Statement)
+ ($.definition /.Var)
+ ($.definition /.Access)
+ ($.definition /.Literal)
+ ($.definition /.Loop)
+ ($.definition /.Label)
+ ($.definition /.null)
+ ($.definition /.undefined)
+ ($.definition /.boolean)
+ ($.definition /.number)
+ ($.definition /.string)
+ ($.definition /.array)
+ ($.definition /.var)
+ ($.definition /.at)
+ ($.definition /.the)
+ ($.definition /.apply)
+ ($.definition /.do)
+ ($.definition /.object)
+ ($.definition /.,)
+ ($.definition /.then)
+ ($.definition /.function_definition)
+ ($.definition /.function)
+ ($.definition /.closure)
+ ($.definition /.=)
+ ($.definition /.<)
+ ($.definition /.<=)
+ ($.definition /.>)
+ ($.definition /.>=)
+ ($.definition /.+)
+ ($.definition /.-)
+ ($.definition /.*)
+ ($.definition /./)
+ ($.definition /.%)
+ ($.definition /.left_shift)
+ ($.definition /.arithmetic_right_shift)
+ ($.definition /.logic_right_shift)
+ ($.definition /.or)
+ ($.definition /.and)
+ ($.definition /.bit_xor)
+ ($.definition /.bit_or)
+ ($.definition /.bit_and)
+ ($.definition /.not)
+ ($.definition /.bit_not)
+ ($.definition /.opposite)
+ ($.definition /.to_i32)
+ ($.definition /.i32)
+ ($.definition /.int)
+ ($.definition /.?)
+ ($.definition /.type_of)
+ ($.definition /.new)
+ ($.definition /.statement)
+ ($.definition /.use_strict)
+ ($.definition /.declare)
+ ($.definition /.define)
+ ($.definition /.set)
+ ($.definition /.throw)
+ ($.definition /.return)
+ ($.definition /.delete)
+ ($.definition /.if)
+ ($.definition /.when)
+ ($.definition /.while)
+ ($.definition /.do_while)
+ ($.definition /.try)
+ ($.definition /.for)
+ ($.definition /.label)
+ ($.definition /.with_label)
+ ($.definition /.break)
+ ($.definition /.break_at)
+ ($.definition /.continue)
+ ($.definition /.continue_at)
+ ($.definition /.++)
+ ($.definition /.--)
+ ($.definition /.comment)
+ ($.definition /.switch)
+ ($.definition /.not_a_number?)
+ ))
diff --git a/stdlib/source/documentation/lux/meta/target/jvm/type.lux b/stdlib/source/documentation/lux/meta/target/jvm/type.lux
index 4b0705c7e..88d11d15b 100644
--- a/stdlib/source/documentation/lux/meta/target/jvm/type.lux
+++ b/stdlib/source/documentation/lux/meta/target/jvm/type.lux
@@ -1,12 +1,12 @@
(.require
[library
- [lux (.except char)
+ [lux (.except)
["$" documentation]
[data
[text (.only \n)
["%" \\format (.only format)]]
[collection
- ["[0]" list]]]]]
+ ["[0]" list (.use "[1]#[0]" monoid)]]]]]
[\\library
["[0]" /]]
["[0]" /
@@ -19,46 +19,51 @@
["[1][0]" reflection]
["[1][0]" signature]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.Type)
- ($.definition /.Argument)
- ($.definition /.Typed)
- ($.definition /.Constraint)
- ($.definition /.signature)
- ($.definition /.descriptor)
- ($.definition /.reflection)
- ($.definition /.void)
- ($.definition /.boolean)
- ($.definition /.byte)
- ($.definition /.short)
- ($.definition /.int)
- ($.definition /.long)
- ($.definition /.float)
- ($.definition /.double)
- ($.definition /.char)
- ($.definition /.array)
- ($.definition /.class)
- ($.definition /.declaration)
- ($.definition /.as_class)
- ($.definition /.wildcard)
- ($.definition /.var)
- ($.definition /.lower)
- ($.definition /.upper)
- ($.definition /.method)
- ($.definition /.equivalence)
- ($.definition /.hash)
- ($.definition /.primitive?)
- ($.definition /.void?)
- ($.definition /.class?)
- ($.definition /.format)]
- [/alias.documentation
- /box.documentation
- /category.documentation
- /descriptor.documentation
- /lux.documentation
- /parser.documentation
- /reflection.documentation
- /signature.documentation]))
+(def .public documentation
+ (List $.Documentation)
+ (list.partial ($.module /._
+ "")
+
+ ($.definition /.Type)
+ ($.definition /.Argument)
+ ($.definition /.Typed)
+ ($.definition /.Constraint)
+ ($.definition /.signature)
+ ($.definition /.descriptor)
+ ($.definition /.reflection)
+ ($.definition /.void)
+ ($.definition /.boolean)
+ ($.definition /.byte)
+ ($.definition /.short)
+ ($.definition /.int)
+ ($.definition /.long)
+ ($.definition /.float)
+ ($.definition /.double)
+ ($.definition /.char)
+ ($.definition /.array)
+ ($.definition /.class)
+ ($.definition /.declaration)
+ ($.definition /.as_class)
+ ($.definition /.wildcard)
+ ($.definition /.var)
+ ($.definition /.lower)
+ ($.definition /.upper)
+ ($.definition /.method)
+ ($.definition /.equivalence)
+ ($.definition /.hash)
+ ($.definition /.primitive?)
+ ($.definition /.void?)
+ ($.definition /.class?)
+ ($.definition /.format)
+
+ (all list#composite
+ /alias.documentation
+ /box.documentation
+ /category.documentation
+ /descriptor.documentation
+ /lux.documentation
+ /parser.documentation
+ /reflection.documentation
+ /signature.documentation
+ )
+ ))
diff --git a/stdlib/source/documentation/lux/meta/target/jvm/type/alias.lux b/stdlib/source/documentation/lux/meta/target/jvm/type/alias.lux
index a95f2515a..7d9ea965e 100644
--- a/stdlib/source/documentation/lux/meta/target/jvm/type/alias.lux
+++ b/stdlib/source/documentation/lux/meta/target/jvm/type/alias.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except char)
+ [lux (.except)
["$" documentation]
[data
[text (.only \n)
@@ -10,11 +10,12 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.Aliasing)
- ($.definition /.fresh)
- ($.definition /.method)]
- []))
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
+
+ ($.definition /.Aliasing)
+ ($.definition /.fresh)
+ ($.definition /.method)
+ ))
diff --git a/stdlib/source/documentation/lux/meta/target/jvm/type/box.lux b/stdlib/source/documentation/lux/meta/target/jvm/type/box.lux
index 55bb96b15..bd38778f6 100644
--- a/stdlib/source/documentation/lux/meta/target/jvm/type/box.lux
+++ b/stdlib/source/documentation/lux/meta/target/jvm/type/box.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except char)
+ [lux (.except)
["$" documentation]
[data
[text (.only \n)
@@ -10,16 +10,17 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.boolean)
- ($.definition /.byte)
- ($.definition /.short)
- ($.definition /.int)
- ($.definition /.long)
- ($.definition /.float)
- ($.definition /.double)
- ($.definition /.char)]
- []))
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
+
+ ($.definition /.boolean)
+ ($.definition /.byte)
+ ($.definition /.short)
+ ($.definition /.int)
+ ($.definition /.long)
+ ($.definition /.float)
+ ($.definition /.double)
+ ($.definition /.char)
+ ))
diff --git a/stdlib/source/documentation/lux/meta/target/jvm/type/category.lux b/stdlib/source/documentation/lux/meta/target/jvm/type/category.lux
index 670dd0b25..91bdb26ad 100644
--- a/stdlib/source/documentation/lux/meta/target/jvm/type/category.lux
+++ b/stdlib/source/documentation/lux/meta/target/jvm/type/category.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except char)
+ [lux (.except)
["$" documentation]
[data
[text (.only \n)
@@ -10,21 +10,22 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.Method)
- ($.definition /.Return')
- ($.definition /.Value')
- ($.definition /.Return)
- ($.definition /.Value)
- ($.definition /.Void)
- ($.definition /.Object)
- ($.definition /.Parameter)
- ($.definition /.Primitive)
- ($.definition /.Var)
- ($.definition /.Class)
- ($.definition /.Array)
- ($.definition /.Declaration)]
- []))
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
+
+ ($.definition /.Method)
+ ($.definition /.Return')
+ ($.definition /.Value')
+ ($.definition /.Return)
+ ($.definition /.Value)
+ ($.definition /.Void)
+ ($.definition /.Object)
+ ($.definition /.Parameter)
+ ($.definition /.Primitive)
+ ($.definition /.Var)
+ ($.definition /.Class)
+ ($.definition /.Array)
+ ($.definition /.Declaration)
+ ))
diff --git a/stdlib/source/documentation/lux/meta/target/jvm/type/descriptor.lux b/stdlib/source/documentation/lux/meta/target/jvm/type/descriptor.lux
index 7df3c49e6..750c40b5f 100644
--- a/stdlib/source/documentation/lux/meta/target/jvm/type/descriptor.lux
+++ b/stdlib/source/documentation/lux/meta/target/jvm/type/descriptor.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except char)
+ [lux (.except)
["$" documentation]
[data
[text (.only \n)
@@ -10,33 +10,34 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.Descriptor)
- ($.definition /.descriptor)
- ($.definition /.void)
- ($.definition /.boolean)
- ($.definition /.byte)
- ($.definition /.short)
- ($.definition /.int)
- ($.definition /.long)
- ($.definition /.float)
- ($.definition /.double)
- ($.definition /.char)
- ($.definition /.class_prefix)
- ($.definition /.class_suffix)
- ($.definition /.class)
- ($.definition /.declaration)
- ($.definition /.as_class)
- ($.definition /.var)
- ($.definition /.wildcard)
- ($.definition /.lower)
- ($.definition /.upper)
- ($.definition /.array_prefix)
- ($.definition /.array)
- ($.definition /.method)
- ($.definition /.equivalence)
- ($.definition /.class_name)]
- []))
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
+
+ ($.definition /.Descriptor)
+ ($.definition /.descriptor)
+ ($.definition /.void)
+ ($.definition /.boolean)
+ ($.definition /.byte)
+ ($.definition /.short)
+ ($.definition /.int)
+ ($.definition /.long)
+ ($.definition /.float)
+ ($.definition /.double)
+ ($.definition /.char)
+ ($.definition /.class_prefix)
+ ($.definition /.class_suffix)
+ ($.definition /.class)
+ ($.definition /.declaration)
+ ($.definition /.as_class)
+ ($.definition /.var)
+ ($.definition /.wildcard)
+ ($.definition /.lower)
+ ($.definition /.upper)
+ ($.definition /.array_prefix)
+ ($.definition /.array)
+ ($.definition /.method)
+ ($.definition /.equivalence)
+ ($.definition /.class_name)
+ ))
diff --git a/stdlib/source/documentation/lux/meta/target/jvm/type/lux.lux b/stdlib/source/documentation/lux/meta/target/jvm/type/lux.lux
index 12f08046b..4d50fc0f2 100644
--- a/stdlib/source/documentation/lux/meta/target/jvm/type/lux.lux
+++ b/stdlib/source/documentation/lux/meta/target/jvm/type/lux.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except char)
+ [lux (.except)
["$" documentation]
[data
[text (.only \n)
@@ -10,19 +10,20 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.Lower)
- ($.definition /.Upper)
- ($.definition /.Mapping)
- ($.definition /.fresh)
- ($.definition /.unknown_var)
- ($.definition /.class)
- ($.definition /.type)
- ($.definition /.boxed_type)
- ($.definition /.return)
- ($.definition /.boxed_return)
- ($.definition /.check)]
- []))
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
+
+ ($.definition /.Lower)
+ ($.definition /.Upper)
+ ($.definition /.Mapping)
+ ($.definition /.fresh)
+ ($.definition /.unknown_var)
+ ($.definition /.class)
+ ($.definition /.type)
+ ($.definition /.boxed_type)
+ ($.definition /.return)
+ ($.definition /.boxed_return)
+ ($.definition /.check)
+ ))
diff --git a/stdlib/source/documentation/lux/meta/target/jvm/type/parser.lux b/stdlib/source/documentation/lux/meta/target/jvm/type/parser.lux
index e647e1a81..d80d68c2b 100644
--- a/stdlib/source/documentation/lux/meta/target/jvm/type/parser.lux
+++ b/stdlib/source/documentation/lux/meta/target/jvm/type/parser.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except char)
+ [lux (.except)
["$" documentation]
[data
[text (.only \n)
@@ -10,44 +10,45 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.void)
- ($.definition /.boolean)
- ($.definition /.byte)
- ($.definition /.short)
- ($.definition /.int)
- ($.definition /.long)
- ($.definition /.float)
- ($.definition /.double)
- ($.definition /.char)
- ($.definition /.wildcard)
- ($.definition /.primitive)
- ($.definition /.class_name)
- ($.definition /.var_name)
- ($.definition /.var')
- ($.definition /.var)
- ($.definition /.var?)
- ($.definition /.name)
- ($.definition /.parameter)
- ($.definition /.array')
- ($.definition /.class)
- ($.definition /.lower?)
- ($.definition /.upper?)
- ($.definition /.read_class)
- ($.definition /.value)
- ($.definition /.array)
- ($.definition /.object)
- ($.definition /.return)
- ($.definition /.method)
- ($.definition /.array?)
- ($.definition /.class?)
- ($.definition /.primitive?)
- ($.definition /.wildcard?)
- ($.definition /.parameter?)
- ($.definition /.object?)
- ($.definition /.declaration')
- ($.definition /.declaration)]
- []))
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
+
+ ($.definition /.void)
+ ($.definition /.boolean)
+ ($.definition /.byte)
+ ($.definition /.short)
+ ($.definition /.int)
+ ($.definition /.long)
+ ($.definition /.float)
+ ($.definition /.double)
+ ($.definition /.char)
+ ($.definition /.wildcard)
+ ($.definition /.primitive)
+ ($.definition /.class_name)
+ ($.definition /.var_name)
+ ($.definition /.var')
+ ($.definition /.var)
+ ($.definition /.var?)
+ ($.definition /.name)
+ ($.definition /.parameter)
+ ($.definition /.array')
+ ($.definition /.class)
+ ($.definition /.lower?)
+ ($.definition /.upper?)
+ ($.definition /.read_class)
+ ($.definition /.value)
+ ($.definition /.array)
+ ($.definition /.object)
+ ($.definition /.return)
+ ($.definition /.method)
+ ($.definition /.array?)
+ ($.definition /.class?)
+ ($.definition /.primitive?)
+ ($.definition /.wildcard?)
+ ($.definition /.parameter?)
+ ($.definition /.object?)
+ ($.definition /.declaration')
+ ($.definition /.declaration)
+ ))
diff --git a/stdlib/source/documentation/lux/meta/target/jvm/type/reflection.lux b/stdlib/source/documentation/lux/meta/target/jvm/type/reflection.lux
index 4ffeb078b..9439e0b2b 100644
--- a/stdlib/source/documentation/lux/meta/target/jvm/type/reflection.lux
+++ b/stdlib/source/documentation/lux/meta/target/jvm/type/reflection.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except char)
+ [lux (.except)
["$" documentation]
[data
[text (.only \n)
@@ -10,28 +10,29 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.Reflection)
- ($.definition /.reflection)
- ($.definition /.equivalence)
- ($.definition /.void)
- ($.definition /.boolean)
- ($.definition /.byte)
- ($.definition /.short)
- ($.definition /.int)
- ($.definition /.long)
- ($.definition /.float)
- ($.definition /.double)
- ($.definition /.char)
- ($.definition /.class)
- ($.definition /.declaration)
- ($.definition /.as_class)
- ($.definition /.array)
- ($.definition /.var)
- ($.definition /.wildcard)
- ($.definition /.lower)
- ($.definition /.upper)]
- []))
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
+
+ ($.definition /.Reflection)
+ ($.definition /.reflection)
+ ($.definition /.equivalence)
+ ($.definition /.void)
+ ($.definition /.boolean)
+ ($.definition /.byte)
+ ($.definition /.short)
+ ($.definition /.int)
+ ($.definition /.long)
+ ($.definition /.float)
+ ($.definition /.double)
+ ($.definition /.char)
+ ($.definition /.class)
+ ($.definition /.declaration)
+ ($.definition /.as_class)
+ ($.definition /.array)
+ ($.definition /.var)
+ ($.definition /.wildcard)
+ ($.definition /.lower)
+ ($.definition /.upper)
+ ))
diff --git a/stdlib/source/documentation/lux/meta/target/jvm/type/signature.lux b/stdlib/source/documentation/lux/meta/target/jvm/type/signature.lux
index f7454baf0..fea7063e4 100644
--- a/stdlib/source/documentation/lux/meta/target/jvm/type/signature.lux
+++ b/stdlib/source/documentation/lux/meta/target/jvm/type/signature.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except char)
+ [lux (.except)
["$" documentation]
[data
[text (.only \n)
@@ -10,39 +10,40 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.Signature)
- ($.definition /.signature)
- ($.definition /.void)
- ($.definition /.boolean)
- ($.definition /.byte)
- ($.definition /.short)
- ($.definition /.int)
- ($.definition /.long)
- ($.definition /.float)
- ($.definition /.double)
- ($.definition /.char)
- ($.definition /.array)
- ($.definition /.wildcard)
- ($.definition /.var_prefix)
- ($.definition /.var)
- ($.definition /.var_name)
- ($.definition /.lower_prefix)
- ($.definition /.upper_prefix)
- ($.definition /.lower)
- ($.definition /.upper)
- ($.definition /.parameters_start)
- ($.definition /.parameters_end)
- ($.definition /.class)
- ($.definition /.declaration)
- ($.definition /.as_class)
- ($.definition /.arguments_start)
- ($.definition /.arguments_end)
- ($.definition /.exception_prefix)
- ($.definition /.method)
- ($.definition /.equivalence)
- ($.definition /.hash)]
- []))
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
+
+ ($.definition /.Signature)
+ ($.definition /.signature)
+ ($.definition /.void)
+ ($.definition /.boolean)
+ ($.definition /.byte)
+ ($.definition /.short)
+ ($.definition /.int)
+ ($.definition /.long)
+ ($.definition /.float)
+ ($.definition /.double)
+ ($.definition /.char)
+ ($.definition /.array)
+ ($.definition /.wildcard)
+ ($.definition /.var_prefix)
+ ($.definition /.var)
+ ($.definition /.var_name)
+ ($.definition /.lower_prefix)
+ ($.definition /.upper_prefix)
+ ($.definition /.lower)
+ ($.definition /.upper)
+ ($.definition /.parameters_start)
+ ($.definition /.parameters_end)
+ ($.definition /.class)
+ ($.definition /.declaration)
+ ($.definition /.as_class)
+ ($.definition /.arguments_start)
+ ($.definition /.arguments_end)
+ ($.definition /.exception_prefix)
+ ($.definition /.method)
+ ($.definition /.equivalence)
+ ($.definition /.hash)
+ ))
diff --git a/stdlib/source/documentation/lux/meta/target/lua.lux b/stdlib/source/documentation/lux/meta/target/lua.lux
index 34bd530d3..8d7b66680 100644
--- a/stdlib/source/documentation/lux/meta/target/lua.lux
+++ b/stdlib/source/documentation/lux/meta/target/lua.lux
@@ -10,83 +10,84 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.Code)
- ($.definition /.equivalence)
- ($.definition /.hash)
- ($.definition /.manual)
- ($.definition /.code)
- ($.definition /.Expression)
- ($.definition /.Computation)
- ($.definition /.Location)
- ($.definition /.Statement)
- ($.definition /.Literal)
- ($.definition /.Var)
- ($.definition /.Access)
- ($.definition /.Label)
- ($.definition /.nil)
- ($.definition /.boolean)
- ($.definition /.int)
- ($.definition /.float)
- ($.definition /.string)
- ($.definition /.multi)
- ($.definition /.array)
- ($.definition /.table)
- ($.definition /.item)
- ($.definition /.the)
- ($.definition /.length)
- ($.definition /.apply)
- ($.definition /.do)
- ($.definition /.=)
- ($.definition /.<)
- ($.definition /.<=)
- ($.definition /.>)
- ($.definition /.>=)
- ($.definition /.+)
- ($.definition /.-)
- ($.definition /.*)
- ($.definition /.^)
- ($.definition /./)
- ($.definition /.//)
- ($.definition /.%)
- ($.definition /.concat)
- ($.definition /.or)
- ($.definition /.and)
- ($.definition /.bit_or)
- ($.definition /.bit_and)
- ($.definition /.bit_xor)
- ($.definition /.bit_shl)
- ($.definition /.bit_shr)
- ($.definition /.not)
- ($.definition /.opposite)
- ($.definition /.var)
- ($.definition /.label)
- ($.definition /.statement)
- ($.definition /.then)
- ($.definition /.local)
- ($.definition /.set)
- ($.definition /.let)
- ($.definition /.local/1)
- ($.definition /.if)
- ($.definition /.when)
- ($.definition /.while)
- ($.definition /.repeat)
- ($.definition /.for_in)
- ($.definition /.for_step)
- ($.definition /.return)
- ($.definition /.closure)
- ($.definition /.function)
- ($.definition /.local_function)
- ($.definition /.break)
- ($.definition /.set_label)
- ($.definition /.go_to)
- ($.definition /.error/1)
- ($.definition /.print/1)
- ($.definition /.require/1)
- ($.definition /.type/1)
- ($.definition /.ipairs/1)
- ($.definition /.error/2)]
- []))
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
+
+ ($.definition /.Code)
+ ($.definition /.equivalence)
+ ($.definition /.hash)
+ ($.definition /.manual)
+ ($.definition /.code)
+ ($.definition /.Expression)
+ ($.definition /.Computation)
+ ($.definition /.Location)
+ ($.definition /.Statement)
+ ($.definition /.Literal)
+ ($.definition /.Var)
+ ($.definition /.Access)
+ ($.definition /.Label)
+ ($.definition /.nil)
+ ($.definition /.boolean)
+ ($.definition /.int)
+ ($.definition /.float)
+ ($.definition /.string)
+ ($.definition /.multi)
+ ($.definition /.array)
+ ($.definition /.table)
+ ($.definition /.item)
+ ($.definition /.the)
+ ($.definition /.length)
+ ($.definition /.apply)
+ ($.definition /.do)
+ ($.definition /.=)
+ ($.definition /.<)
+ ($.definition /.<=)
+ ($.definition /.>)
+ ($.definition /.>=)
+ ($.definition /.+)
+ ($.definition /.-)
+ ($.definition /.*)
+ ($.definition /.^)
+ ($.definition /./)
+ ($.definition /.//)
+ ($.definition /.%)
+ ($.definition /.concat)
+ ($.definition /.or)
+ ($.definition /.and)
+ ($.definition /.bit_or)
+ ($.definition /.bit_and)
+ ($.definition /.bit_xor)
+ ($.definition /.bit_shl)
+ ($.definition /.bit_shr)
+ ($.definition /.not)
+ ($.definition /.opposite)
+ ($.definition /.var)
+ ($.definition /.label)
+ ($.definition /.statement)
+ ($.definition /.then)
+ ($.definition /.local)
+ ($.definition /.set)
+ ($.definition /.let)
+ ($.definition /.local/1)
+ ($.definition /.if)
+ ($.definition /.when)
+ ($.definition /.while)
+ ($.definition /.repeat)
+ ($.definition /.for_in)
+ ($.definition /.for_step)
+ ($.definition /.return)
+ ($.definition /.closure)
+ ($.definition /.function)
+ ($.definition /.local_function)
+ ($.definition /.break)
+ ($.definition /.set_label)
+ ($.definition /.go_to)
+ ($.definition /.error/1)
+ ($.definition /.print/1)
+ ($.definition /.require/1)
+ ($.definition /.type/1)
+ ($.definition /.ipairs/1)
+ ($.definition /.error/2)
+ ))
diff --git a/stdlib/source/documentation/lux/meta/target/python.lux b/stdlib/source/documentation/lux/meta/target/python.lux
index 952032825..50263c3b9 100644
--- a/stdlib/source/documentation/lux/meta/target/python.lux
+++ b/stdlib/source/documentation/lux/meta/target/python.lux
@@ -10,103 +10,104 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.Code)
- ($.definition /.equivalence)
- ($.definition /.hash)
- ($.definition /.manual)
- ($.definition /.code)
- ($.definition /.Expression)
- ($.definition /.Computation)
- ($.definition /.Location)
- ($.definition /.Var)
- ($.definition /.Statement)
- ($.definition /.Literal)
- ($.definition /.Access)
- ($.definition /.Loop)
- ($.definition /.SVar)
- ($.definition /.Single)
- ($.definition /.PVar)
- ($.definition /.Poly)
- ($.definition /.KVar)
- ($.definition /.Keyword)
- ($.definition /.var)
- ($.definition /.poly)
- ($.definition /.keyword)
- ($.definition /.none)
- ($.definition /.bool)
- ($.definition /.int)
- ($.definition /.long)
- ($.definition /.float)
- ($.definition /.string)
- ($.definition /.unicode)
- ($.definition /.tuple)
- ($.definition /.list)
- ($.definition /.slice)
- ($.definition /.slice_from)
- ($.definition /.dict)
- ($.definition /.apply)
- ($.definition /.splat_poly)
- ($.definition /.splat_keyword)
- ($.definition /.the)
- ($.definition /.do)
- ($.definition /.item)
- ($.definition /.?)
- ($.definition /.is)
- ($.definition /.=)
- ($.definition /.<)
- ($.definition /.<=)
- ($.definition /.>)
- ($.definition /.>=)
- ($.definition /.+)
- ($.definition /.-)
- ($.definition /.*)
- ($.definition /./)
- ($.definition /.//)
- ($.definition /.%)
- ($.definition /.**)
- ($.definition /.bit_or)
- ($.definition /.bit_and)
- ($.definition /.bit_xor)
- ($.definition /.bit_shl)
- ($.definition /.bit_shr)
- ($.definition /.or)
- ($.definition /.and)
- ($.definition /.not)
- ($.definition /.opposite)
- ($.definition /.lambda)
- ($.definition /.set)
- ($.definition /.delete)
- ($.definition /.if)
- ($.definition /.when)
- ($.definition /.then)
- ($.definition /.break)
- ($.definition /.continue)
- ($.definition /.while)
- ($.definition /.for_in)
- ($.definition /.statement)
- ($.definition /.pass)
- ($.definition /.Except)
- ($.definition /.try)
- ($.definition /.raise)
- ($.definition /.return)
- ($.definition /.print)
- ($.definition /.exec)
- ($.definition /.def)
- ($.definition /.import)
- ($.definition /.comment)
- ($.definition /.str/1)
- ($.definition /.ord/1)
- ($.definition /.float/1)
- ($.definition /.int/1)
- ($.definition /.len/1)
- ($.definition /.chr/1)
- ($.definition /.unichr/1)
- ($.definition /.unicode/1)
- ($.definition /.repr/1)
- ($.definition /.__import__/1)
- ($.definition /.Exception/1)]
- []))
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
+
+ ($.definition /.Code)
+ ($.definition /.equivalence)
+ ($.definition /.hash)
+ ($.definition /.manual)
+ ($.definition /.code)
+ ($.definition /.Expression)
+ ($.definition /.Computation)
+ ($.definition /.Location)
+ ($.definition /.Var)
+ ($.definition /.Statement)
+ ($.definition /.Literal)
+ ($.definition /.Access)
+ ($.definition /.Loop)
+ ($.definition /.SVar)
+ ($.definition /.Single)
+ ($.definition /.PVar)
+ ($.definition /.Poly)
+ ($.definition /.KVar)
+ ($.definition /.Keyword)
+ ($.definition /.var)
+ ($.definition /.poly)
+ ($.definition /.keyword)
+ ($.definition /.none)
+ ($.definition /.bool)
+ ($.definition /.int)
+ ($.definition /.long)
+ ($.definition /.float)
+ ($.definition /.string)
+ ($.definition /.unicode)
+ ($.definition /.tuple)
+ ($.definition /.list)
+ ($.definition /.slice)
+ ($.definition /.slice_from)
+ ($.definition /.dict)
+ ($.definition /.apply)
+ ($.definition /.splat_poly)
+ ($.definition /.splat_keyword)
+ ($.definition /.the)
+ ($.definition /.do)
+ ($.definition /.item)
+ ($.definition /.?)
+ ($.definition /.is)
+ ($.definition /.=)
+ ($.definition /.<)
+ ($.definition /.<=)
+ ($.definition /.>)
+ ($.definition /.>=)
+ ($.definition /.+)
+ ($.definition /.-)
+ ($.definition /.*)
+ ($.definition /./)
+ ($.definition /.//)
+ ($.definition /.%)
+ ($.definition /.**)
+ ($.definition /.bit_or)
+ ($.definition /.bit_and)
+ ($.definition /.bit_xor)
+ ($.definition /.bit_shl)
+ ($.definition /.bit_shr)
+ ($.definition /.or)
+ ($.definition /.and)
+ ($.definition /.not)
+ ($.definition /.opposite)
+ ($.definition /.lambda)
+ ($.definition /.set)
+ ($.definition /.delete)
+ ($.definition /.if)
+ ($.definition /.when)
+ ($.definition /.then)
+ ($.definition /.break)
+ ($.definition /.continue)
+ ($.definition /.while)
+ ($.definition /.for_in)
+ ($.definition /.statement)
+ ($.definition /.pass)
+ ($.definition /.Except)
+ ($.definition /.try)
+ ($.definition /.raise)
+ ($.definition /.return)
+ ($.definition /.print)
+ ($.definition /.exec)
+ ($.definition /.def)
+ ($.definition /.import)
+ ($.definition /.comment)
+ ($.definition /.str/1)
+ ($.definition /.ord/1)
+ ($.definition /.float/1)
+ ($.definition /.int/1)
+ ($.definition /.len/1)
+ ($.definition /.chr/1)
+ ($.definition /.unichr/1)
+ ($.definition /.unicode/1)
+ ($.definition /.repr/1)
+ ($.definition /.__import__/1)
+ ($.definition /.Exception/1)
+ ))
diff --git a/stdlib/source/documentation/lux/meta/target/ruby.lux b/stdlib/source/documentation/lux/meta/target/ruby.lux
index 7116cb82f..d67257929 100644
--- a/stdlib/source/documentation/lux/meta/target/ruby.lux
+++ b/stdlib/source/documentation/lux/meta/target/ruby.lux
@@ -10,104 +10,105 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.Code)
- ($.definition /.equivalence)
- ($.definition /.hash)
- ($.definition /.manual)
- ($.definition /.code)
- ($.definition /.Expression)
- ($.definition /.Computation)
- ($.definition /.Location)
- ($.definition /.Var)
- ($.definition /.LVar)
- ($.definition /.Statement)
- ($.definition /.Literal)
- ($.definition /.Access)
- ($.definition /.GVar)
- ($.definition /.IVar)
- ($.definition /.SVar)
- ($.definition /.LVar*)
- ($.definition /.LVar**)
- ($.definition /.global)
- ($.definition /.instance)
- ($.definition /.static)
- ($.definition /.local)
- ($.definition /.variadic)
- ($.definition /.splat)
- ($.definition /.variadic_kv)
- ($.definition /.double_splat)
- ($.definition /.latest_error_message)
- ($.definition /.latest_error_location)
- ($.definition /.last_string_read)
- ($.definition /.last_line_number_read)
- ($.definition /.last_string_matched)
- ($.definition /.last_regexp_match)
- ($.definition /.case_insensitivity_flag)
- ($.definition /.input_record_separator)
- ($.definition /.output_record_separator)
- ($.definition /.script_name)
- ($.definition /.process_id)
- ($.definition /.exit_status)
- ($.definition /.command_line_arguments)
- ($.definition /.nil)
- ($.definition /.bool)
- ($.definition /.int)
- ($.definition /.string)
- ($.definition /.symbol)
- ($.definition /.float)
- ($.definition /.array_range)
- ($.definition /.array)
- ($.definition /.hash)
- ($.definition /.apply)
- ($.definition /.apply_lambda)
- ($.definition /.the)
- ($.definition /.item)
- ($.definition /.?)
- ($.definition /.statement)
- ($.definition /.then)
- ($.definition /.set)
- ($.definition /.if)
- ($.definition /.when)
- ($.definition /.while)
- ($.definition /.for_in)
- ($.definition /.Rescue)
- ($.definition /.begin)
- ($.definition /.catch)
- ($.definition /.return)
- ($.definition /.raise)
- ($.definition /.next)
- ($.definition /.redo)
- ($.definition /.break)
- ($.definition /.function)
- ($.definition /.lambda)
- ($.definition /.=)
- ($.definition /.<)
- ($.definition /.<=)
- ($.definition /.>)
- ($.definition /.>=)
- ($.definition /.+)
- ($.definition /.-)
- ($.definition /.*)
- ($.definition /./)
- ($.definition /.%)
- ($.definition /.pow)
- ($.definition /.or)
- ($.definition /.and)
- ($.definition /.bit_or)
- ($.definition /.bit_and)
- ($.definition /.bit_xor)
- ($.definition /.bit_shl)
- ($.definition /.bit_shr)
- ($.definition /.not)
- ($.definition /.opposite)
- ($.definition /.comment)
- ($.definition /.do)
- ($.definition /.print/1)
- ($.definition /.require/1)
- ($.definition /.print/2)
- ($.definition /.throw/1)]
- []))
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
+
+ ($.definition /.Code)
+ ($.definition /.equivalence)
+ ($.definition /.hash)
+ ($.definition /.manual)
+ ($.definition /.code)
+ ($.definition /.Expression)
+ ($.definition /.Computation)
+ ($.definition /.Location)
+ ($.definition /.Var)
+ ($.definition /.LVar)
+ ($.definition /.Statement)
+ ($.definition /.Literal)
+ ($.definition /.Access)
+ ($.definition /.GVar)
+ ($.definition /.IVar)
+ ($.definition /.SVar)
+ ($.definition /.LVar*)
+ ($.definition /.LVar**)
+ ($.definition /.global)
+ ($.definition /.instance)
+ ($.definition /.static)
+ ($.definition /.local)
+ ($.definition /.variadic)
+ ($.definition /.splat)
+ ($.definition /.variadic_kv)
+ ($.definition /.double_splat)
+ ($.definition /.latest_error_message)
+ ($.definition /.latest_error_location)
+ ($.definition /.last_string_read)
+ ($.definition /.last_line_number_read)
+ ($.definition /.last_string_matched)
+ ($.definition /.last_regexp_match)
+ ($.definition /.case_insensitivity_flag)
+ ($.definition /.input_record_separator)
+ ($.definition /.output_record_separator)
+ ($.definition /.script_name)
+ ($.definition /.process_id)
+ ($.definition /.exit_status)
+ ($.definition /.command_line_arguments)
+ ($.definition /.nil)
+ ($.definition /.bool)
+ ($.definition /.int)
+ ($.definition /.string)
+ ($.definition /.symbol)
+ ($.definition /.float)
+ ($.definition /.array_range)
+ ($.definition /.array)
+ ($.definition /.hash)
+ ($.definition /.apply)
+ ($.definition /.apply_lambda)
+ ($.definition /.the)
+ ($.definition /.item)
+ ($.definition /.?)
+ ($.definition /.statement)
+ ($.definition /.then)
+ ($.definition /.set)
+ ($.definition /.if)
+ ($.definition /.when)
+ ($.definition /.while)
+ ($.definition /.for_in)
+ ($.definition /.Rescue)
+ ($.definition /.begin)
+ ($.definition /.catch)
+ ($.definition /.return)
+ ($.definition /.raise)
+ ($.definition /.next)
+ ($.definition /.redo)
+ ($.definition /.break)
+ ($.definition /.function)
+ ($.definition /.lambda)
+ ($.definition /.=)
+ ($.definition /.<)
+ ($.definition /.<=)
+ ($.definition /.>)
+ ($.definition /.>=)
+ ($.definition /.+)
+ ($.definition /.-)
+ ($.definition /.*)
+ ($.definition /./)
+ ($.definition /.%)
+ ($.definition /.pow)
+ ($.definition /.or)
+ ($.definition /.and)
+ ($.definition /.bit_or)
+ ($.definition /.bit_and)
+ ($.definition /.bit_xor)
+ ($.definition /.bit_shl)
+ ($.definition /.bit_shr)
+ ($.definition /.not)
+ ($.definition /.opposite)
+ ($.definition /.comment)
+ ($.definition /.do)
+ ($.definition /.print/1)
+ ($.definition /.require/1)
+ ($.definition /.print/2)
+ ($.definition /.throw/1)
+ ))
diff --git a/stdlib/source/documentation/lux/meta/type.lux b/stdlib/source/documentation/lux/meta/type.lux
index b0736757a..4e2d13faa 100644
--- a/stdlib/source/documentation/lux/meta/type.lux
+++ b/stdlib/source/documentation/lux/meta/type.lux
@@ -4,7 +4,9 @@
["$" documentation]
[data
["[0]" text (.only \n)
- ["%" \\format (.only format)]]]
+ ["%" \\format (.only format)]]
+ [collection
+ ["[0]" list (.use "[1]#[0]" monoid)]]]
[meta
[macro
["[0]" template]]]]]
@@ -23,251 +25,257 @@
["[1][0]" unit]
["[1][0]" variance]])
-(`` (.def \\parser
- (.List $.Module)
- ($.module \\parser._
- (format "Parsing of Lux types."
- \n "Used mostly for polytypic programming.")
- [($.definition \\parser.not_existential)
- ($.definition \\parser.not_recursive)
- ($.definition \\parser.not_named)
- ($.definition \\parser.not_parameter)
- ($.definition \\parser.unknown_parameter)
- ($.definition \\parser.not_function)
- ($.definition \\parser.not_application)
- ($.definition \\parser.not_polymorphic)
- ($.definition \\parser.not_variant)
- ($.definition \\parser.not_tuple)
- ($.definition \\parser.types_do_not_match)
- ($.definition \\parser.wrong_parameter)
- ($.definition \\parser.empty_input)
- ($.definition \\parser.unconsumed_input)
- ($.definition \\parser.parameter)
- ($.definition \\parser.recursive_self)
- ($.definition \\parser.recursive_call)
-
- ($.definition \\parser.Env
- "An environment for type parsing.")
-
- ($.definition (\\parser.Parser it)
- "A parser of Lux types.")
-
- ($.definition \\parser.fresh
- "An empty parsing environment.")
-
- ($.definition \\parser.result
- (format "Applies a parser against a type."
- \n "Verifies that the parser fully consumes the type's information.")
- [(result poly type)])
-
- ($.definition \\parser.env
- "Yields the current parsing environment.")
-
- ($.definition \\parser.next
- "Inspect a type in the input stream without consuming it.")
-
- ($.definition \\parser.any
- "Yields a type, without examination.")
-
- ($.definition \\parser.local
- "Apply a parser to the given inputs."
- [(local types poly)])
-
- ($.definition \\parser.with_extension
- ""
- [(with_extension type poly)])
-
- (,, (with_template [<name>]
- [(`` ($.definition <name>
- (format "Parses the contents of a " (,, (template.text [<name>])) " type.")))]
-
- [\\parser.variant]
- [\\parser.tuple]
- ))
-
- ($.definition \\parser.polymorphic
- ""
- [(polymorphic poly)])
-
- ($.definition \\parser.function
- "Parses a function's inputs and output."
- [(function in_poly out_poly)])
-
- ($.definition \\parser.applied
- "Parses a type application."
- [(applied poly)])
-
- (,, (with_template [<name> <doc>]
- [($.definition <name>
- <doc>)]
-
- [\\parser.exactly "Parses a type exactly."]
- [\\parser.sub "Parses a sub type."]
- [\\parser.super "Parses a super type."]
- ))
-
- ($.definition \\parser.argument
- ""
- [(argument env idx)])
-
- ($.definition \\parser.this_parameter
- ""
- [(this_parameter id)])
-
- ($.definition \\parser.existential
- "Yields an existential type.")
-
- ($.definition \\parser.named
- "Yields a named type.")
-
- ($.definition \\parser.recursive
- ""
- [(recursive poly)])]
- [])))
-
-(`` (.def .public documentation
- (.List $.Module)
- ($.module /._
- "Basic functionality for working with types."
- [($.definition /.equivalence)
-
- (,, (with_template [<name>]
- [($.definition <name>
- "The number of parameters, and the body, of a quantified type.")]
-
- [/.flat_univ_q]
- [/.flat_ex_q]
- ))
-
- ($.definition /.flat_function
- "The input, and the output of a function type."
- [(flat_function type)])
-
- ($.definition /.flat_application
- "The quantified type, and its parameters, for a type-application."
- [(flat_application type)])
-
- (,, (with_template [<name>]
- [($.definition <name>
- "The members of a composite type.")]
-
- [/.flat_variant]
- [/.flat_tuple]
- ))
-
- ($.definition /.format
- "A (readable) textual representable of a type."
- [(format type)])
-
- ($.definition /.applied
- "To the extend possible, applies a quantified type to the given parameters."
- [(applied params func)])
-
- ($.definition /.code
- (%.format "A representation of a type as code."
- \n "The code is such that evaluating it would yield the type value.")
- [(code type)])
-
- ($.definition /.de_aliased
- "A (potentially named) type that does not have its name shadowed by other names."
- [(de_aliased type)])
-
- ($.definition /.anonymous
- "A type without any names covering it."
- [(anonymous type)])
-
- (,, (with_template [<name>]
- [($.definition <name>
- "A composite type, constituted by the given member types.")]
-
- [/.variant]
- [/.tuple]
- ))
-
- ($.definition /.function
- "A function type, with the given inputs and output."
- [(function inputs output)])
-
- ($.definition /.application
- "An un-evaluated type application, with the given quantified type, and parameters."
- [(application params quant)])
-
- (,, (with_template [<name>]
- [($.definition <name>
- "A quantified type, with the given number of parameters, and body.")]
-
- [/.univ_q]
- [/.ex_q]
- ))
-
- ($.definition /.quantified?
- "Only yields #1 for universally or existentially quantified types."
- [(quantified? type)])
-
- ($.definition /.array
- "An array type, with the given level of nesting/depth, and the given element type."
- [(array depth element_type)])
-
- ($.definition /.flat_array
- "The level of nesting/depth and element type for an array type."
- [(flat_array type)])
-
- ($.definition /.array?
- "Is a type an array type?")
-
- ($.definition /.log!
- "Logs to the console/terminal the type of an expression."
- [(log! (is Foo (foo expression)))
- "=>"
- "Expression: (foo expression)"
- " Type: Foo"
- (foo expression)])
-
- ($.definition /.as
- (%.format "Casts a value to a specific type."
- \n "The specified type can depend on type variables of the original type of the value."
- \n "NOTE: Careless use of type-casts is an easy way to introduce bugs. USE WITH CAUTION.")
- [(is (Bar Bit Nat Text)
- (as [a b c]
- (Foo a [b c])
- (Bar a b c)
- (is (Foo Bit [Nat Text])
- (foo expression))))])
-
- ($.definition /.sharing
- "Allows specifing the type of an expression as sharing type-variables with the type of another expression."
- [(is (Bar Bit Nat Text)
- (sharing [a b c]
- (is (Foo a [b c])
- (is (Foo Bit [Nat Text])
- (foo expression)))
- (is (Bar a b c)
- (bar expression))))])
-
- ($.definition /.by_example
- "Constructs a type that shares type-variables with an expression of some other type."
- [(is Type
- (by_example [a b c]
- (is (Foo a [b c])
- (is (Foo Bit [Nat Text])
- (foo expression)))
- (Bar a b c)))
- "=>"
- (.type_literal (Bar Bit Nat Text))])
-
- ($.definition /.let
- "Local bindings for types."
- [(let [side (Either Int Frac)]
- (List [side side]))])]
- [..\\parser
-
- /primitive.documentation
- /check.documentation
- /dynamic.documentation
- /implicit.documentation
- /poly.documentation
- /quotient.documentation
- /refinement.documentation
- /resource.documentation
- /unit.documentation
- /variance.documentation])))
+(`` (def \\parser
+ (List $.Documentation)
+ (list ($.module \\parser._
+ (format "Parsing of Lux types."
+ \n "Used mostly for polytypic programming."))
+
+ ($.definition \\parser.not_existential)
+ ($.definition \\parser.not_recursive)
+ ($.definition \\parser.not_named)
+ ($.definition \\parser.not_parameter)
+ ($.definition \\parser.unknown_parameter)
+ ($.definition \\parser.not_function)
+ ($.definition \\parser.not_application)
+ ($.definition \\parser.not_polymorphic)
+ ($.definition \\parser.not_variant)
+ ($.definition \\parser.not_tuple)
+ ($.definition \\parser.types_do_not_match)
+ ($.definition \\parser.wrong_parameter)
+ ($.definition \\parser.empty_input)
+ ($.definition \\parser.unconsumed_input)
+ ($.definition \\parser.parameter)
+ ($.definition \\parser.recursive_self)
+ ($.definition \\parser.recursive_call)
+
+ ($.definition \\parser.Env
+ "An environment for type parsing.")
+
+ ($.definition (\\parser.Parser it)
+ "A parser of Lux types.")
+
+ ($.definition \\parser.fresh
+ "An empty parsing environment.")
+
+ ($.definition \\parser.result
+ (format "Applies a parser against a type."
+ \n "Verifies that the parser fully consumes the type's information.")
+ [(result poly type)])
+
+ ($.definition \\parser.env
+ "Yields the current parsing environment.")
+
+ ($.definition \\parser.next
+ "Inspect a type in the input stream without consuming it.")
+
+ ($.definition \\parser.any
+ "Yields a type, without examination.")
+
+ ($.definition \\parser.local
+ "Apply a parser to the given inputs."
+ [(local types poly)])
+
+ ($.definition \\parser.with_extension
+ ""
+ [(with_extension type poly)])
+
+ (,, (with_template [<name>]
+ [(`` ($.definition <name>
+ (format "Parses the contents of a " (,, (template.text [<name>])) " type.")))]
+
+ [\\parser.variant]
+ [\\parser.tuple]
+ ))
+
+ ($.definition \\parser.polymorphic
+ ""
+ [(polymorphic poly)])
+
+ ($.definition \\parser.function
+ "Parses a function's inputs and output."
+ [(function in_poly out_poly)])
+
+ ($.definition \\parser.applied
+ "Parses a type application."
+ [(applied poly)])
+
+ (,, (with_template [<name> <doc>]
+ [($.definition <name>
+ <doc>)]
+
+ [\\parser.exactly "Parses a type exactly."]
+ [\\parser.sub "Parses a sub type."]
+ [\\parser.super "Parses a super type."]
+ ))
+
+ ($.definition \\parser.argument
+ ""
+ [(argument env idx)])
+
+ ($.definition \\parser.this_parameter
+ ""
+ [(this_parameter id)])
+
+ ($.definition \\parser.existential
+ "Yields an existential type.")
+
+ ($.definition \\parser.named
+ "Yields a named type.")
+
+ ($.definition \\parser.recursive
+ ""
+ [(recursive poly)])
+ )))
+
+(`` (def .public documentation
+ (List $.Documentation)
+ (list.partial ($.module /._
+ "Basic functionality for working with types.")
+
+ ($.definition /.equivalence)
+
+ (,, (with_template [<name>]
+ [($.definition <name>
+ "The number of parameters, and the body, of a quantified type.")]
+
+ [/.flat_univ_q]
+ [/.flat_ex_q]
+ ))
+
+ ($.definition /.flat_function
+ "The input, and the output of a function type."
+ [(flat_function type)])
+
+ ($.definition /.flat_application
+ "The quantified type, and its parameters, for a type-application."
+ [(flat_application type)])
+
+ (,, (with_template [<name>]
+ [($.definition <name>
+ "The members of a composite type.")]
+
+ [/.flat_variant]
+ [/.flat_tuple]
+ ))
+
+ ($.definition /.format
+ "A (readable) textual representable of a type."
+ [(format type)])
+
+ ($.definition /.applied
+ "To the extend possible, applies a quantified type to the given parameters."
+ [(applied params func)])
+
+ ($.definition /.code
+ (%.format "A representation of a type as code."
+ \n "The code is such that evaluating it would yield the type value.")
+ [(code type)])
+
+ ($.definition /.de_aliased
+ "A (potentially named) type that does not have its name shadowed by other names."
+ [(de_aliased type)])
+
+ ($.definition /.anonymous
+ "A type without any names covering it."
+ [(anonymous type)])
+
+ (,, (with_template [<name>]
+ [($.definition <name>
+ "A composite type, constituted by the given member types.")]
+
+ [/.variant]
+ [/.tuple]
+ ))
+
+ ($.definition /.function
+ "A function type, with the given inputs and output."
+ [(function inputs output)])
+
+ ($.definition /.application
+ "An un-evaluated type application, with the given quantified type, and parameters."
+ [(application params quant)])
+
+ (,, (with_template [<name>]
+ [($.definition <name>
+ "A quantified type, with the given number of parameters, and body.")]
+
+ [/.univ_q]
+ [/.ex_q]
+ ))
+
+ ($.definition /.quantified?
+ "Only yields #1 for universally or existentially quantified types."
+ [(quantified? type)])
+
+ ($.definition /.array
+ "An array type, with the given level of nesting/depth, and the given element type."
+ [(array depth element_type)])
+
+ ($.definition /.flat_array
+ "The level of nesting/depth and element type for an array type."
+ [(flat_array type)])
+
+ ($.definition /.array?
+ "Is a type an array type?")
+
+ ($.definition /.log!
+ "Logs to the console/terminal the type of an expression."
+ [(log! (is Foo (foo expression)))
+ "=>"
+ "Expression: (foo expression)"
+ " Type: Foo"
+ (foo expression)])
+
+ ($.definition /.as
+ (%.format "Casts a value to a specific type."
+ \n "The specified type can depend on type variables of the original type of the value."
+ \n "NOTE: Careless use of type-casts is an easy way to introduce bugs. USE WITH CAUTION.")
+ [(is (Bar Bit Nat Text)
+ (as [a b c]
+ (Foo a [b c])
+ (Bar a b c)
+ (is (Foo Bit [Nat Text])
+ (foo expression))))])
+
+ ($.definition /.sharing
+ "Allows specifing the type of an expression as sharing type-variables with the type of another expression."
+ [(is (Bar Bit Nat Text)
+ (sharing [a b c]
+ (is (Foo a [b c])
+ (is (Foo Bit [Nat Text])
+ (foo expression)))
+ (is (Bar a b c)
+ (bar expression))))])
+
+ ($.definition /.by_example
+ "Constructs a type that shares type-variables with an expression of some other type."
+ [(is Type
+ (by_example [a b c]
+ (is (Foo a [b c])
+ (is (Foo Bit [Nat Text])
+ (foo expression)))
+ (Bar a b c)))
+ "=>"
+ (.type_literal (Bar Bit Nat Text))])
+
+ ($.definition /.let
+ "Local bindings for types."
+ [(let [side (Either Int Frac)]
+ (List [side side]))])
+
+ (all list#composite
+ ..\\parser
+
+ /primitive.documentation
+ /check.documentation
+ /dynamic.documentation
+ /implicit.documentation
+ /poly.documentation
+ /quotient.documentation
+ /refinement.documentation
+ /resource.documentation
+ /unit.documentation
+ /variance.documentation
+ )
+ )))
diff --git a/stdlib/source/documentation/lux/meta/type/check.lux b/stdlib/source/documentation/lux/meta/type/check.lux
index ba4009ed4..55cbfd5b1 100644
--- a/stdlib/source/documentation/lux/meta/type/check.lux
+++ b/stdlib/source/documentation/lux/meta/type/check.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except and)
+ [lux (.except)
["$" documentation]
[data
["[0]" text (.only \n)
@@ -8,70 +8,71 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- "Type-checking functionality."
- [($.definition /.unknown_type_var)
- ($.definition /.unbound_type_var)
- ($.definition /.invalid_type_application)
- ($.definition /.cannot_rebind_var)
- ($.definition /.type_check_failed)
- ($.definition /.functor)
- ($.definition /.apply)
- ($.definition /.monad)
- ($.definition /.bound?)
- ($.definition /.peek)
- ($.definition /.read)
-
- ($.definition /.Var
- "The ID for a type-variable in a type-checking context.")
-
- ($.definition (/.Check it)
- "A type-checking computation which may fail or yield a value.")
-
- ($.definition /.result
- ""
- [(result context proc)])
-
- ($.definition /.failure
- ""
- [(failure message)])
-
- ($.definition /.assertion
- ""
- [(assertion message test)])
-
- ($.definition /.except
- ""
- [(except exception message)])
-
- ($.definition /.existential
- "A brand-new existential type.")
-
- ($.definition /.bind
- (format "Attemmpts to buy a type-variable."
- \n "Fails if the variable has been bound already.")
- [(bind type id)])
-
- ($.definition /.var
- "A brand-new (unbound) type-variable.")
-
- ($.definition /.fresh_context
- "An empty/un-used type-checking context.")
-
- ($.definition /.check
- "Type-check to ensure that the 'expected' type subsumes the 'actual' type."
- [(check expected actual)])
-
- ($.definition /.subsumes?
- "A simple type-checking function that just returns a yes/no answer."
- [(subsumes? expected actual)])
-
- ($.definition /.context
- "The current state of the type-checking context.")
-
- ($.definition /.clean
- "Resolves every bound type-variable to yield a new type that is as resolved as possible."
- [(clean inputT)])]
- []))
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "Type-checking functionality.")
+
+ ($.definition /.unknown_type_var)
+ ($.definition /.unbound_type_var)
+ ($.definition /.invalid_type_application)
+ ($.definition /.cannot_rebind_var)
+ ($.definition /.type_check_failed)
+ ($.definition /.functor)
+ ($.definition /.apply)
+ ($.definition /.monad)
+ ($.definition /.bound?)
+ ($.definition /.peek)
+ ($.definition /.read)
+
+ ($.definition /.Var
+ "The ID for a type-variable in a type-checking context.")
+
+ ($.definition (/.Check it)
+ "A type-checking computation which may fail or yield a value.")
+
+ ($.definition /.result
+ ""
+ [(result context proc)])
+
+ ($.definition /.failure
+ ""
+ [(failure message)])
+
+ ($.definition /.assertion
+ ""
+ [(assertion message test)])
+
+ ($.definition /.except
+ ""
+ [(except exception message)])
+
+ ($.definition /.existential
+ "A brand-new existential type.")
+
+ ($.definition /.bind
+ (format "Attemmpts to buy a type-variable."
+ \n "Fails if the variable has been bound already.")
+ [(bind type id)])
+
+ ($.definition /.var
+ "A brand-new (unbound) type-variable.")
+
+ ($.definition /.fresh_context
+ "An empty/un-used type-checking context.")
+
+ ($.definition /.check
+ "Type-check to ensure that the 'expected' type subsumes the 'actual' type."
+ [(check expected actual)])
+
+ ($.definition /.subsumes?
+ "A simple type-checking function that just returns a yes/no answer."
+ [(subsumes? expected actual)])
+
+ ($.definition /.context
+ "The current state of the type-checking context.")
+
+ ($.definition /.clean
+ "Resolves every bound type-variable to yield a new type that is as resolved as possible."
+ [(clean inputT)])
+ ))
diff --git a/stdlib/source/documentation/lux/meta/type/dynamic.lux b/stdlib/source/documentation/lux/meta/type/dynamic.lux
index 596bbb610..af54272d6 100644
--- a/stdlib/source/documentation/lux/meta/type/dynamic.lux
+++ b/stdlib/source/documentation/lux/meta/type/dynamic.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except static)
+ [lux (.except)
["$" documentation]
[data
["[0]" text (.only \n)
@@ -8,23 +8,24 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.wrong_type)
- ($.definition /.format)
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
- ($.definition /.Dynamic
- "A value coupled with its type, so it can be checked later.")
+ ($.definition /.wrong_type)
+ ($.definition /.format)
- ($.definition /.dynamic
- ""
- [(is Dynamic
- (dynamic 123))])
+ ($.definition /.Dynamic
+ "A value coupled with its type, so it can be checked later.")
- ($.definition /.static
- ""
- [(is (try.Try Nat)
- (static Nat (dynamic 123)))])]
- []))
+ ($.definition /.dynamic
+ ""
+ [(is Dynamic
+ (dynamic 123))])
+
+ ($.definition /.static
+ ""
+ [(is (try.Try Nat)
+ (static Nat (dynamic 123)))])
+ ))
diff --git a/stdlib/source/documentation/lux/meta/type/implicit.lux b/stdlib/source/documentation/lux/meta/type/implicit.lux
index 001435ce8..54ded8081 100644
--- a/stdlib/source/documentation/lux/meta/type/implicit.lux
+++ b/stdlib/source/documentation/lux/meta/type/implicit.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except and)
+ [lux (.except)
["$" documentation]
[data
["[0]" text (.only \n)
@@ -8,44 +8,45 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.a/an
- (format "Automatic implementation selection (for type-class style polymorphism)."
- \n "This feature layers type-class style polymorphism on top of Lux's signatures and implementations."
- \n "When calling a polymorphic function, or using a polymorphic constant,"
- \n "this macro will check the types of the arguments, and the expected type for the whole expression"
- \n "and it will search in the local scope, the module's scope and the imports' scope"
- \n "in order to find suitable implementations to satisfy those requirements."
- \n "If a single alternative is found, that one will be used automatically."
- \n "If no alternative is found, or if more than one alternative is found (ambiguity)"
- \n "a compile-time error will be raised, to alert the user."
- \n \n "Caveat emptor: You need to make sure to import the module of any implementation you want to use."
- \n "Otherwise, this macro will not find it.")
- ["Nat equivalence"
- (at number.equivalence = x y)
- (a/an = x y)]
- ["Can optionally add the prefix of the module where the signature was defined."
- (a/an equivalence.= x y)]
- ["(List Nat) equivalence"
- (a/an =
- (list.indices 10)
- (list.indices 10))]
- ["(Functor List) each"
- (a/an each ++ (list.indices 10))])
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
- ($.definition /.with
- "Establish lexical bindings for implementations that will be prioritized over non-lexically-bound implementations."
- [(with [n.addition]
- (n.= (at n.addition composite left right)
- (a/an composite left right)))])
+ ($.definition /.a/an
+ (format "Automatic implementation selection (for type-class style polymorphism)."
+ \n "This feature layers type-class style polymorphism on top of Lux's signatures and implementations."
+ \n "When calling a polymorphic function, or using a polymorphic constant,"
+ \n "this macro will check the types of the arguments, and the expected type for the whole expression"
+ \n "and it will search in the local scope, the module's scope and the imports' scope"
+ \n "in order to find suitable implementations to satisfy those requirements."
+ \n "If a single alternative is found, that one will be used automatically."
+ \n "If no alternative is found, or if more than one alternative is found (ambiguity)"
+ \n "a compile-time error will be raised, to alert the user."
+ \n \n "Caveat emptor: You need to make sure to import the module of any implementation you want to use."
+ \n "Otherwise, this macro will not find it.")
+ ["Nat equivalence"
+ (at number.equivalence = x y)
+ (a/an = x y)]
+ ["Can optionally add the prefix of the module where the signature was defined."
+ (a/an equivalence.= x y)]
+ ["(List Nat) equivalence"
+ (a/an =
+ (list.indices 10)
+ (list.indices 10))]
+ ["(Functor List) each"
+ (a/an each ++ (list.indices 10))])
- ($.definition /.implicitly
- "Establish local definitions for implementations that will be prioritized over foreign definitions."
- [(implicitly n.multiplication)
-
- (n.= (at n.multiplication composite left right)
- (a/an composite left right))])]
- []))
+ ($.definition /.with
+ "Establish lexical bindings for implementations that will be prioritized over non-lexically-bound implementations."
+ [(with [n.addition]
+ (n.= (at n.addition composite left right)
+ (a/an composite left right)))])
+
+ ($.definition /.implicitly
+ "Establish local definitions for implementations that will be prioritized over foreign definitions."
+ [(implicitly n.multiplication)
+
+ (n.= (at n.multiplication composite left right)
+ (a/an composite left right))])
+ ))
diff --git a/stdlib/source/documentation/lux/meta/type/poly.lux b/stdlib/source/documentation/lux/meta/type/poly.lux
index dd562c4df..fb33e6236 100644
--- a/stdlib/source/documentation/lux/meta/type/poly.lux
+++ b/stdlib/source/documentation/lux/meta/type/poly.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except and)
+ [lux (.except)
["$" documentation]
[abstract
[\\specification
@@ -12,13 +12,14 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.polytypic)
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
- ($.definition /.code
- ""
- [(code env type)])]
- []))
+ ($.definition /.polytypic)
+
+ ($.definition /.code
+ ""
+ [(code env type)])
+ ))
diff --git a/stdlib/source/documentation/lux/meta/type/primitive.lux b/stdlib/source/documentation/lux/meta/type/primitive.lux
index 1f042cb52..bf1ce3c83 100644
--- a/stdlib/source/documentation/lux/meta/type/primitive.lux
+++ b/stdlib/source/documentation/lux/meta/type/primitive.lux
@@ -8,111 +8,112 @@
[\\library
["[0]" /]])
-(`` (.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.Frame
- "Meta-data about an abstract/nominal type in a stack of them.")
-
- ($.definition /.current
- "The currently-being-defined abstract/nominal type.")
-
- ($.definition /.specific
- "A specific abstract/nominal type still being defined somewhere in the scope."
- [(specific name)])
-
- (,, (with_template [<name> <from> <$> <to>]
- [($.definition <name>
- "Type-casting macro for abstract/nominal types."
- [(|> value
- (is <from>)
- <$>
- (is <to>))])]
-
- [/.abstraction Representation abstraction Abstraction]
- [/.representation Abstraction representation Representation]
- ))
-
- ($.definition /.primitive
- (format "Define abstract/nominal types which hide their representation details."
- \n "You can convert between the abstraction and its representation selectively to access the value, while hiding it from others.")
- [(primitive String
- Text
-
- (def (string value)
- (-> Text String)
- (abstraction value))
-
- (def (text value)
- (-> String Text)
- (representation value)))]
- ["Type-parameters are optional."
- (primitive (Duplicate a)
- [a a]
-
- (def (duplicate value)
- (All (_ a) (-> a (Duplicate a)))
- (abstraction [value value])))]
- ["Definitions can be nested."
- (primitive (Single a)
- a
-
- (def (single value)
- (All (_ a) (-> a (Single a)))
- (abstraction value))
-
- (primitive (Double a)
- [a a]
-
- (def (double value)
- (All (_ a) (-> a (Double a)))
- (abstraction [value value]))
-
- (def (single' value)
- (All (_ a) (-> a (Single a)))
- (abstraction Single [value value]))
-
- (let [value 0123]
- (same? value
- (|> value
- single'
- (representation Single)
- double
- representation)))))]
- ["Type-parameters do not necessarily have to be used in the representation type."
- "If they are not used, they become phantom types and can be used to customize types without changing the representation."
- (primitive (JavaScript a)
- Text
-
- (primitive Expression Any)
- (primitive Statement Any)
-
- (def (+ x y)
- (-> (JavaScript Expression) (JavaScript Expression) (JavaScript Expression))
- (abstraction
- (format "(" (representation x) "+" (representation y) ")")))
-
- (def (while test body)
- (-> (JavaScript Expression) (JavaScript Statement) (JavaScript Statement))
- (abstraction
- (format "while(" (representation test) ") {"
- (representation body)
- "}"))))])
-
- ($.definition /.transmutation
- "Transmutes an abstract/nominal type's phantom types."
- [(primitive (JavaScript a)
- Text
-
- (primitive Expression Any)
- (primitive Statement Any)
-
- (def (statement expression)
- (-> (JavaScript Expression) (JavaScript Statement))
- (transmutation expression))
-
- (def (statement' expression)
- (-> (JavaScript Expression) (JavaScript Statement))
- (transmutation JavaScript expression)))])]
- [])))
+(`` (def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
+
+ ($.definition /.Frame
+ "Meta-data about an abstract/nominal type in a stack of them.")
+
+ ($.definition /.current
+ "The currently-being-defined abstract/nominal type.")
+
+ ($.definition /.specific
+ "A specific abstract/nominal type still being defined somewhere in the scope."
+ [(specific name)])
+
+ (,, (with_template [<name> <from> <$> <to>]
+ [($.definition <name>
+ "Type-casting macro for abstract/nominal types."
+ [(|> value
+ (is <from>)
+ <$>
+ (is <to>))])]
+
+ [/.abstraction Representation abstraction Abstraction]
+ [/.representation Abstraction representation Representation]
+ ))
+
+ ($.definition /.primitive
+ (format "Define abstract/nominal types which hide their representation details."
+ \n "You can convert between the abstraction and its representation selectively to access the value, while hiding it from others.")
+ [(primitive String
+ Text
+
+ (def (string value)
+ (-> Text String)
+ (abstraction value))
+
+ (def (text value)
+ (-> String Text)
+ (representation value)))]
+ ["Type-parameters are optional."
+ (primitive (Duplicate a)
+ [a a]
+
+ (def (duplicate value)
+ (All (_ a) (-> a (Duplicate a)))
+ (abstraction [value value])))]
+ ["Definitions can be nested."
+ (primitive (Single a)
+ a
+
+ (def (single value)
+ (All (_ a) (-> a (Single a)))
+ (abstraction value))
+
+ (primitive (Double a)
+ [a a]
+
+ (def (double value)
+ (All (_ a) (-> a (Double a)))
+ (abstraction [value value]))
+
+ (def (single' value)
+ (All (_ a) (-> a (Single a)))
+ (abstraction Single [value value]))
+
+ (let [value 0123]
+ (same? value
+ (|> value
+ single'
+ (representation Single)
+ double
+ representation)))))]
+ ["Type-parameters do not necessarily have to be used in the representation type."
+ "If they are not used, they become phantom types and can be used to customize types without changing the representation."
+ (primitive (JavaScript a)
+ Text
+
+ (primitive Expression Any)
+ (primitive Statement Any)
+
+ (def (+ x y)
+ (-> (JavaScript Expression) (JavaScript Expression) (JavaScript Expression))
+ (abstraction
+ (format "(" (representation x) "+" (representation y) ")")))
+
+ (def (while test body)
+ (-> (JavaScript Expression) (JavaScript Statement) (JavaScript Statement))
+ (abstraction
+ (format "while(" (representation test) ") {"
+ (representation body)
+ "}"))))])
+
+ ($.definition /.transmutation
+ "Transmutes an abstract/nominal type's phantom types."
+ [(primitive (JavaScript a)
+ Text
+
+ (primitive Expression Any)
+ (primitive Statement Any)
+
+ (def (statement expression)
+ (-> (JavaScript Expression) (JavaScript Statement))
+ (transmutation expression))
+
+ (def (statement' expression)
+ (-> (JavaScript Expression) (JavaScript Statement))
+ (transmutation JavaScript expression)))])
+ )))
diff --git a/stdlib/source/documentation/lux/meta/type/quotient.lux b/stdlib/source/documentation/lux/meta/type/quotient.lux
index 58f9edfd5..e374a11c5 100644
--- a/stdlib/source/documentation/lux/meta/type/quotient.lux
+++ b/stdlib/source/documentation/lux/meta/type/quotient.lux
@@ -8,36 +8,37 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.class)
- ($.definition /.value)
- ($.definition /.label)
- ($.definition /.equivalence)
-
- ($.definition (/.Class value label)
- "The class knows how to classify/label values that are meant to be equivalent to one another.")
-
- ($.definition (/.Quotient value label)
- (format "A quotient value has been labeled with a class."
- \n "All equivalent values will belong to the same class."
- \n "This means all equivalent values possess the same label."))
-
- ($.definition /.quotient
- ""
- [(quotient class value)])
-
- ($.definition /.type
- "The Quotient type associated with a Class type."
- [(def even
- (class even?))
-
- (def Even
- Type
- (type even))
-
- (is Even
- (quotient even 123))])]
- []))
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
+
+ ($.definition /.class)
+ ($.definition /.value)
+ ($.definition /.label)
+ ($.definition /.equivalence)
+
+ ($.definition (/.Class value label)
+ "The class knows how to classify/label values that are meant to be equivalent to one another.")
+
+ ($.definition (/.Quotient value label)
+ (format "A quotient value has been labeled with a class."
+ \n "All equivalent values will belong to the same class."
+ \n "This means all equivalent values possess the same label."))
+
+ ($.definition /.quotient
+ ""
+ [(quotient class value)])
+
+ ($.definition /.type
+ "The Quotient type associated with a Class type."
+ [(def even
+ (class even?))
+
+ (def Even
+ Type
+ (type even))
+
+ (is Even
+ (quotient even 123))])
+ ))
diff --git a/stdlib/source/documentation/lux/meta/type/refinement.lux b/stdlib/source/documentation/lux/meta/type/refinement.lux
index 7342da0dc..0b9601f1e 100644
--- a/stdlib/source/documentation/lux/meta/type/refinement.lux
+++ b/stdlib/source/documentation/lux/meta/type/refinement.lux
@@ -8,45 +8,46 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.value)
- ($.definition /.predicate)
-
- ($.definition (/.Refined it)
- "A refined version of another type, using a predicate to select valid instances.")
-
- ($.definition (/.Refiner it)
- "A selection mechanism for refined instances of a type.")
-
- ($.definition /.refiner
- ""
- [(refiner predicate)])
-
- ($.definition /.lifted
- (format "Yields a function that can work on refined values."
- \n "Respects the constraints of the refinement.")
- [(lifted transform)])
-
- ($.definition /.only
- ""
- [(only refiner values)])
-
- ($.definition /.partition
- "Separates refined values from the un-refined ones."
- [(partition refiner values)])
-
- ($.definition /.type
- "The Refined type associated with a Refiner type."
- [(def even
- (refiner even?))
-
- (def Even
- Type
- (type even))
-
- (is (Maybe Even)
- (even 123))])]
- []))
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
+
+ ($.definition /.value)
+ ($.definition /.predicate)
+
+ ($.definition (/.Refined it)
+ "A refined version of another type, using a predicate to select valid instances.")
+
+ ($.definition (/.Refiner it)
+ "A selection mechanism for refined instances of a type.")
+
+ ($.definition /.refiner
+ ""
+ [(refiner predicate)])
+
+ ($.definition /.lifted
+ (format "Yields a function that can work on refined values."
+ \n "Respects the constraints of the refinement.")
+ [(lifted transform)])
+
+ ($.definition /.only
+ ""
+ [(only refiner values)])
+
+ ($.definition /.partition
+ "Separates refined values from the un-refined ones."
+ [(partition refiner values)])
+
+ ($.definition /.type
+ "The Refined type associated with a Refiner type."
+ [(def even
+ (refiner even?))
+
+ (def Even
+ Type
+ (type even))
+
+ (is (Maybe Even)
+ (even 123))])
+ ))
diff --git a/stdlib/source/documentation/lux/meta/type/resource.lux b/stdlib/source/documentation/lux/meta/type/resource.lux
index 5003b7896..ed1f271f3 100644
--- a/stdlib/source/documentation/lux/meta/type/resource.lux
+++ b/stdlib/source/documentation/lux/meta/type/resource.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except and)
+ [lux (.except)
["$" documentation]
[data
["[0]" text (.only \n)
@@ -8,89 +8,90 @@
[\\library
["[0]" /]])
-(`` (.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.monad)
- ($.definition /.index_cannot_be_repeated)
- ($.definition /.amount_cannot_be_zero)
-
- ($.definition (/.Procedure monad input output value)
- (format "A computation that takes a sequence of resource access rights as inputs and yields a different sequence as outputs."
- \n "A procedure yields a result value."
- \n "A procedure can make use of monadic effects."))
-
- ($.definition (/.Linear monad value)
- (format "A procedure that is constant with regards to resource access rights."
- \n "This means no additional resources will be available after the computation is over."
- \n "This also means no previously available resources will have been consumed."))
-
- ($.definition (/.Affine monad permissions value)
- "A procedure which expands the number of available resources.")
-
- ($.definition (/.Relevant monad permissions value)
- "A procedure which reduces the number of available resources.")
-
- ($.definition /.run!
- ""
- [(run! monad procedure)])
-
- ($.definition /.lifted
- ""
- [(lifted monad procedure)])
-
- ($.definition /.Ordered
- "The mode of keys which CANNOT be swapped, and for whom order of release/consumption matters.")
-
- ($.definition /.Commutative
- "The mode of keys which CAN be swapped, and for whom order of release/consumption DOES NOT matters.")
-
- ($.definition (/.Key mode key)
- (format "The access right for a resource."
- \n "Without the key for a resource existing somewhere among the available ambient rights, one cannot use a resource."))
-
- ($.definition (/.Res key value)
- (format "A resource locked by a key."
- \n "The 'key' represents the right to access/consume a resource."))
-
- (,, (with_template [<name>]
- [($.definition <name>
- "Makes a value into a resource and adds the key/access-right to it to the ambient keyring for future use.")]
-
- [/.ordered]
- [/.commutative]
- ))
-
- ($.definition /.read
- "Access the value of a resource, so long as its key is available."
- [(read monad resource)])
-
- ($.definition /.exchange
- (format "A function that can exchange the keys for resource, so long as they are commutative."
- \n "This keys will be placed at the front of the keyring in the order they are specified."
- \n "The specific keys must be specified based of their index into the current keyring.")
- [(do (monad !)
- [res|left (commutative ! pre)
- res|right (commutative ! post)
- _ ((exchange [1 0]) !)
- left (read ! res|left)
- right (read ! res|right)]
- (in (format left right)))])
-
- (,, (with_template [<name>]
- [($.definition <name>
- "Group/un-group keys in the keyring into/out-of tuples."
- [(do (monad !)
- [res|left (commutative ! pre)
- res|right (commutative ! post)
- _ ((group 2) !)
- _ ((un_group 2) !)
- right (read ! res|right)
- left (read ! res|left)]
- (in (format left right)))])]
-
- [/.group]
- [/.un_group]
- ))]
- [])))
+(`` (def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
+
+ ($.definition /.monad)
+ ($.definition /.index_cannot_be_repeated)
+ ($.definition /.amount_cannot_be_zero)
+
+ ($.definition (/.Procedure monad input output value)
+ (format "A computation that takes a sequence of resource access rights as inputs and yields a different sequence as outputs."
+ \n "A procedure yields a result value."
+ \n "A procedure can make use of monadic effects."))
+
+ ($.definition (/.Linear monad value)
+ (format "A procedure that is constant with regards to resource access rights."
+ \n "This means no additional resources will be available after the computation is over."
+ \n "This also means no previously available resources will have been consumed."))
+
+ ($.definition (/.Affine monad permissions value)
+ "A procedure which expands the number of available resources.")
+
+ ($.definition (/.Relevant monad permissions value)
+ "A procedure which reduces the number of available resources.")
+
+ ($.definition /.run!
+ ""
+ [(run! monad procedure)])
+
+ ($.definition /.lifted
+ ""
+ [(lifted monad procedure)])
+
+ ($.definition /.Ordered
+ "The mode of keys which CANNOT be swapped, and for whom order of release/consumption matters.")
+
+ ($.definition /.Commutative
+ "The mode of keys which CAN be swapped, and for whom order of release/consumption DOES NOT matters.")
+
+ ($.definition (/.Key mode key)
+ (format "The access right for a resource."
+ \n "Without the key for a resource existing somewhere among the available ambient rights, one cannot use a resource."))
+
+ ($.definition (/.Res key value)
+ (format "A resource locked by a key."
+ \n "The 'key' represents the right to access/consume a resource."))
+
+ (,, (with_template [<name>]
+ [($.definition <name>
+ "Makes a value into a resource and adds the key/access-right to it to the ambient keyring for future use.")]
+
+ [/.ordered]
+ [/.commutative]
+ ))
+
+ ($.definition /.read
+ "Access the value of a resource, so long as its key is available."
+ [(read monad resource)])
+
+ ($.definition /.exchange
+ (format "A function that can exchange the keys for resource, so long as they are commutative."
+ \n "This keys will be placed at the front of the keyring in the order they are specified."
+ \n "The specific keys must be specified based of their index into the current keyring.")
+ [(do (monad !)
+ [res|left (commutative ! pre)
+ res|right (commutative ! post)
+ _ ((exchange [1 0]) !)
+ left (read ! res|left)
+ right (read ! res|right)]
+ (in (format left right)))])
+
+ (,, (with_template [<name>]
+ [($.definition <name>
+ "Group/un-group keys in the keyring into/out-of tuples."
+ [(do (monad !)
+ [res|left (commutative ! pre)
+ res|right (commutative ! post)
+ _ ((group 2) !)
+ _ ((un_group 2) !)
+ right (read ! res|right)
+ left (read ! res|left)]
+ (in (format left right)))])]
+
+ [/.group]
+ [/.un_group]
+ ))
+ )))
diff --git a/stdlib/source/documentation/lux/meta/type/unit.lux b/stdlib/source/documentation/lux/meta/type/unit.lux
index 5ad54ced9..606184c7a 100644
--- a/stdlib/source/documentation/lux/meta/type/unit.lux
+++ b/stdlib/source/documentation/lux/meta/type/unit.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except and)
+ [lux (.except)
["$" documentation]
[data
["[0]" text (.only \n)
@@ -14,77 +14,78 @@
[\\library
["[0]" /]])
-(`` (.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.Gram)
- ($.definition /.Meter)
- ($.definition /.Litre)
- ($.definition /.Second)
- ... ($.definition /.pure)
- ($.definition /.number)
- ($.definition /.equivalence)
- ($.definition /.order)
- ($.definition /.enum)
- ... ($.definition /.Kilo)
- ... ($.definition /.Mega)
- ... ($.definition /.Giga)
- ... ($.definition /.Milli)
- ... ($.definition /.Micro)
- ... ($.definition /.Nano)
- ($.definition /.+)
- ($.definition /.-)
- ($.definition /.*)
- ($.definition /./)
+(`` (def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
- ($.definition (/.Measure unit)
- "A quantity with an associated unit of measurement.")
+ ($.definition /.Gram)
+ ($.definition /.Meter)
+ ($.definition /.Litre)
+ ($.definition /.Second)
+ ... ($.definition /.pure)
+ ($.definition /.number)
+ ($.definition /.equivalence)
+ ($.definition /.order)
+ ($.definition /.enum)
+ ... ($.definition /.Kilo)
+ ... ($.definition /.Mega)
+ ... ($.definition /.Giga)
+ ... ($.definition /.Milli)
+ ... ($.definition /.Micro)
+ ... ($.definition /.Nano)
+ ($.definition /.+)
+ ($.definition /.-)
+ ($.definition /.*)
+ ($.definition /./)
- ($.definition (/.Unit unit)
- "A unit of measurement, to qualify numbers with.")
+ ($.definition (/.Measure unit)
+ "A quantity with an associated unit of measurement.")
- ... ($.definition (/.Scale scale)
- ... "A scale of magnitude.")
+ ($.definition (/.Unit unit)
+ "A unit of measurement, to qualify numbers with.")
- ... ($.definition /.Pure
- ... "A pure, unit-less measure.")
+ ... ($.definition (/.Scale scale)
+ ... "A scale of magnitude.")
- ($.definition /.unit
- (format "Define a unit of measurement."
- \n "Both the name of the type, and the name of the Unit implementation must be specified.")
- [(def feet (unit []))])
+ ... ($.definition /.Pure
+ ... "A pure, unit-less measure.")
- ... ($.definition /.scale
- ... "Define a scale of magnitude."
- ... [(def bajillion (scale [1 1,234,567,890]))])
+ ($.definition /.unit
+ (format "Define a unit of measurement."
+ \n "Both the name of the type, and the name of the Unit implementation must be specified.")
+ [(def feet (unit []))])
- ... ($.definition /.re_scaled
- ... ""
- ... [(re_scaled from to measure)])
+ ... ($.definition /.scale
+ ... "Define a scale of magnitude."
+ ... [(def bajillion (scale [1 1,234,567,890]))])
- ... (,, (with_template [<type> <scale>]
- ... [(`` ($.definition <scale>
- ... (let [numerator (the [/.ratio ratio.#numerator] <scale>)
- ... denominator (the [/.ratio ratio.#denominator] <scale>)]
- ... (format "The '" (,, (template.text [<scale>])) "' scale, from " (%.nat numerator) " to " (%.nat denominator) "."))))]
+ ... ($.definition /.re_scaled
+ ... ""
+ ... [(re_scaled from to measure)])
- ... [/.Kilo /.kilo]
- ... [/.Mega /.mega]
- ... [/.Giga /.giga]
+ ... (,, (with_template [<type> <scale>]
+ ... [(`` ($.definition <scale>
+ ... (let [numerator (the [/.ratio ratio.#numerator] <scale>)
+ ... denominator (the [/.ratio ratio.#denominator] <scale>)]
+ ... (format "The '" (,, (template.text [<scale>])) "' scale, from " (%.nat numerator) " to " (%.nat denominator) "."))))]
- ... [/.Milli /.milli]
- ... [/.Micro /.micro]
- ... [/.Nano /.nano]
- ... ))
+ ... [/.Kilo /.kilo]
+ ... [/.Mega /.mega]
+ ... [/.Giga /.giga]
- (,, (with_template [<unit>]
- [(`` ($.definition <unit>
- (format "The '" (,, (template.text [<unit>])) "' unit of meaurement.")))]
+ ... [/.Milli /.milli]
+ ... [/.Micro /.micro]
+ ... [/.Nano /.nano]
+ ... ))
- [/.gram]
- [/.meter]
- [/.litre]
- [/.second]
- ))]
- [])))
+ (,, (with_template [<unit>]
+ [(`` ($.definition <unit>
+ (format "The '" (,, (template.text [<unit>])) "' unit of meaurement.")))]
+
+ [/.gram]
+ [/.meter]
+ [/.litre]
+ [/.second]
+ ))
+ )))
diff --git a/stdlib/source/documentation/lux/meta/type/variance.lux b/stdlib/source/documentation/lux/meta/type/variance.lux
index fa6c3e36f..5dcc89f9d 100644
--- a/stdlib/source/documentation/lux/meta/type/variance.lux
+++ b/stdlib/source/documentation/lux/meta/type/variance.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except and)
+ [lux (.except)
["$" documentation]
[data
["[0]" text (.only \n)
@@ -11,16 +11,17 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition (/.Co it)
- "A constraint for covariant types.")
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
- ($.definition (/.Contra it)
- "A constraint for contravariant types.")
+ ($.definition (/.Co it)
+ "A constraint for covariant types.")
- ($.definition (/.In it)
- "A constraint for invariant types.")]
- []))
+ ($.definition (/.Contra it)
+ "A constraint for contravariant types.")
+
+ ($.definition (/.In it)
+ "A constraint for invariant types.")
+ ))
diff --git a/stdlib/source/library/lux/test.lux b/stdlib/source/library/lux/test.lux
index 411c6c1c7..16df02a68 100644
--- a/stdlib/source/library/lux/test.lux
+++ b/stdlib/source/library/lux/test.lux
@@ -42,7 +42,8 @@
["[0]" instant]]]]]
[/
["//" unit]
- ["[0]" coverage (.only Coverage)]])
+ ["[0]" coverage (.only Coverage)]
+ ["[0]" tally (.only Tally)]])
(type .public Test
(Random //.Test))
@@ -94,8 +95,8 @@
[prng result])))
(def failed?
- (-> //.Tally Bit)
- (|>> (the //.#failures) (n.> 0)))
+ (-> Tally Bit)
+ (|>> (the tally.#failures) (n.> 0)))
(def separator
text.new_line)
@@ -127,21 +128,21 @@
product.right))))])))))
(def (description duration tally)
- (-> Duration //.Tally Text)
- (let [successes (the //.#successes tally)
- failures (the //.#failures tally)
- missing (set.difference (the //.#actual tally)
- (the //.#expected tally))
- unexpected (set.difference (the //.#expected tally)
- (the //.#actual tally))
+ (-> Duration Tally Text)
+ (let [successes (the tally.#successes tally)
+ failures (the tally.#failures tally)
+ missing (set.difference (the tally.#actual tally)
+ (the tally.#expected tally))
+ unexpected (set.difference (the tally.#expected tally)
+ (the tally.#actual tally))
report (is (-> Coverage Text)
(|>> set.list
(list.sorted (at symbol.order <))
(exception.listing %.symbol)))
- expected_coverage (set.size (the //.#expected tally))
+ expected_coverage (set.size (the tally.#expected tally))
unexpected_coverage (set.size unexpected)
actual_coverage (n.- unexpected_coverage
- (set.size (the //.#actual tally)))
+ (set.size (the tally.#actual tally)))
coverage (case expected_coverage
0 "N/A"
expected (let [missing_ratio (f./ (n.frac expected)
@@ -204,7 +205,7 @@
(console.write_line report console))
<else>))]
(async.future (at environment.default exit
- (case (the //.#failures tally)
+ (case (the tally.#failures tally)
0 ..success_exit_code
_ ..failure_exit_code)))))
@@ -237,7 +238,7 @@
(-> (List Test) Test)
(case (list.size tests)
0
- (random#in (async#in [//.start ""]))
+ (random#in (async#in [tally.empty ""]))
expected_tests
(do random.monad
@@ -254,10 +255,10 @@
{try.#Failure error}
(//.test (exception.error ..error_during_execution [error]) false))))
- state (is (Atom (Dictionary Nat [//.Tally Text]))
+ state (is (Atom (Dictionary Nat [Tally Text]))
(atom.atom (dictionary.empty n.order)))
[read! write!] (is [//.Test
- (async.Resolver [//.Tally Text])]
+ (async.Resolver [Tally Text])]
(async.async []))
_ (list#mix (function (_ test index)
(exec
@@ -271,7 +272,7 @@
(list#each product.right))]
(write! [(|> assertions
(list#each product.left)
- (list#mix //.total //.start))
+ (list#mix tally.and tally.empty))
(|> assertions
(list#each product.right)
(text.interposed ..separator))]))
diff --git a/stdlib/source/library/lux/test/tally.lux b/stdlib/source/library/lux/test/tally.lux
new file mode 100644
index 000000000..afbab607a
--- /dev/null
+++ b/stdlib/source/library/lux/test/tally.lux
@@ -0,0 +1,45 @@
+(.require
+ [library
+ [lux (.except and)
+ [data
+ [collection
+ ["[0]" set (.only Set)]]]
+ [math
+ [number
+ ["n" nat]]]
+ [meta
+ ["[0]" symbol]]]]
+ [//
+ ["[0]" coverage (.only Coverage)]])
+
+(type .public Tally
+ (Record
+ [#successes Nat
+ #failures Nat
+ #expected Coverage
+ #actual Coverage]))
+
+(def .public (and parameter subject)
+ (-> Tally Tally Tally)
+ [#successes (n.+ (the #successes parameter) (the #successes subject))
+ #failures (n.+ (the #failures parameter) (the #failures subject))
+ #expected (set.union (the #expected parameter)
+ (the #expected subject))
+ #actual (set.union (the #actual parameter)
+ (the #actual subject))])
+
+(def .public empty
+ Tally
+ [#successes 0
+ #failures 0
+ #expected (set.empty symbol.hash)
+ #actual (set.empty symbol.hash)])
+
+(with_template [<name> <category>]
+ [(def .public <name>
+ Tally
+ (revised <category> .++ ..empty))]
+
+ [success #successes]
+ [failure #failures]
+ )
diff --git a/stdlib/source/library/lux/test/unit.lux b/stdlib/source/library/lux/test/unit.lux
index 0e90bb46c..02e063447 100644
--- a/stdlib/source/library/lux/test/unit.lux
+++ b/stdlib/source/library/lux/test/unit.lux
@@ -15,8 +15,7 @@
["[0]" list (.use "[1]#[0]" functor mix)]
["[0]" set (.only Set)]]]
[math
- [number (.only hex)
- ["n" nat]]]
+ [number (.only hex)]]
["[0]" meta (.only)
["[0]" symbol]
["[0]" code (.only)
@@ -24,39 +23,8 @@
[macro
[syntax (.only syntax)]]]]]
[//
- ["[0]" coverage (.only Coverage)]])
-
-(type .public Tally
- (Record
- [#successes Nat
- #failures Nat
- #expected Coverage
- #actual Coverage]))
-
-(def .public (total parameter subject)
- (-> Tally Tally Tally)
- [#successes (n.+ (the #successes parameter) (the #successes subject))
- #failures (n.+ (the #failures parameter) (the #failures subject))
- #expected (set.union (the #expected parameter)
- (the #expected subject))
- #actual (set.union (the #actual parameter)
- (the #actual subject))])
-
-(def .public start
- Tally
- [#successes 0
- #failures 0
- #expected (set.empty symbol.hash)
- #actual (set.empty symbol.hash)])
-
-(with_template [<name> <category>]
- [(def <name>
- Tally
- (revised <category> .++ ..start))]
-
- [success_tally #successes]
- [failure_tally #failures]
- )
+ ["[0]" coverage (.only Coverage)]
+ ["[0]" tally (.only Tally)]])
(type .public Test
(Async [Tally Text]))
@@ -72,7 +40,7 @@
_ (|> left
(async.upon! (function (_ [l_tally l_documentation])
(async.upon! (function (_ [r_tally r_documentation])
- (write! [(..total l_tally r_tally)
+ (write! [(tally.and l_tally r_tally)
(format l_documentation ..separator r_documentation)]))
right)))
io.run!)]
@@ -91,19 +59,16 @@
(-> Text Test Test)
(|>> %.text context'))
-(def failure_prefix "[Failure] ")
-(def success_prefix "[Success] ")
-
(def .public failure
(-> Text Test)
- (|>> (format ..failure_prefix)
- [..failure_tally]
+ (|>> (format "[Failure] ")
+ [tally.failure]
async#in))
(def .public success
(-> Text Test)
- (|>> (format ..success_prefix)
- [..success_tally]
+ (|>> (format "[Success] ")
+ [tally.success]
async#in))
(def .public (test message condition)
@@ -128,7 +93,7 @@
coverage (set.of_list symbol.hash coverage)]
(|> (..test message condition)
(async#each (function (_ [tally documentation])
- [(revised #actual (set.union coverage) tally)
+ [(revised tally.#actual (set.union coverage) tally)
documentation])))))
(def .public coverage
@@ -148,7 +113,7 @@
(text.interposed ..definition_separator))
coverage (set.of_list symbol.hash coverage)]
(async#each (function (_ [tally documentation])
- [(revised #actual (set.union coverage) tally)
+ [(revised tally.#actual (set.union coverage) tally)
documentation])
(..context' context test))))
@@ -167,7 +132,7 @@
(let [coverage (coverage.decoded module coverage)]
(|> (..context' module test)
(async#each (function (_ [tally documentation])
- [(revised #expected (set.union coverage) tally)
+ [(revised tally.#expected (set.union coverage) tally)
(|> documentation
(text.replaced (format ..clean_up_marker module symbol.separator) "")
(text.replaced ..clean_up_marker ""))])))))
diff --git a/stdlib/source/test/lux/test.lux b/stdlib/source/test/lux/test.lux
index 956969668..6d2939185 100644
--- a/stdlib/source/test/lux/test.lux
+++ b/stdlib/source/test/lux/test.lux
@@ -21,14 +21,15 @@
["n" nat]]]]]
[\\library
["[0]" / (.only)
- ["[0]" unit]]])
+ ["[0]" unit]
+ ["[0]" tally (.only Tally)]]])
(def (verify expected_message/0 expected_message/1 successes failures [tally message])
- (-> Text Text Nat Nat [unit.Tally Text] Bit)
+ (-> Text Text Nat Nat [Tally Text] Bit)
(and (text.contains? expected_message/0 message)
(text.contains? expected_message/1 message)
- (n.= successes (the unit.#successes tally))
- (n.= failures (the unit.#failures tally))))
+ (n.= successes (the tally.#successes tally))
+ (n.= failures (the tally.#failures tally))))
(def unit_test
/.Test
@@ -40,13 +41,13 @@
(in (do async.monad
[[success_tally success_message] (unit.test expected_message/0 true)
[failure_tally failure_message] (unit.test expected_message/0 false)]
- (unit.coverage [unit.test unit.Tally]
+ (unit.coverage [unit.test tally.Tally]
(and (text.ends_with? expected_message/0 success_message)
(text.ends_with? expected_message/0 failure_message)
- (and (n.= 1 (the unit.#successes success_tally))
- (n.= 0 (the unit.#failures success_tally)))
- (and (n.= 0 (the unit.#successes failure_tally))
- (n.= 1 (the unit.#failures failure_tally)))))))
+ (and (n.= 1 (the tally.#successes success_tally))
+ (n.= 0 (the tally.#failures success_tally)))
+ (and (n.= 0 (the tally.#successes failure_tally))
+ (n.= 1 (the tally.#failures failure_tally)))))))
(in (do async.monad
[tt (unit.and (unit.test expected_message/0 true)
(unit.test expected_message/1 true))
@@ -84,10 +85,10 @@
[[pre_tally pre_message] pre
[post_tally post_message] post]
(unit.coverage [/.seed]
- (and (and (n.= 1 (the unit.#successes pre_tally))
- (n.= 0 (the unit.#failures pre_tally)))
- (and (n.= 1 (the unit.#successes post_tally))
- (n.= 0 (the unit.#failures post_tally)))))))))
+ (and (and (n.= 1 (the tally.#successes pre_tally))
+ (n.= 0 (the tally.#failures pre_tally)))
+ (and (n.= 1 (the tally.#successes post_tally))
+ (n.= 0 (the tally.#failures post_tally)))))))))
(def times
/.Test
@@ -98,8 +99,8 @@
[[tally error] times_unit_test]
(unit.coverage [/.must_try_test_at_least_once]
(and (text.contains? (the exception.#label /.must_try_test_at_least_once) error)
- (n.= 0 (the unit.#successes tally))
- (n.= 1 (the unit.#failures tally)))))))
+ (n.= 0 (the tally.#successes tally))
+ (n.= 1 (the tally.#failures tally)))))))
(do [! random.monad]
[expected (at ! each (|>> (n.% 10) ++) random.nat)
.let [counter (is (Atom Nat)
@@ -114,8 +115,8 @@
actual (async.future (atom.read! counter))]
(unit.coverage [/.times]
(and (n.= expected actual)
- (n.= 1 (the unit.#successes tally))
- (n.= 0 (the unit.#failures tally)))))))
+ (n.= 1 (the tally.#successes tally))
+ (n.= 0 (the tally.#failures tally)))))))
))
(def in_parallel
@@ -137,8 +138,8 @@
actual (async.future (atom.read! counter))]
(unit.coverage [/.in_parallel]
(and (n.= expected actual)
- (n.= expected (the unit.#successes tally))
- (n.= 0 (the unit.#failures tally)))))))
+ (n.= expected (the tally.#successes tally))
+ (n.= 0 (the tally.#failures tally)))))))
(do [! random.monad]
[expected (at ! each (|>> (n.% 10) ++) random.nat)
.let [counter (is (Atom Nat)
@@ -157,8 +158,8 @@
(unit.coverage [/.error_during_execution]
(let [correct_error! (text.contains? (the exception.#label /.error_during_execution) error)
no_complete_run! (n.= 0 actual)
- no_successes! (n.= 0 (the unit.#successes tally))
- ran_all_tests! (n.= expected (the unit.#failures tally))]
+ no_successes! (n.= 0 (the tally.#successes tally))
+ ran_all_tests! (n.= expected (the tally.#failures tally))]
(and correct_error!
no_complete_run!
no_successes!
@@ -178,10 +179,10 @@
[[not_covering _] not_covering
[covering _] covering]
(unit.coverage [/.covering]
- (and (and (set.empty? (the unit.#expected not_covering))
- (set.empty? (the unit.#actual not_covering)))
- (and (not (set.empty? (the unit.#expected covering)))
- (set.empty? (the unit.#actual covering))))))))
+ (and (and (set.empty? (the tally.#expected not_covering))
+ (set.empty? (the tally.#actual not_covering)))
+ (and (not (set.empty? (the tally.#expected covering)))
+ (set.empty? (the tally.#actual covering))))))))
(do random.monad
[not_covering (/.covering .._ (/.test "" true))
covering (/.covering .._ (/.coverage [..dummy_target] true))]
@@ -189,10 +190,10 @@
[[not_covering _] not_covering
[covering _] covering]
(unit.coverage [/.coverage]
- (and (and (not (set.empty? (the unit.#expected not_covering)))
- (not (set.member? (the unit.#actual not_covering) (symbol ..dummy_target))))
- (and (not (set.empty? (the unit.#expected covering)))
- (set.member? (the unit.#actual covering) (symbol ..dummy_target))))))))
+ (and (and (not (set.empty? (the tally.#expected not_covering)))
+ (not (set.member? (the tally.#actual not_covering) (symbol ..dummy_target))))
+ (and (not (set.empty? (the tally.#expected covering)))
+ (set.member? (the tally.#actual covering) (symbol ..dummy_target))))))))
(do random.monad
[not_covering (/.covering .._ (/.test "" true))
covering (/.covering .._ (in (unit.coverage [..dummy_target] true)))]
@@ -200,10 +201,10 @@
[[not_covering _] not_covering
[covering _] covering]
(unit.coverage [unit.coverage]
- (and (and (not (set.empty? (the unit.#expected not_covering)))
- (not (set.member? (the unit.#actual not_covering) (symbol ..dummy_target))))
- (and (not (set.empty? (the unit.#expected covering)))
- (set.member? (the unit.#actual covering) (symbol ..dummy_target))))))))
+ (and (and (not (set.empty? (the tally.#expected not_covering)))
+ (not (set.member? (the tally.#actual not_covering) (symbol ..dummy_target))))
+ (and (not (set.empty? (the tally.#expected covering)))
+ (set.member? (the tally.#actual covering) (symbol ..dummy_target))))))))
(do random.monad
[not_covering (/.covering .._ (/.test "" true))
covering (/.covering .._ (/.for [..dummy_target] (/.test "" true)))]
@@ -211,10 +212,10 @@
[[not_covering _] not_covering
[covering _] covering]
(unit.coverage [/.for]
- (and (and (not (set.empty? (the unit.#expected not_covering)))
- (not (set.member? (the unit.#actual not_covering) (symbol ..dummy_target))))
- (and (not (set.empty? (the unit.#expected covering)))
- (set.member? (the unit.#actual covering) (symbol ..dummy_target))))))))
+ (and (and (not (set.empty? (the tally.#expected not_covering)))
+ (not (set.member? (the tally.#actual not_covering) (symbol ..dummy_target))))
+ (and (not (set.empty? (the tally.#expected covering)))
+ (set.member? (the tally.#actual covering) (symbol ..dummy_target))))))))
))
(def .public test
@@ -241,10 +242,10 @@
(unit.coverage [/.test]
(and (text.ends_with? (%.text expected_message/0) success_message)
(text.ends_with? (%.text expected_message/0) failure_message)
- (and (n.= 1 (the unit.#successes success_tally))
- (n.= 0 (the unit.#failures success_tally)))
- (and (n.= 0 (the unit.#successes failure_tally))
- (n.= 1 (the unit.#failures failure_tally))))))))
+ (and (n.= 1 (the tally.#successes success_tally))
+ (n.= 0 (the tally.#failures success_tally)))
+ (and (n.= 0 (the tally.#successes failure_tally))
+ (n.= 1 (the tally.#failures failure_tally))))))))
(do !
[tt (/.and (/.test expected_message/0 true)
(/.test expected_message/1 true))
@@ -275,18 +276,18 @@
(text.contains? expected_message/0 success_message))
(and (text.contains? expected_context failure_message)
(text.contains? expected_message/0 failure_message))
- (and (n.= 1 (the unit.#successes success_tally))
- (n.= 0 (the unit.#failures success_tally)))
- (and (n.= 0 (the unit.#successes failure_tally))
- (n.= 1 (the unit.#failures failure_tally))))))))
+ (and (n.= 1 (the tally.#successes success_tally))
+ (n.= 0 (the tally.#failures success_tally)))
+ (and (n.= 0 (the tally.#successes failure_tally))
+ (n.= 1 (the tally.#failures failure_tally))))))))
(do !
[failure_unit_test (/.failure expected_message/0)]
(in (do async.monad
[[failure_tally failure_message] failure_unit_test]
(unit.coverage [/.failure]
(and (text.contains? expected_message/0 failure_message)
- (and (n.= 0 (the unit.#successes failure_tally))
- (n.= 1 (the unit.#failures failure_tally))))))))
+ (and (n.= 0 (the tally.#successes failure_tally))
+ (n.= 1 (the tally.#failures failure_tally))))))))
(do !
[success_unit_test (/.lifted expected_message/0 (in true))
failure_unit_test (/.lifted expected_message/0 (in false))]
@@ -296,10 +297,10 @@
(unit.coverage [/.lifted]
(and (text.contains? expected_message/0 success_message)
(text.contains? expected_message/0 failure_message)
- (and (n.= 1 (the unit.#successes success_tally))
- (n.= 0 (the unit.#failures success_tally)))
- (and (n.= 0 (the unit.#successes failure_tally))
- (n.= 1 (the unit.#failures failure_tally))))))))
+ (and (n.= 1 (the tally.#successes success_tally))
+ (n.= 0 (the tally.#failures success_tally)))
+ (and (n.= 0 (the tally.#successes failure_tally))
+ (n.= 1 (the tally.#failures failure_tally))))))))
..times
..in_parallel
..coverage