aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Julian2022-07-08 17:47:23 -0400
committerEduardo Julian2022-07-08 17:47:23 -0400
commit7976268575e7c6910dfba2d2733e8cc1883678e7 (patch)
tree0ce156081612235c0df5e2ad9167be3fc5d75c6c
parent39325bb36c6f6459c861ef12f9e99b9e66b52594 (diff)
Re-named the "documentation" macro to "definition".
-rw-r--r--lux-mode/lux-mode.el4
-rw-r--r--stdlib/source/documentation/lux.lux212
-rw-r--r--stdlib/source/documentation/lux/abstract/apply.lux4
-rw-r--r--stdlib/source/documentation/lux/abstract/codec.lux4
-rw-r--r--stdlib/source/documentation/lux/abstract/comonad.lux4
-rw-r--r--stdlib/source/documentation/lux/abstract/comonad/free.lux2
-rw-r--r--stdlib/source/documentation/lux/abstract/enum.lux4
-rw-r--r--stdlib/source/documentation/lux/abstract/equivalence.lux4
-rw-r--r--stdlib/source/documentation/lux/abstract/functor.lux6
-rw-r--r--stdlib/source/documentation/lux/abstract/functor/contravariant.lux2
-rw-r--r--stdlib/source/documentation/lux/abstract/hash.lux2
-rw-r--r--stdlib/source/documentation/lux/abstract/interval.lux14
-rw-r--r--stdlib/source/documentation/lux/abstract/mix.lux4
-rw-r--r--stdlib/source/documentation/lux/abstract/monad.lux14
-rw-r--r--stdlib/source/documentation/lux/abstract/monad/free.lux2
-rw-r--r--stdlib/source/documentation/lux/abstract/monoid.lux2
-rw-r--r--stdlib/source/documentation/lux/abstract/order.lux16
-rw-r--r--stdlib/source/documentation/lux/control/concatenative.lux50
-rw-r--r--stdlib/source/documentation/lux/control/concurrency/actor.lux26
-rw-r--r--stdlib/source/documentation/lux/control/concurrency/async.lux30
-rw-r--r--stdlib/source/documentation/lux/control/concurrency/atom.lux8
-rw-r--r--stdlib/source/documentation/lux/control/concurrency/frp.lux16
-rw-r--r--stdlib/source/documentation/lux/control/concurrency/semaphore.lux22
-rw-r--r--stdlib/source/documentation/lux/control/concurrency/stm.lux12
-rw-r--r--stdlib/source/documentation/lux/control/concurrency/thread.lux4
-rw-r--r--stdlib/source/documentation/lux/control/continuation.lux10
-rw-r--r--stdlib/source/documentation/lux/control/exception.lux20
-rw-r--r--stdlib/source/documentation/lux/control/function.lux10
-rw-r--r--stdlib/source/documentation/lux/control/function/contract.lux4
-rw-r--r--stdlib/source/documentation/lux/control/function/memo.lux6
-rw-r--r--stdlib/source/documentation/lux/control/function/mixin.lux18
-rw-r--r--stdlib/source/documentation/lux/control/function/mutual.lux4
-rw-r--r--stdlib/source/documentation/lux/control/function/predicate.lux16
-rw-r--r--stdlib/source/documentation/lux/control/io.lux6
-rw-r--r--stdlib/source/documentation/lux/control/lazy.lux4
-rw-r--r--stdlib/source/documentation/lux/control/maybe.lux8
-rw-r--r--stdlib/source/documentation/lux/control/parser.lux54
-rw-r--r--stdlib/source/documentation/lux/control/pipe.lux20
-rw-r--r--stdlib/source/documentation/lux/control/reader.lux12
-rw-r--r--stdlib/source/documentation/lux/control/region.lux12
-rw-r--r--stdlib/source/documentation/lux/control/remember.lux6
-rw-r--r--stdlib/source/documentation/lux/control/security/capability.lux8
-rw-r--r--stdlib/source/documentation/lux/control/security/policy.lux20
-rw-r--r--stdlib/source/documentation/lux/control/state.lux26
-rw-r--r--stdlib/source/documentation/lux/control/thread.lux16
-rw-r--r--stdlib/source/documentation/lux/control/try.lux14
-rw-r--r--stdlib/source/documentation/lux/control/writer.lux8
-rw-r--r--stdlib/source/documentation/lux/data/binary.lux78
-rw-r--r--stdlib/source/documentation/lux/data/bit.lux2
-rw-r--r--stdlib/source/documentation/lux/data/collection/array.lux36
-rw-r--r--stdlib/source/documentation/lux/data/collection/bits.lux12
-rw-r--r--stdlib/source/documentation/lux/data/collection/dictionary.lux28
-rw-r--r--stdlib/source/documentation/lux/data/collection/dictionary/ordered.lux20
-rw-r--r--stdlib/source/documentation/lux/data/collection/list.lux60
-rw-r--r--stdlib/source/documentation/lux/data/collection/list/property.lux12
-rw-r--r--stdlib/source/documentation/lux/data/collection/queue.lux14
-rw-r--r--stdlib/source/documentation/lux/data/collection/queue/priority.lux4
-rw-r--r--stdlib/source/documentation/lux/data/collection/sequence.lux20
-rw-r--r--stdlib/source/documentation/lux/data/collection/set.lux10
-rw-r--r--stdlib/source/documentation/lux/data/collection/set/multi.lux16
-rw-r--r--stdlib/source/documentation/lux/data/collection/set/ordered.lux14
-rw-r--r--stdlib/source/documentation/lux/data/collection/stack.lux8
-rw-r--r--stdlib/source/documentation/lux/data/collection/stream.lux16
-rw-r--r--stdlib/source/documentation/lux/data/collection/tree.lux20
-rw-r--r--stdlib/source/documentation/lux/data/collection/tree/finger.lux16
-rw-r--r--stdlib/source/documentation/lux/data/collection/tree/zipper.lux10
-rw-r--r--stdlib/source/documentation/lux/data/color.lux30
-rw-r--r--stdlib/source/documentation/lux/data/color/named.lux2
-rw-r--r--stdlib/source/documentation/lux/data/format/json.lux32
-rw-r--r--stdlib/source/documentation/lux/data/format/xml.lux22
-rw-r--r--stdlib/source/documentation/lux/data/identity.lux2
-rw-r--r--stdlib/source/documentation/lux/data/product.lux14
-rw-r--r--stdlib/source/documentation/lux/data/sum.lux8
-rw-r--r--stdlib/source/documentation/lux/data/text.lux116
-rw-r--r--stdlib/source/documentation/lux/data/text/buffer.lux2
-rw-r--r--stdlib/source/documentation/lux/data/text/encoding.lux4
-rw-r--r--stdlib/source/documentation/lux/data/text/encoding/utf8.lux2
-rw-r--r--stdlib/source/documentation/lux/data/text/escape.lux6
-rw-r--r--stdlib/source/documentation/lux/data/text/regex.lux4
-rw-r--r--stdlib/source/documentation/lux/data/text/unicode/block.lux8
-rw-r--r--stdlib/source/documentation/lux/data/text/unicode/set.lux4
-rw-r--r--stdlib/source/documentation/lux/debug.lux12
-rw-r--r--stdlib/source/documentation/lux/documentation.lux8
-rw-r--r--stdlib/source/documentation/lux/extension.lux8
-rw-r--r--stdlib/source/documentation/lux/ffi.js.lux10
-rw-r--r--stdlib/source/documentation/lux/ffi.jvm.lux42
-rw-r--r--stdlib/source/documentation/lux/ffi.lua.lux4
-rw-r--r--stdlib/source/documentation/lux/ffi.old.lux36
-rw-r--r--stdlib/source/documentation/lux/ffi.py.lux4
-rw-r--r--stdlib/source/documentation/lux/ffi.rb.lux2
-rw-r--r--stdlib/source/documentation/lux/math/infix.lux2
-rw-r--r--stdlib/source/documentation/lux/math/logic/continuous.lux2
-rw-r--r--stdlib/source/documentation/lux/math/logic/fuzzy.lux18
-rw-r--r--stdlib/source/documentation/lux/math/modular.lux6
-rw-r--r--stdlib/source/documentation/lux/math/modulus.lux6
-rw-r--r--stdlib/source/documentation/lux/math/number.lux2
-rw-r--r--stdlib/source/documentation/lux/math/number/complex.lux4
-rw-r--r--stdlib/source/documentation/lux/math/number/frac.lux36
-rw-r--r--stdlib/source/documentation/lux/math/number/i16.lux2
-rw-r--r--stdlib/source/documentation/lux/math/number/i32.lux2
-rw-r--r--stdlib/source/documentation/lux/math/number/i64.lux26
-rw-r--r--stdlib/source/documentation/lux/math/number/i8.lux2
-rw-r--r--stdlib/source/documentation/lux/math/number/int.lux30
-rw-r--r--stdlib/source/documentation/lux/math/number/nat.lux8
-rw-r--r--stdlib/source/documentation/lux/math/number/ratio.lux4
-rw-r--r--stdlib/source/documentation/lux/math/number/rev.lux20
-rw-r--r--stdlib/source/documentation/lux/math/random.lux36
-rw-r--r--stdlib/source/documentation/lux/meta.lux74
-rw-r--r--stdlib/source/documentation/lux/meta/code.lux32
-rw-r--r--stdlib/source/documentation/lux/meta/compiler/language/lux/analysis.lux16
-rw-r--r--stdlib/source/documentation/lux/meta/compiler/language/lux/synthesis.lux20
-rw-r--r--stdlib/source/documentation/lux/meta/location.lux4
-rw-r--r--stdlib/source/documentation/lux/meta/macro.lux20
-rw-r--r--stdlib/source/documentation/lux/meta/macro/local.lux2
-rw-r--r--stdlib/source/documentation/lux/meta/macro/syntax.lux2
-rw-r--r--stdlib/source/documentation/lux/meta/macro/syntax/check.lux2
-rw-r--r--stdlib/source/documentation/lux/meta/macro/syntax/declaration.lux4
-rw-r--r--stdlib/source/documentation/lux/meta/macro/syntax/definition.lux6
-rw-r--r--stdlib/source/documentation/lux/meta/macro/syntax/export.lux2
-rw-r--r--stdlib/source/documentation/lux/meta/macro/syntax/input.lux4
-rw-r--r--stdlib/source/documentation/lux/meta/macro/syntax/type/variable.lux4
-rw-r--r--stdlib/source/documentation/lux/meta/macro/template.lux12
-rw-r--r--stdlib/source/documentation/lux/meta/static.lux8
-rw-r--r--stdlib/source/documentation/lux/meta/symbol.lux4
-rw-r--r--stdlib/source/documentation/lux/meta/target.lux2
-rw-r--r--stdlib/source/documentation/lux/meta/type.lux82
-rw-r--r--stdlib/source/documentation/lux/meta/type/check.lux28
-rw-r--r--stdlib/source/documentation/lux/meta/type/dynamic.lux6
-rw-r--r--stdlib/source/documentation/lux/meta/type/implicit.lux6
-rw-r--r--stdlib/source/documentation/lux/meta/type/poly.lux2
-rw-r--r--stdlib/source/documentation/lux/meta/type/primitive.lux12
-rw-r--r--stdlib/source/documentation/lux/meta/type/quotient.lux8
-rw-r--r--stdlib/source/documentation/lux/meta/type/refinement.lux14
-rw-r--r--stdlib/source/documentation/lux/meta/type/resource.lux28
-rw-r--r--stdlib/source/documentation/lux/meta/type/unit.lux18
-rw-r--r--stdlib/source/documentation/lux/meta/type/variance.lux6
-rw-r--r--stdlib/source/documentation/lux/program.lux20
-rw-r--r--stdlib/source/documentation/lux/test.lux38
-rw-r--r--stdlib/source/documentation/lux/tool.lux13
-rw-r--r--stdlib/source/documentation/lux/world/console.lux8
-rw-r--r--stdlib/source/documentation/lux/world/environment.lux18
-rw-r--r--stdlib/source/documentation/lux/world/file.lux18
-rw-r--r--stdlib/source/documentation/lux/world/file/watch.lux12
-rw-r--r--stdlib/source/documentation/lux/world/input/keyboard.lux4
-rw-r--r--stdlib/source/documentation/lux/world/locale.lux4
-rw-r--r--stdlib/source/documentation/lux/world/locale/language.lux2
-rw-r--r--stdlib/source/documentation/lux/world/locale/territory.lux2
-rw-r--r--stdlib/source/documentation/lux/world/net.lux6
-rw-r--r--stdlib/source/documentation/lux/world/net/http/client.lux4
-rw-r--r--stdlib/source/documentation/lux/world/net/http/status.lux2
-rw-r--r--stdlib/source/documentation/lux/world/net/uri.lux4
-rw-r--r--stdlib/source/documentation/lux/world/output/video/resolution.lux4
-rw-r--r--stdlib/source/documentation/lux/world/shell.lux14
-rw-r--r--stdlib/source/documentation/lux/world/time.lux16
-rw-r--r--stdlib/source/documentation/lux/world/time/date.lux6
-rw-r--r--stdlib/source/documentation/lux/world/time/day.lux4
-rw-r--r--stdlib/source/documentation/lux/world/time/duration.lux4
-rw-r--r--stdlib/source/documentation/lux/world/time/instant.lux18
-rw-r--r--stdlib/source/documentation/lux/world/time/month.lux8
-rw-r--r--stdlib/source/documentation/lux/world/time/year.lux12
-rw-r--r--stdlib/source/library/lux/documentation.lux2
-rw-r--r--stdlib/source/test/lux/documentation.lux18
162 files changed, 1215 insertions, 1228 deletions
diff --git a/lux-mode/lux-mode.el b/lux-mode/lux-mode.el
index ba7416b05..c2c3294d0 100644
--- a/lux-mode/lux-mode.el
+++ b/lux-mode/lux-mode.el
@@ -390,7 +390,7 @@ Called by `imenu--generic-function'."
;; Miscellaneous
(jvm-host (altRE "import" "export" "class" "interface" "object" "synchronized" "class_for"))
(alternative-format (altRE "char" "bin" "oct" "hex"))
- (documentation (altRE "comment" "documentation"))
+ (documentation (altRE "comment"))
(function-application (altRE "|>" "<|" "left" "right" "all"))
(function-definition (altRE "function" "|>>" "<<|"))
(remember (altRE "remember" "to_do" "fix_me"))
@@ -601,7 +601,7 @@ This function also returns nil meaning don't specify the indentation."
("export" 'defun)
("comment" 'defun)
- ("documentation" 'defun)
+ ("definition" 'defun)
("sharing" 'defun)
("by_example" 'defun)
diff --git a/stdlib/source/documentation/lux.lux b/stdlib/source/documentation/lux.lux
index c76736c72..c8d8fff45 100644
--- a/stdlib/source/documentation/lux.lux
+++ b/stdlib/source/documentation/lux.lux
@@ -25,7 +25,6 @@
["[1][0]" math]
["[1][0]" meta]
["[1][0]" program]
- ["[1][0]" static]
["[1][0]" test]
["[1][0]" world]])
@@ -33,106 +32,106 @@
(.List $.Module)
($.module /._
""
- [($.documentation /.prelude
+ [($.definition /.prelude
(format "The name of the prelude module"
\n "Value: " (%.text /.prelude)))
- ($.documentation /.Any
+ ($.definition /.Any
(format "The type of things whose type is irrelevant."
\n "It can be used to write functions or data-structures that can take, or return, anything."))
- ($.documentation /.Nothing
+ ($.definition /.Nothing
(format "The type of things whose type is undefined."
\n "Useful for expressions that cause errors or other 'extraordinary' conditions."))
- ($.documentation (/.List item)
+ ($.definition (/.List item)
"A potentially empty list of values.")
- ($.documentation /.Bit
+ ($.definition /.Bit
"Your standard, run-of-the-mill boolean values (as #0 or #1 bits).")
- ($.documentation (/.I64 kind)
+ ($.definition (/.I64 kind)
"64-bit integers without any semantics.")
- ($.documentation /.Nat
+ ($.definition /.Nat
(format "Natural numbers (unsigned integers)."
\n "They start at zero (0) and extend in the positive direction."))
- ($.documentation /.Int
+ ($.definition /.Int
"Your standard, run-of-the-mill integer numbers.")
- ($.documentation /.Rev
+ ($.definition /.Rev
(format "Fractional numbers that live in the interval [0,1)."
\n "Useful for probability, and other domains that work within that interval."))
- ($.documentation /.Frac
+ ($.definition /.Frac
"Your standard, run-of-the-mill floating-point (fractional) numbers.")
- ($.documentation /.Text
+ ($.definition /.Text
"Your standard, run-of-the-mill string values.")
- ($.documentation /.Symbol
+ ($.definition /.Symbol
(format "A name for a Lux definition."
\n "It includes the module of provenance."))
- ($.documentation (/.Maybe value)
+ ($.definition (/.Maybe value)
"A potentially missing value.")
- ($.documentation /.Type
+ ($.definition /.Type
"This type represents the data-structures that are used to specify types themselves.")
- ($.documentation /.Location
+ ($.definition /.Location
"Locations are for specifying the location of Code nodes in Lux files during compilation.")
- ($.documentation (/.Ann meta_data datum)
+ ($.definition (/.Ann meta_data datum)
"The type of things that can be annotated with meta-data of arbitrary types.")
- ($.documentation /.Code
+ ($.definition /.Code
"The type of Code nodes for Lux syntax.")
- ($.documentation /.private
+ ($.definition /.private
"The export policy for private/local definitions.")
- ($.documentation /.local
+ ($.definition /.local
"The export policy for private/local definitions.")
- ($.documentation /.public
+ ($.definition /.public
"The export policy for public/global definitions.")
- ($.documentation /.global
+ ($.definition /.global
"The export policy for public/global definitions.")
- ($.documentation /.Definition
+ ($.definition /.Definition
"Represents all the data associated with a definition: its type, its annotations, and its value.")
- ($.documentation /.Global
+ ($.definition /.Global
"Represents all the data associated with a global constant.")
- ($.documentation (/.Either left right)
+ ($.definition (/.Either left right)
"A choice between two values of different types.")
- ($.documentation /.Module
+ ($.definition /.Module
"All the information contained within a Lux module.")
- ($.documentation /.Mode
+ ($.definition /.Mode
"A sign that shows the conditions under which the compiler is running.")
- ($.documentation /.Info
+ ($.definition /.Info
"Information about the current version and type of compiler that is running.")
- ($.documentation /.Lux
+ ($.definition /.Lux
(format "Represents the state of the Lux compiler during a run."
\n "It is provided to macros during their invocation, so they can access compiler data."
\n "Caveat emptor: Avoid fiddling with it, unless you know what you're doing."))
- ($.documentation (/.Meta it)
+ ($.definition (/.Meta it)
(format "Computations that can have access to the state of the compiler."
\n "These computations may fail, or modify the state of the compiler."))
- ($.documentation /.Macro
+ ($.definition /.Macro
"Functions that run at compile-time and allow you to transform and extend the language in powerful ways.")
- ($.documentation /.comment
+ ($.definition /.comment
(format "Throws away any code given to it."
\n "Great for commenting-out code, while retaining syntax high-lighting and formatting in your text editor.")
[(comment
@@ -140,7 +139,7 @@
(Be Defined)
(because it will be (commented out))))])
- ($.documentation /.All
+ ($.definition /.All
"Universal quantification."
[(All (_ a)
(-> a a))]
@@ -149,7 +148,7 @@
(Or Any
[a (List a)]))])
- ($.documentation /.Ex
+ ($.definition /.Ex
"Existential quantification."
[(Ex (_ a)
[(Codec Text a) a])]
@@ -159,55 +158,55 @@
a
(List (Self a))])])
- ($.documentation /.->
+ ($.definition /.->
"Function types."
["This is the type of a function that takes 2 Ints and returns an Int."
(-> Int Int Int)])
- ($.documentation /.list
+ ($.definition /.list
"List literals."
[(is (List Nat)
(list 0 1 2 3))])
- ($.documentation /.Union
+ ($.definition /.Union
"Union types."
[(Union Bit Nat Text)]
[(= Nothing
(Union))])
- ($.documentation /.Tuple
+ ($.definition /.Tuple
"Tuple types."
[(Tuple Bit Nat Text)]
[(= Any
(Tuple))])
- ($.documentation /.Or
+ ($.definition /.Or
"An alias for the Union type constructor."
[(= (Union Bit Nat Text)
(Or Bit Nat Text))]
[(= (Union)
(Or))])
- ($.documentation /.And
+ ($.definition /.And
"An alias for the Tuple type constructor."
[(= (Tuple Bit Nat Text)
(And Bit Nat Text))]
[(= (Tuple)
(And))])
- ($.documentation /.left
+ ($.definition /.left
"Left-association for the application of binary functions over variadic arguments."
[(left text#composite "Hello, " name ". How are you?")
"=>"
(text#composite (text#composite "Hello, " name) ". How are you?")])
- ($.documentation /.all
+ ($.definition /.all
"Right-association for the application of binary functions over variadic arguments."
[(all text#composite "Hello, " name ". How are you?")
"=>"
(text#composite "Hello, " (text#composite name ". How are you?"))])
- ($.documentation /.if
+ ($.definition /.if
"Picks which expression to evaluate based on a bit test value."
[(if #1
"Oh, yeah!"
@@ -220,12 +219,12 @@
"=>"
"Aw hell naw!"])
- ($.documentation /.Primitive
+ ($.definition /.Primitive
"Macro to treat define new primitive types."
[(Primitive "java.lang.Object")]
[(Primitive "java.util.List" [(Primitive "java.lang.Long")])])
- ($.documentation /.`
+ ($.definition /.`
(format "Hygienic quasi-quotation as a macro."
\n "Unquote (,) and unquote-splice (,*) must also be used as forms."
\n "All unprefixed macros will receive their parent module's prefix if imported; otherwise will receive the prefix of the module on which the quasi-quote is being used.")
@@ -233,18 +232,18 @@
(function ((,' _) (,* args))
(, body))))])
- ($.documentation /.`'
+ ($.definition /.`'
(format "Unhygienic quasi-quotation as a macro."
\n "Unquote (,) and unquote-splice (,*) must also be used as forms.")
[(`' (def (, name)
(function (_ (,* args))
(, body))))])
- ($.documentation /.'
+ ($.definition /.'
"Quotation as a macro."
[(' YOLO)])
- ($.documentation /.|>
+ ($.definition /.|>
"Piping macro."
[(|> elems
(list#each int#encoded)
@@ -256,7 +255,7 @@
(list#each int#encoded
elems)))])
- ($.documentation /.<|
+ ($.definition /.<|
"Reverse piping macro."
[(<| (mix text#composite "")
(interposed " ")
@@ -268,7 +267,7 @@
(list#each int#encoded
elems)))])
- ($.documentation /.template
+ ($.definition /.template
""
["By specifying a pattern (with holes), and the input data to fill those holes, repeats the pattern as many times as necessary."
(with_template [<name> <diff>]
@@ -280,7 +279,7 @@
[-- -1]
)])
- ($.documentation /.not
+ ($.definition /.not
"Bit negation."
[(not #1)
"=>"
@@ -289,22 +288,22 @@
"=>"
#1])
- ($.documentation /.type
+ ($.definition /.type
"Takes a type expression and returns its representation as data-structure."
[(type_literal (All (_ a)
(Maybe (List a))))])
- ($.documentation /.is
+ ($.definition /.is
"The type-annotation macro."
[(is (List Int)
(list +1 +2 +3))])
- ($.documentation /.as
+ ($.definition /.as
"The type-coercion macro."
[(as Dinosaur
(list +1 +2 +3))])
- ($.documentation /.Rec
+ ($.definition /.Rec
"Parameter-less recursive types."
["A name has to be given to the whole type, to use it within its body."
(Rec Int_List
@@ -326,7 +325,7 @@
{#Apply @ @}
{#Named Symbol @})))])
- ($.documentation /.exec
+ ($.definition /.exec
"Sequential execution of expressions (great for side-effects)."
[(exec
(log! "#1")
@@ -334,7 +333,7 @@
(log! "#3")
"YOLO")])
- ($.documentation /.case
+ ($.definition /.case
(format "The pattern-matching macro."
\n "Allows the usage of macros within the patterns to provide custom syntax.")
[(case (is (List Int)
@@ -345,7 +344,7 @@
_
{#None})])
- ($.documentation /.pattern
+ ($.definition /.pattern
(format "Macro-expanding patterns."
\n "It's a special macro meant to be used with 'case'.")
[(case (is (List Int)
@@ -356,7 +355,7 @@
_
{#None})])
- ... ($.documentation /.^or
+ ... ($.definition /.^or
... (format "Or-patterns."
... \n "It's a special macro meant to be used with 'case'.")
... [(type Weekday
@@ -378,14 +377,14 @@
... _
... #0))])
- ($.documentation /.let
+ ($.definition /.let
(format "Creates local bindings."
\n "Can (optionally) use pattern-matching macros when binding.")
[(let [x (foo bar)
y (baz quux)]
(op x y))])
- ($.documentation /.function
+ ($.definition /.function
"Syntax for creating functions."
[(is (All (_ a b)
(-> a b a))
@@ -398,7 +397,7 @@
0 1
_ (* n (factorial (-- n))))))])
- ($.documentation /.def
+ ($.definition /.def
"Defines global constants/functions."
[(def branching_exponent
Int
@@ -415,7 +414,7 @@
(-> [Code Code] (List Code))
(list left right))])
- ($.documentation /.macro
+ ($.definition /.macro
"Macro-definition macro."
[(def .public symbol
(macro (_ tokens)
@@ -428,7 +427,7 @@
_
(failure "Wrong syntax for symbol"))))])
- ($.documentation /.and
+ ($.definition /.and
"Short-circuiting 'and'."
[(and #1 #0)
"=>"
@@ -437,7 +436,7 @@
"=>"
#1])
- ($.documentation /.or
+ ($.definition /.or
"Short-circuiting 'or'."
[(or #1 #0)
"=>"
@@ -446,11 +445,11 @@
"=>"
#0])
- ($.documentation /.panic!
+ ($.definition /.panic!
"Causes an error, with the given error message."
[(panic! "OH NO!")])
- ($.documentation /.implementation
+ ($.definition /.implementation
"Express a value that implements an interface."
[(is (Order Int)
(implementation
@@ -460,7 +459,7 @@
(< reference subject))
))])
- ($.documentation /.Variant
+ ($.definition /.Variant
(format "Syntax for defining labelled/tagged sum/union types."
\n "WARNING: Only use it within the type macro.")
[(type Referrals
@@ -471,7 +470,7 @@
{#Ignore}
{#Nothing}))])
- ($.documentation /.Record
+ ($.definition /.Record
(format "Syntax for defining labelled/slotted product/tuple types."
\n "WARNING: Only use it within the type macro.")
[(type Refer
@@ -479,13 +478,13 @@
[#refer_defs Referrals
#refer_open (List Openings)]))])
- ($.documentation /.type
+ ($.definition /.type
"The type-definition macro."
[(type (List a)
{#End}
{#Item a (List a)})])
- ($.documentation /.Interface
+ ($.definition /.Interface
"Interface definition."
[(type .public (Order a)
(Interface
@@ -495,7 +494,7 @@
<)))])
(.,, (.with_template [<name>]
- [($.documentation <name>
+ [($.definition <name>
"Safe type-casting for I64 values.")]
[/.i64]
@@ -504,11 +503,11 @@
[/.rev]
))
- ($.documentation /.module_separator
+ ($.definition /.module_separator
(format "Character used to separate the parts of module names."
\n "Value: " (%.text /.module_separator)))
- ($.documentation /.open
+ ($.definition /.open
(format "Same as the 'open' macro, but meant to be used as a pattern-matching macro for generating local bindings."
\n "Takes an 'alias' text for the generated local bindings.")
[(def .public (range enum from to)
@@ -525,13 +524,13 @@
... (= end from)
{.#Item end output}))))])
- ($.documentation /.cond
+ ($.definition /.cond
"Conditional branching with multiple test conditions."
[(cond (even? num) "WHEN even"
(odd? num) "WHEN odd"
"ELSE")])
- ($.documentation /.the
+ ($.definition /.the
"Accesses the value of a record at a given tag."
[(the #field my_record)]
["Can also work with multiple levels of nesting."
@@ -540,14 +539,14 @@
(let [getter (the [#foo #bar #baz])]
(getter my_record))])
- ($.documentation /.use
+ ($.definition /.use
"Opens a implementation and generates a definition for each of its members (including nested members)."
[(use "i:[0]" order)
"=>"
(def i:= (at order =))
(def i:< (at order <))])
- ($.documentation /.|>>
+ ($.definition /.|>>
"Similar to the piping macro, but rather than taking an initial object to work on, creates a function for taking it."
[(|>> (list#each int#encoded)
(interposed " ")
@@ -558,7 +557,7 @@
(interposed " "
(list#each int#encoded <it>))))])
- ($.documentation /.<<|
+ ($.definition /.<<|
"Similar to the reverse piping macro, but rather than taking an initial object to work on, creates a function for taking it."
[(<<| (mix text#composite "")
(interposed " ")
@@ -570,7 +569,7 @@
(list#each int#encoded
<it>))))])
- ($.documentation /.require
+ ($.definition /.require
"Module-definition macro."
[(.require
[lux (.except)
@@ -584,13 +583,13 @@
[//
[type (.use "[0]" equivalence)]])])
- ($.documentation /.at
+ ($.definition /.at
"Allows accessing the value of a implementation's member."
[(at codec encoded)]
["Also allows using that value as a function."
(at codec encoded +123)])
- ($.documentation /.has
+ ($.definition /.has
"Sets the value of a record at a given tag."
[(has #name "Lux" lang)]
["Can also work with multiple levels of nesting."
@@ -601,7 +600,7 @@
(let [setter (has [#foo #bar #baz])]
(setter value my_record))])
- ($.documentation /.revised
+ ($.definition /.revised
"Modifies the value of a record at a given tag, based on some function."
[(revised #age ++ person)]
["Can also work with multiple levels of nesting."
@@ -612,7 +611,7 @@
(let [updater (revised [#foo #bar #baz])]
(updater func my_record))])
- ... ($.documentation /.^template
+ ... ($.definition /.^template
... "It's similar to template, but meant to be used during pattern-matching."
... [(def (reduced env type)
... (-> (List Type) Type Type)
@@ -648,14 +647,14 @@
... ))])
(.,, (.with_template [<name> <doc>]
- [($.documentation <name>
+ [($.definition <name>
<doc>)]
[/.++ "Increment function."]
[/.-- "Decrement function."]
))
- ($.documentation /.loop
+ ($.definition /.loop
(format "Allows arbitrary looping, using the 'again' form to re-start the loop."
\n "Can be used in monadic code to create monadic loops.")
[(loop (again [count +0
@@ -670,7 +669,7 @@
(my_loop (++ count) (f x))
x))])
- ($.documentation /.with_expansions
+ ($.definition /.with_expansions
(format "Controlled macro-expansion."
\n "Bind an arbitraty number of Code nodes resulting from macro-expansion to local bindings."
\n "Wherever a binding appears, the bound Code nodes will be spliced in there.")
@@ -694,7 +693,7 @@
<tests>
)))])
- ($.documentation /.static
+ ($.definition /.static
(format "Resolves the names of definitions to their values at compile-time, assuming their values are either:"
\n "* Bit"
\n "* Nat"
@@ -717,7 +716,7 @@
_
false))])
- ... ($.documentation /.^multi
+ ... ($.definition /.^multi
... (format "Multi-level pattern matching."
... \n "Useful in situations where the result of a branch depends on further refinements on the values being matched.")
... [(case (split (size static) uri)
@@ -737,13 +736,13 @@
... _
... {#Left (format "Static part " (%t static) " does not match URI: " uri)})])
- ($.documentation /.symbol
+ ($.definition /.symbol
"Gives back a 2 tuple with the module and name parts, both as Text."
[(symbol ..#doc)
"=>"
["documentation/lux" "#doc"]])
- ($.documentation /.parameter
+ ($.definition /.parameter
(format "WARNING: Please stay away from this macro; it's very likely to be removed in a future version of Lux."
"Allows you to refer to the type-variables in a polymorphic function's type, by their index.")
["In the example below, 0 corresponds to the 'a' variable."
@@ -754,7 +753,7 @@
empty)
list))])
- ($.documentation /.same?
+ ($.definition /.same?
"Tests whether the 2 values are identical (not just 'equal')."
["This one should succeed:"
(let [value +5]
@@ -764,7 +763,7 @@
(same? +5
(+ +2 +3))])
- ... ($.documentation /.^let
+ ... ($.definition /.^let
... "Allows you to simultaneously bind and de-structure a value."
... [(def (hash (^let set [member_hash _]))
... (list#mix (function (_ elem acc)
@@ -773,19 +772,19 @@
... 0
... (set.list set)))])
- ... ($.documentation /.^|>
+ ... ($.definition /.^|>
... "Pipes the value being pattern-matched against prior to binding it to a variable."
... [(case input
... (^|> value [++ (% 10) (max 1)])
... (foo value))])
- ($.documentation /.as_expected
+ ($.definition /.as_expected
"Coerces the given expression to the type of whatever is expected."
[(is Dinosaur
(as_expected (is (List Nat)
(list 1 2 3))))])
- ($.documentation /.undefined
+ ($.definition /.undefined
(format "Meant to be used as a stand-in for functions with undefined implementations."
\n "Undefined expressions will type-check against everything, so they make good dummy implementations."
\n "However, if an undefined expression is ever evaluated, it will raise a runtime error.")
@@ -793,7 +792,7 @@
(-> Int Int)
(undefined))])
- ($.documentation /.type_of
+ ($.definition /.type_of
"Generates the type corresponding to a given expression."
[(let [my_num +123]
(type_of my_num))
@@ -803,14 +802,14 @@
"=="
Int])
- ($.documentation /.template
+ ($.definition /.template
(format "Define macros in the style of with_template."
\n "For simple macros that do not need any fancy features.")
[(def square
(template (square x)
(* x x)))])
- ($.documentation /.these
+ ($.definition /.these
(format "Given a (potentially empty) list of codes, just returns them immediately, without any work done."
\n "This may seen useless, but it has its utility when dealing with controlled-macro-expansion macros.")
[(with_expansions [<operands> (these 1
@@ -819,14 +818,14 @@
4)]
(all + <operands>))])
- ($.documentation /.char
+ ($.definition /.char
"If given a 1-character text literal, yields the char-code of the sole character."
[(is Nat
(char "A"))
"=>"
65])
- ($.documentation /.for
+ ($.definition /.for
(format "Selects the appropriate code for a given target-platform when compiling Lux to it."
\n "Look-up the available targets in library/lux/target.")
[(def js
@@ -836,13 +835,13 @@
js (do js stuff)
(do default stuff))])
- ($.documentation /.``
+ ($.definition /.``
(format "Delimits a controlled (spliced) macro-expansion."
\n "Uses a (,,) special form to specify where to expand.")
[(`` (some expression
(,, (some macro which may yield 0 or more results))))])
- ... ($.documentation /.^code
+ ... ($.definition /.^code
... "Generates pattern-matching code for Code values in a way that looks like code-templating."
... [(is (Maybe Nat)
... (case (` (#0 123 +456.789))
@@ -852,13 +851,13 @@
... _
... {.#None}))])
- ($.documentation /.false
+ ($.definition /.false
"The boolean FALSE value.")
- ($.documentation /.true
+ ($.definition /.true
"The boolean TRUE value.")
- ($.documentation /.try
+ ($.definition /.try
""
[(is Foo
(case (is (Either Text Bar)
@@ -893,7 +892,6 @@
/math.documentation
/meta.documentation
/program.documentation
- /static.documentation
/test.documentation
/world.documentation])))
diff --git a/stdlib/source/documentation/lux/abstract/apply.lux b/stdlib/source/documentation/lux/abstract/apply.lux
index e14b743f1..95818533d 100644
--- a/stdlib/source/documentation/lux/abstract/apply.lux
+++ b/stdlib/source/documentation/lux/abstract/apply.lux
@@ -9,9 +9,9 @@
(.List $.Module)
($.module /._
""
- [($.documentation (/.Apply f)
+ [($.definition (/.Apply f)
"Applicative functors.")
- ($.documentation /.composite
+ ($.definition /.composite
"Applicative functor composition.")]
[]))
diff --git a/stdlib/source/documentation/lux/abstract/codec.lux b/stdlib/source/documentation/lux/abstract/codec.lux
index 0bf5a020c..b23b86df6 100644
--- a/stdlib/source/documentation/lux/abstract/codec.lux
+++ b/stdlib/source/documentation/lux/abstract/codec.lux
@@ -9,10 +9,10 @@
(.List $.Module)
($.module /._
""
- [($.documentation (/.Codec medium value)
+ [($.definition (/.Codec medium value)
"A way to move back-and-forth between a type and an alternative representation for it.")
- ($.documentation /.composite
+ ($.definition /.composite
"Codec composition."
[(is (Codec c a)
(composite (is (Codec c b)
diff --git a/stdlib/source/documentation/lux/abstract/comonad.lux b/stdlib/source/documentation/lux/abstract/comonad.lux
index 6649be330..9f24d7d66 100644
--- a/stdlib/source/documentation/lux/abstract/comonad.lux
+++ b/stdlib/source/documentation/lux/abstract/comonad.lux
@@ -14,11 +14,11 @@
(.List $.Module)
($.module /._
""
- [($.documentation (/.CoMonad !)
+ [($.definition (/.CoMonad !)
(format "Co-monads are the opposite/complement to monads."
\n "Co-monadic structures are often infinite in size and built upon lazily-evaluated functions."))
- ($.documentation /.be
+ ($.definition /.be
"A co-monadic parallel to the 'do' macro."
[(let [square (function (_ n) (* n n))]
(be comonad
diff --git a/stdlib/source/documentation/lux/abstract/comonad/free.lux b/stdlib/source/documentation/lux/abstract/comonad/free.lux
index 4d37b2953..178ce809f 100644
--- a/stdlib/source/documentation/lux/abstract/comonad/free.lux
+++ b/stdlib/source/documentation/lux/abstract/comonad/free.lux
@@ -12,6 +12,6 @@
[($.default /.functor)
($.default /.comonad)
- ($.documentation (/.Free ! it)
+ ($.definition (/.Free ! it)
"The Free CoMonad.")]
[]))
diff --git a/stdlib/source/documentation/lux/abstract/enum.lux b/stdlib/source/documentation/lux/abstract/enum.lux
index b6c0aa0a1..a2dd452c8 100644
--- a/stdlib/source/documentation/lux/abstract/enum.lux
+++ b/stdlib/source/documentation/lux/abstract/enum.lux
@@ -9,10 +9,10 @@
(.List $.Module)
($.module /._
""
- [($.documentation (/.Enum it)
+ [($.definition (/.Enum it)
"Enumerable types, with a notion of moving forward and backwards through a type's instances.")
- ($.documentation /.range
+ ($.definition /.range
"An inclusive [from, to] range of values."
[(range enum from to)])]
[]))
diff --git a/stdlib/source/documentation/lux/abstract/equivalence.lux b/stdlib/source/documentation/lux/abstract/equivalence.lux
index 0867832d8..82ab916ef 100644
--- a/stdlib/source/documentation/lux/abstract/equivalence.lux
+++ b/stdlib/source/documentation/lux/abstract/equivalence.lux
@@ -12,10 +12,10 @@
(.List $.Module)
($.module /._
""
- [($.documentation (/.Equivalence it)
+ [($.definition (/.Equivalence it)
"Equivalence for a type's instances.")
- ($.documentation /.rec
+ ($.definition /.rec
"A recursive equivalence combinator."
[(rec recursive_equivalence)])
diff --git a/stdlib/source/documentation/lux/abstract/functor.lux b/stdlib/source/documentation/lux/abstract/functor.lux
index 853b461f8..1f1aa6f4f 100644
--- a/stdlib/source/documentation/lux/abstract/functor.lux
+++ b/stdlib/source/documentation/lux/abstract/functor.lux
@@ -19,12 +19,12 @@
($.default (/.And left right))
($.default (/.Then outer inner))
- ($.documentation /.sum
+ ($.definition /.sum
"Co-product (sum) composition for functors.")
- ($.documentation /.product
+ ($.definition /.product
"Product composition for functors.")
- ($.documentation /.composite
+ ($.definition /.composite
"Functor composition.")]
[/contravariant.documentation]))
diff --git a/stdlib/source/documentation/lux/abstract/functor/contravariant.lux b/stdlib/source/documentation/lux/abstract/functor/contravariant.lux
index 406934d20..b438a6a7c 100644
--- a/stdlib/source/documentation/lux/abstract/functor/contravariant.lux
+++ b/stdlib/source/documentation/lux/abstract/functor/contravariant.lux
@@ -9,6 +9,6 @@
(.List $.Module)
($.module /._
""
- [($.documentation (/.Functor !)
+ [($.definition (/.Functor !)
"The contravariant functor.")]
[]))
diff --git a/stdlib/source/documentation/lux/abstract/hash.lux b/stdlib/source/documentation/lux/abstract/hash.lux
index da121864d..94410e5e3 100644
--- a/stdlib/source/documentation/lux/abstract/hash.lux
+++ b/stdlib/source/documentation/lux/abstract/hash.lux
@@ -14,6 +14,6 @@
""
[($.default /.functor)
- ($.documentation (/.Hash it)
+ ($.definition (/.Hash it)
"A way to produce hash-codes for a type's instances.")]
[]))
diff --git a/stdlib/source/documentation/lux/abstract/interval.lux b/stdlib/source/documentation/lux/abstract/interval.lux
index 84e20a61f..953dec5bb 100644
--- a/stdlib/source/documentation/lux/abstract/interval.lux
+++ b/stdlib/source/documentation/lux/abstract/interval.lux
@@ -30,25 +30,25 @@
($.default /.nested?)
($.default /.overlaps?)
- ($.documentation (/.Interval it)
+ ($.definition (/.Interval it)
"A representation of top and bottom boundaries for an ordered type.")
- ($.documentation /.singleton
+ ($.definition /.singleton
"An interval where both top and bottom are the same value."
[(singleton enum elem)])
- ($.documentation /.borders?
+ ($.definition /.borders?
"Where a value is at the border of an interval.")
- ($.documentation /.union
+ ($.definition /.union
"An interval that spans both predecessors.")
- ($.documentation /.intersection
+ ($.definition /.intersection
"An interval spanned by both predecessors.")
- ($.documentation /.complement
+ ($.definition /.complement
"The inverse of an interval.")
- ($.documentation /.meets?
+ ($.definition /.meets?
"Whether an interval meets another one on its bottom/lower side.")]
[]))
diff --git a/stdlib/source/documentation/lux/abstract/mix.lux b/stdlib/source/documentation/lux/abstract/mix.lux
index d63ebe15a..ed30c665e 100644
--- a/stdlib/source/documentation/lux/abstract/mix.lux
+++ b/stdlib/source/documentation/lux/abstract/mix.lux
@@ -12,10 +12,10 @@
(.List $.Module)
($.module /._
""
- [($.documentation (/.Mix structure)
+ [($.definition (/.Mix structure)
"Iterate over a structure's values to build a summary value.")
- ($.documentation /.with_monoid
+ ($.definition /.with_monoid
"Mix a mixable structure using the monoid's identity as the initial value."
[(with_monoid monoid mix value)])]
[]))
diff --git a/stdlib/source/documentation/lux/abstract/monad.lux b/stdlib/source/documentation/lux/abstract/monad.lux
index 3e160d0fe..7f35e4b7d 100644
--- a/stdlib/source/documentation/lux/abstract/monad.lux
+++ b/stdlib/source/documentation/lux/abstract/monad.lux
@@ -14,34 +14,34 @@
(.List $.Module)
($.module /._
""
- [($.documentation (/.Monad it)
+ [($.definition (/.Monad it)
(format "A monad is a monoid in the category of endofunctors."
\n "What's the problem?"))
- ($.documentation /.do
+ ($.definition /.do
"Macro for easy concatenation of monadic operations."
[(do monad
[y (f1 x)
z (f2 z)]
(in (f3 z)))])
- ($.documentation /.then
+ ($.definition /.then
"Apply a function with monadic effects to a monadic value and yield a new monadic value."
[(then monad function)])
- ($.documentation /.all
+ ($.definition /.all
"Run all the monadic values in the list and produce a list of the base values."
[(all monad)])
- ($.documentation /.each
+ ($.definition /.each
"Apply a monadic function to all values in a list."
[(each monad function items)])
- ($.documentation /.only
+ ($.definition /.only
"Filter the values in a list with a monadic function."
[(only monad predicate items)])
- ($.documentation /.mix
+ ($.definition /.mix
"Mix a list with a monadic function."
[(mix monad function initial_value items)])]
[/free.documentation]))
diff --git a/stdlib/source/documentation/lux/abstract/monad/free.lux b/stdlib/source/documentation/lux/abstract/monad/free.lux
index 421a323c8..35266d9bb 100644
--- a/stdlib/source/documentation/lux/abstract/monad/free.lux
+++ b/stdlib/source/documentation/lux/abstract/monad/free.lux
@@ -13,6 +13,6 @@
($.default /.apply)
($.default /.monad)
- ($.documentation (/.Free ! it)
+ ($.definition (/.Free ! it)
"The Free Monad.")]
[]))
diff --git a/stdlib/source/documentation/lux/abstract/monoid.lux b/stdlib/source/documentation/lux/abstract/monoid.lux
index 6b8dc5bbd..13e1a6578 100644
--- a/stdlib/source/documentation/lux/abstract/monoid.lux
+++ b/stdlib/source/documentation/lux/abstract/monoid.lux
@@ -14,7 +14,7 @@
""
[($.default /.and)
- ($.documentation (/.Monoid it)
+ ($.definition (/.Monoid it)
(format "A way to compose values."
\n "Includes an identity value which does not alter any other value when combined with."))]
[]))
diff --git a/stdlib/source/documentation/lux/abstract/order.lux b/stdlib/source/documentation/lux/abstract/order.lux
index b28945800..766c29192 100644
--- a/stdlib/source/documentation/lux/abstract/order.lux
+++ b/stdlib/source/documentation/lux/abstract/order.lux
@@ -14,27 +14,27 @@
""
[($.default /.functor)
- ($.documentation (/.Order it)
+ ($.definition (/.Order it)
"A signature for types that possess some sense of ordering among their elements.")
- ($.documentation (/.Comparison it)
+ ($.definition (/.Comparison it)
"An arbitrary comparison between two values, with the knowledge of how to order them.")
- ($.documentation /.<=
+ ($.definition /.<=
"Less than or equal.")
- ($.documentation /.>
+ ($.definition /.>
"Greater than.")
- ($.documentation /.>=
+ ($.definition /.>=
"Greater than or equal.")
- ($.documentation (/.Choice it)
+ ($.definition (/.Choice it)
"A choice comparison between two values, with the knowledge of how to order them.")
- ($.documentation /.min
+ ($.definition /.min
"Minimum.")
- ($.documentation /.max
+ ($.definition /.max
"Maximum.")]
[]))
diff --git a/stdlib/source/documentation/lux/control/concatenative.lux b/stdlib/source/documentation/lux/control/concatenative.lux
index 0d5a85f5a..c80dd42e9 100644
--- a/stdlib/source/documentation/lux/control/concatenative.lux
+++ b/stdlib/source/documentation/lux/control/concatenative.lux
@@ -23,7 +23,7 @@
""
[($.default /.value)
- ($.documentation /.=>
+ ($.definition /.=>
"Concatenative function types."
[(=> [Nat] [Nat])]
[(All (_ a)
@@ -37,7 +37,7 @@
else (=> ,,,0 ,,,1)]
,,,0 [Bit then else] ,,,1))])
- ($.documentation /.apply
+ ($.definition /.apply
"A generator for functions that turn arity N functions into arity N concatenative functions."
[(is (=> [Nat] [Nat])
((apply 1) ++))])
@@ -46,45 +46,45 @@
[(with_expansions [<name> (template.symbol [/._] ["apply_" <arity>])
<doc> (template.text ["Lift a function of arity " <arity>
" into a concatenative function of arity " <arity> "."])]
- ($.documentation <name>
+ ($.definition <name>
<doc>))]
[1] [2] [3] [4]
[5] [6] [7] [8]
))
- ($.documentation /.push
+ ($.definition /.push
"Push a value onto the stack.")
- ($.documentation /.drop
+ ($.definition /.drop
"Drop/pop a value from the top of the stack.")
- ($.documentation /.nip
+ ($.definition /.nip
"Drop the second-to-last value from the top of the stack.")
- ($.documentation /.dup
+ ($.definition /.dup
"Duplicate the top of the stack.")
- ($.documentation /.swap
+ ($.definition /.swap
"Swaps the 2 topmost stack values.")
- ($.documentation /.left_rotation
+ ($.definition /.left_rotation
"Rotes the 3 topmost stack values to the left.")
- ($.documentation /.right_rotation
+ ($.definition /.right_rotation
"Rotes the 3 topmost stack values to the right.")
- ($.documentation /.&&
+ ($.definition /.&&
"Groups the 2 topmost stack values as a 2-tuple.")
- ($.documentation /.left
+ ($.definition /.left
"Left-injects the top into sum.")
- ($.documentation /.right
+ ($.definition /.right
"Right-injects the top into sum.")
(,, (with_template [<input> <word> <func>]
- [(`` ($.documentation (,, (template.symbol [/._] [<word>]))
+ [(`` ($.definition (,, (template.symbol [/._] [<word>]))
(,, (template.text [<func> " for " <input> " arithmetic."]))))]
[Nat n/+ n.+]
@@ -132,7 +132,7 @@
[Frac f/>= f.>=]
))
- ($.documentation /.if
+ ($.definition /.if
"If expression."
[(same? "then"
(/.value (|>> (push true)
@@ -140,19 +140,19 @@
(push "else")
if)))])
- ($.documentation /.call
+ ($.definition /.call
"Executes an anonymous block on the stack.")
- ($.documentation /.loop
+ ($.definition /.loop
"Executes a block as a loop until it yields #0 to stop.")
- ($.documentation /.dip
+ ($.definition /.dip
"Executes a block on the stack, save for the topmost value.")
- ($.documentation /.dip_2
+ ($.definition /.dip_2
"Executes a block on the stack, save for the 2 topmost values.")
- ($.documentation /.do
+ ($.definition /.do
"Do-while loop expression."
[(n.= (++ sample)
(/.value (|>> (push sample)
@@ -160,7 +160,7 @@
(push (|>> (push 1) n/+))
do while)))])
- ($.documentation /.while
+ ($.definition /.while
"While loop expression."
[(n.= (n.+ distance start)
(/.value (|>> (push start)
@@ -170,7 +170,7 @@
(push (|>> (push 1) n/+))
while)))])
- ($.documentation /.compose
+ ($.definition /.compose
"Function composition."
[(n.= (n.+ 2 sample)
(/.value (|>> (push sample)
@@ -179,7 +179,7 @@
compose
call)))])
- ($.documentation /.partial
+ ($.definition /.partial
"Partial application."
[(n.= (n.+ sample sample)
(/.value (|>> (push sample)
@@ -188,9 +188,9 @@
partial
call)))])
- ($.documentation /.when
+ ($.definition /.when
"Only execute the block when #1.")
- ($.documentation /.?
+ ($.definition /.?
"Choose the top value when #0 and the second-to-top when #1.")]
[])))
diff --git a/stdlib/source/documentation/lux/control/concurrency/actor.lux b/stdlib/source/documentation/lux/control/concurrency/actor.lux
index 16e529ca9..c9df4c40d 100644
--- a/stdlib/source/documentation/lux/control/concurrency/actor.lux
+++ b/stdlib/source/documentation/lux/control/concurrency/actor.lux
@@ -17,44 +17,44 @@
($.default /.alive?)
($.default /.obituary')
- ($.documentation (/.Actor state)
+ ($.definition (/.Actor state)
"An entity that can react to messages (mail) sent to it concurrently.")
- ($.documentation (/.Mail state)
+ ($.definition (/.Mail state)
"A one-way message sent to an actor, without expecting a reply.")
- ($.documentation (/.Obituary state)
+ ($.definition (/.Obituary state)
"Details on the death of an actor.")
- ($.documentation (/.Behavior state)
+ ($.definition (/.Behavior state)
"An actor's behavior when mail is received.")
- ($.documentation /.spawn!
+ ($.definition /.spawn!
"Given a behavior and initial state, spawns an actor and returns it.")
- ($.documentation /.obituary
+ ($.definition /.obituary
"Await for an actor to stop working.")
- ($.documentation /.mail!
+ ($.definition /.mail!
"Send mail to an actor.")
- ($.documentation (/.Message state output)
+ ($.definition (/.Message state output)
"A two-way message sent to an actor, expecting a reply.")
- ($.documentation /.tell!
+ ($.definition /.tell!
"Communicate with an actor through message-passing.")
- ($.documentation /.default
+ ($.definition /.default
"Default actor behavior.")
- ($.documentation /.poison!
+ ($.definition /.poison!
(format "Kills the actor by sending mail that will kill it upon processing,"
\n "but allows the actor to handle previous mail."))
- ($.documentation /.Stop
+ ($.definition /.Stop
"A signal to stop an actor from observing a channel.")
- ($.documentation /.observe!
+ ($.definition /.observe!
(format "Use an actor to observe a channel by transforming each datum"
\n "flowing through the channel into mail the actor can process."
\n "Can stop observing the channel by executing the Stop value."))]
diff --git a/stdlib/source/documentation/lux/control/concurrency/async.lux b/stdlib/source/documentation/lux/control/concurrency/async.lux
index 655307522..4899894ef 100644
--- a/stdlib/source/documentation/lux/control/concurrency/async.lux
+++ b/stdlib/source/documentation/lux/control/concurrency/async.lux
@@ -16,64 +16,64 @@
($.default /.apply)
($.default /.monad)
- ($.documentation (/.Async it)
+ ($.definition (/.Async it)
"Represents values produced by asynchronous computations (unlike IO, which is synchronous).")
- ($.documentation (/.Resolver it)
+ ($.definition (/.Resolver it)
(format "The function used to give a value to an async."
\n "Will signal 'true' if the async has been resolved for the 1st time, 'false' otherwise."))
- ($.documentation /.resolved
+ ($.definition /.resolved
"Produces an async that has already been resolved to the given value."
[(resolved value)])
- ($.documentation /.async
+ ($.definition /.async
"Creates a fresh async that has not been resolved yet."
[(async _)])
- ($.documentation /.value
+ ($.definition /.value
"Polls an async for its value.")
- ($.documentation /.upon!
+ ($.definition /.upon!
"Executes the given function as soon as the async has been resolved."
[(upon! function async)])
- ($.documentation /.resolved?
+ ($.definition /.resolved?
"Checks whether an async's value has already been resolved.")
- ($.documentation /.and
+ ($.definition /.and
"Combines the results of both asyncs, in-order."
[(and left right)])
- ($.documentation /.or
+ ($.definition /.or
(format "Yields the results of whichever async gets resolved first."
\n "You can tell which one was resolved first through pattern-matching.")
[(or left right)])
- ($.documentation /.either
+ ($.definition /.either
(format "Yields the results of whichever async gets resolved first."
\n "You cannot tell which one was resolved first.")
[(either left right)])
- ($.documentation /.schedule!
+ ($.definition /.schedule!
(format "Runs an I/O computation on its own thread (after a specified delay)."
\n "Returns an async that will eventually host its result.")
[(schedule! milli_seconds computation)])
- ($.documentation /.future
+ ($.definition /.future
(format "Runs an I/O computation on its own thread."
\n "Returns an async that will eventually host its result.")
[(future computation)])
- ($.documentation /.after
+ ($.definition /.after
"Delivers a value after a certain period has passed."
[(after milli_seconds value)])
- ($.documentation /.delay
+ ($.definition /.delay
"An async that will be resolved after the specified amount of milli-seconds."
[(delay milli_seconds)])
- ($.documentation /.within
+ ($.definition /.within
"Wait for an async to be resolved within the specified amount of milli-seconds."
[(within milli_seconds async)])]
[]))
diff --git a/stdlib/source/documentation/lux/control/concurrency/atom.lux b/stdlib/source/documentation/lux/control/concurrency/atom.lux
index 77dcba913..b02aaff9a 100644
--- a/stdlib/source/documentation/lux/control/concurrency/atom.lux
+++ b/stdlib/source/documentation/lux/control/concurrency/atom.lux
@@ -15,19 +15,19 @@
[($.default /.atom)
($.default /.read!)
- ($.documentation (/.Atom it)
+ ($.definition (/.Atom it)
"Atomic references that are safe to mutate concurrently.")
- ($.documentation /.compare_and_swap!
+ ($.definition /.compare_and_swap!
(format "Only mutates an atom if you can present its current value."
\n "That guarantees that atom was not updated since you last read from it."))
- ($.documentation /.update!
+ ($.definition /.update!
(format "Updates an atom by applying a function to its current value."
\n "If it fails to update it (because some other process wrote to it first), it will retry until it succeeds."
\n "The retries will be done with the new values of the atom, as they show up."))
- ($.documentation /.write!
+ ($.definition /.write!
(format "Writes the given value to an atom."
\n "If it fails to write it (because some other process wrote to it first), it will retry until it succeeds."))]
[]))
diff --git a/stdlib/source/documentation/lux/control/concurrency/frp.lux b/stdlib/source/documentation/lux/control/concurrency/frp.lux
index 2f89cf7bd..ed095f73c 100644
--- a/stdlib/source/documentation/lux/control/concurrency/frp.lux
+++ b/stdlib/source/documentation/lux/control/concurrency/frp.lux
@@ -24,33 +24,33 @@
($.default /.distinct)
($.default /.list)
- ($.documentation (/.Channel it)
+ ($.definition (/.Channel it)
"An asynchronous channel to distribute values.")
- ($.documentation (/.Sink it)
+ ($.definition (/.Sink it)
"The tail-end of a channel, which can be written-to to fee the channel.")
- ($.documentation /.channel
+ ($.definition /.channel
"Creates a brand-new channel and hands it over, along with the sink to write to it."
[(channel _)])
- ($.documentation (/.Subscriber it)
+ ($.definition (/.Subscriber it)
"A function that can receive every value fed into a channel.")
- ($.documentation /.only
+ ($.definition /.only
(format "Produces a new channel based on the old one, only with values"
\n "that pass the test.")
[(only pass? channel)])
- ($.documentation /.of_async
+ ($.definition /.of_async
"A one-element channel containing the output from an async."
[(of_async async)])
- ($.documentation /.mix
+ ($.definition /.mix
"Asynchronous mix over channels."
[(mix f init channel)])
- ($.documentation /.sequential
+ ($.definition /.sequential
"Transforms the given list into a channel with the same elements."
[(sequential milli_seconds values)])]
[]))
diff --git a/stdlib/source/documentation/lux/control/concurrency/semaphore.lux b/stdlib/source/documentation/lux/control/concurrency/semaphore.lux
index 77d05a40b..34207f7e5 100644
--- a/stdlib/source/documentation/lux/control/concurrency/semaphore.lux
+++ b/stdlib/source/documentation/lux/control/concurrency/semaphore.lux
@@ -15,42 +15,42 @@
[($.default /.semaphore_is_maxed_out)
($.default /.barrier)
- ($.documentation /.Semaphore
+ ($.definition /.Semaphore
"A tool for controlling access to resources by multiple concurrent processes.")
- ($.documentation /.semaphore
+ ($.definition /.semaphore
""
[(semaphore initial_open_positions)])
- ($.documentation /.wait!
+ ($.definition /.wait!
(format "Wait on a semaphore until there are open positions."
\n "After finishing your work, you must 'signal' to the semaphore that you're done.")
[(wait! semaphore)])
- ($.documentation /.signal!
+ ($.definition /.signal!
"Signal to a semaphore that you're done with your work, and that there is a new open position."
[(signal! semaphore)])
- ($.documentation /.Mutex
+ ($.definition /.Mutex
"A mutual-exclusion lock that can only be acquired by one process at a time.")
- ($.documentation /.mutex
+ ($.definition /.mutex
"Creates a brand-new mutex."
[(mutex _)])
- ($.documentation /.synchronize!
+ ($.definition /.synchronize!
"Runs the procedure with exclusive control of the mutex."
[(synchronize! mutex procedure)])
- ($.documentation /.limit
+ ($.definition /.limit
"Produce a limit for a barrier.")
- ($.documentation /.Limit
+ ($.definition /.Limit
"A limit for barriers.")
- ($.documentation /.Barrier
+ ($.definition /.Barrier
"A barrier that blocks all processes from proceeding until a given number of processes are parked at the barrier.")
- ($.documentation /.block!
+ ($.definition /.block!
"Wait on a barrier until all processes have arrived and met the barrier's limit.")]
[]))
diff --git a/stdlib/source/documentation/lux/control/concurrency/stm.lux b/stdlib/source/documentation/lux/control/concurrency/stm.lux
index bd702f964..00bf8fc2c 100644
--- a/stdlib/source/documentation/lux/control/concurrency/stm.lux
+++ b/stdlib/source/documentation/lux/control/concurrency/stm.lux
@@ -18,25 +18,25 @@
($.default /.apply)
($.default /.monad)
- ($.documentation (/.Var it)
+ ($.definition (/.Var it)
"A mutable cell containing a value, and observers that will be alerted of any change to it.")
- ($.documentation /.var
+ ($.definition /.var
"Creates a new STM var, with a default value."
[(var value)])
- ($.documentation /.changes
+ ($.definition /.changes
"Creates a channel that will receive all changes to the value of the given var."
[(changes target)])
- ($.documentation (/.STM it)
+ ($.definition (/.STM it)
"A computation which updates a transaction and produces a value.")
- ($.documentation /.update
+ ($.definition /.update
"Update a var's value, and return a tuple with the old and the new values."
[(update function var)])
- ($.documentation /.commit!
+ ($.definition /.commit!
(format "Commits a transaction and returns its result (asynchronously)."
\n "Note that a transaction may be re-run an indeterminate number of times if other transactions involving the same variables successfully commit first."
\n "For this reason, it's important to note that transactions must be free from side-effects, such as I/O.")
diff --git a/stdlib/source/documentation/lux/control/concurrency/thread.lux b/stdlib/source/documentation/lux/control/concurrency/thread.lux
index 89e899081..e4ed65586 100644
--- a/stdlib/source/documentation/lux/control/concurrency/thread.lux
+++ b/stdlib/source/documentation/lux/control/concurrency/thread.lux
@@ -12,10 +12,10 @@
(.List $.Module)
($.module /._
""
- [($.documentation /.parallelism
+ [($.definition /.parallelism
"How many processes can run in parallel.")
- ($.documentation /.schedule!
+ ($.definition /.schedule!
"Executes an I/O procedure after some milli-seconds."
[(schedule! milli_seconds action)])]
[]))
diff --git a/stdlib/source/documentation/lux/control/continuation.lux b/stdlib/source/documentation/lux/control/continuation.lux
index ee926dc02..b17553b3d 100644
--- a/stdlib/source/documentation/lux/control/continuation.lux
+++ b/stdlib/source/documentation/lux/control/continuation.lux
@@ -19,18 +19,18 @@
($.default /.monad)
($.default /.portal)
- ($.documentation (/.Cont input output)
+ ($.definition (/.Cont input output)
"Continuations.")
- ($.documentation /.continued
+ ($.definition /.continued
"Continues a continuation thunk."
[(continued next cont)])
- ($.documentation /.result
+ ($.definition /.result
"Forces a continuation thunk to be evaluated."
[(result cont)])
- ($.documentation /.with_current
+ ($.definition /.with_current
"Call with current continuation."
[(with_current
(function (_ go)
@@ -40,7 +40,7 @@
_ (go [nexus init])]
(in (undefined)))))])
- ($.documentation /.pending
+ ($.definition /.pending
"Turns any expression into a function that is pending a continuation."
[(pending (some_function some_input))])]
[]))
diff --git a/stdlib/source/documentation/lux/control/exception.lux b/stdlib/source/documentation/lux/control/exception.lux
index 14db6b941..0fb02aafe 100644
--- a/stdlib/source/documentation/lux/control/exception.lux
+++ b/stdlib/source/documentation/lux/control/exception.lux
@@ -14,31 +14,31 @@
"Pure-Lux exception-handling functionality."
[($.default /.assertion)
- ($.documentation (/.Exception it)
+ ($.definition (/.Exception it)
"An exception provides a way to decorate error messages.")
- ($.documentation /.match?
+ ($.definition /.match?
"Is this exception the cause of the error message?"
[(match? exception error)])
- ($.documentation /.when
+ ($.definition /.when
(format "If a particular exception is detected on a possibly-erroneous value, handle it."
\n "If no exception was detected, or a different one from the one being checked, then pass along the original value.")
[(when exception then try)])
- ($.documentation /.otherwise
+ ($.definition /.otherwise
"If no handler could be found to catch the exception, then run a function as a last-resort measure."
[(otherwise else try)])
- ($.documentation /.error
+ ($.definition /.error
"Constructs an error message from an exception."
[(error exception message)])
- ($.documentation /.except
+ ($.definition /.except
"Decorate an error message with an Exception and lift it into the error-handling context."
[(except exception message)])
- ($.documentation /.exception
+ ($.definition /.exception
(format "Define a new exception type."
\n "It mostly just serves as a way to tag error messages for later catching.")
["Simple case:"
@@ -48,7 +48,7 @@
arguments Int])
optional_body)])
- ($.documentation /.report
+ ($.definition /.report
"An error report."
[(is Text
(report (list ["Row 0" value/0]
@@ -56,12 +56,12 @@
,,,
["Row N" value/N])))])
- ($.documentation /.listing
+ ($.definition /.listing
(format "A numbered report of the entries on a list."
\n "NOTE: 0-based numbering.")
[(listing format entries)])
- ($.documentation /.with
+ ($.definition /.with
"If a computation fails, prepends the exception to the error."
[(with exception message computation)])]
[]))
diff --git a/stdlib/source/documentation/lux/control/function.lux b/stdlib/source/documentation/lux/control/function.lux
index 1447b66d1..d7f1ba970 100644
--- a/stdlib/source/documentation/lux/control/function.lux
+++ b/stdlib/source/documentation/lux/control/function.lux
@@ -20,28 +20,28 @@
""
[($.default /.monoid)
- ($.documentation /.identity
+ ($.definition /.identity
(format "Identity function."
\n "Does nothing to its argument and just returns it.")
[(same? (identity value)
value)])
- ($.documentation /.composite
+ ($.definition /.composite
"Function composition."
[(= ((composite f g) "foo")
(f (g "foo")))])
- ($.documentation /.constant
+ ($.definition /.constant
"Create constant functions."
[(= ((constant "foo") "bar")
"foo")])
- ($.documentation /.flipped
+ ($.definition /.flipped
"Flips the order of the arguments of a function."
[(= ((flipped f) "foo" "bar")
(f "bar" "foo"))])
- ($.documentation /.on
+ ($.definition /.on
"Simple 1-argument function application."
[(on input function)])]
[/contract.documentation
diff --git a/stdlib/source/documentation/lux/control/function/contract.lux b/stdlib/source/documentation/lux/control/function/contract.lux
index 90494e7f0..4dd4990ef 100644
--- a/stdlib/source/documentation/lux/control/function/contract.lux
+++ b/stdlib/source/documentation/lux/control/function/contract.lux
@@ -15,14 +15,14 @@
[($.default /.pre_condition_failed)
($.default /.post_condition_failed)
- ($.documentation /.pre
+ ($.definition /.pre
(format "Pre-conditions."
\n "Given a test and an expression to run, only runs the expression if the test passes."
\n "Otherwise, an error is raised.")
[(pre (i.= +4 (i.+ +2 +2))
(foo +123 +456 +789))])
- ($.documentation /.post
+ ($.definition /.post
(format "Post-conditions."
\n "Given a predicate and an expression to run, evaluates the expression and then tests the output with the predicate."
\n "If the predicate returns #1, returns the value of the expression."
diff --git a/stdlib/source/documentation/lux/control/function/memo.lux b/stdlib/source/documentation/lux/control/function/memo.lux
index 9fd53f36e..caa98f2b1 100644
--- a/stdlib/source/documentation/lux/control/function/memo.lux
+++ b/stdlib/source/documentation/lux/control/function/memo.lux
@@ -15,16 +15,16 @@
[($.default /.memoization)
($.default (/.Memo input output))
- ($.documentation /.open
+ ($.definition /.open
"Memoization where the memoized results can be re-used accross invocations."
[(open memo)])
- ($.documentation /.closed
+ ($.definition /.closed
(format "Memoization confined to a single invocation to the function (not counting any subsequent recursive invocations)."
\n "Memoized results will be re-used during recursive invocations, but cannot be accessed after the main invocation has ended.")
[(closed hash memo)])
- ($.documentation /.none
+ ($.definition /.none
(format "No memoization at all."
\n "This is useful as a test control when measuring the effect of using memoization.")
[(none hash memo)])]
diff --git a/stdlib/source/documentation/lux/control/function/mixin.lux b/stdlib/source/documentation/lux/control/function/mixin.lux
index 7f5399ee0..4e0415fb3 100644
--- a/stdlib/source/documentation/lux/control/function/mixin.lux
+++ b/stdlib/source/documentation/lux/control/function/mixin.lux
@@ -14,36 +14,36 @@
""
[($.default /.monoid)
- ($.documentation (/.Mixin input output)
+ ($.definition (/.Mixin input output)
"A partially-defined function which can be mixed with others to inherit their behavior.")
- ($.documentation /.fixed
+ ($.definition /.fixed
"Given a mixin, produces a normal function."
[(fixed f)])
- ($.documentation /.nothing
+ ($.definition /.nothing
"A mixin that does nothing and just delegates work to the next mixin.")
- ($.documentation /.mixed
+ ($.definition /.mixed
"Produces a new mixin, where the behavior of the child can make use of the behavior of the parent."
[(mixed parent child)])
- ($.documentation /.advice
+ ($.definition /.advice
"Only apply then mixin when the input meets some criterion."
[(advice when then)])
- ($.documentation /.before
+ ($.definition /.before
"Executes an action before doing the main work."
[(before monad action)])
- ($.documentation /.after
+ ($.definition /.after
"Executes an action after doing the main work."
[(after monad action)])
- ($.documentation (/.Recursive input output)
+ ($.definition (/.Recursive input output)
"An indirectly recursive function.")
- ($.documentation /.of_recursive
+ ($.definition /.of_recursive
"Transform an indirectly recursive function into a mixin."
[(of_recursive recursive)])]
[]))
diff --git a/stdlib/source/documentation/lux/control/function/mutual.lux b/stdlib/source/documentation/lux/control/function/mutual.lux
index e8ea1d7e2..05c89af6c 100644
--- a/stdlib/source/documentation/lux/control/function/mutual.lux
+++ b/stdlib/source/documentation/lux/control/function/mutual.lux
@@ -12,7 +12,7 @@
(.List $.Module)
($.module /._
""
- [($.documentation /.let
+ [($.definition /.let
"Locally-defined mutually-recursive functions."
[(let [(even? number)
(-> Nat Bit)
@@ -28,7 +28,7 @@
(and (even? 4)
(odd? 5)))])
- ($.documentation /.def
+ ($.definition /.def
"Globally-defined mutually-recursive functions."
[(def
[.public (even? number)
diff --git a/stdlib/source/documentation/lux/control/function/predicate.lux b/stdlib/source/documentation/lux/control/function/predicate.lux
index e8507ce02..efc4bea44 100644
--- a/stdlib/source/documentation/lux/control/function/predicate.lux
+++ b/stdlib/source/documentation/lux/control/function/predicate.lux
@@ -16,27 +16,27 @@
($.default /.intersection)
($.default /.functor)
- ($.documentation (/.Predicate it)
+ ($.definition (/.Predicate it)
"A question that can be asked of a value, yield either false (#0) or true (#1).")
- ($.documentation /.none
+ ($.definition /.none
"A predicate that always fails.")
- ($.documentation /.or
+ ($.definition /.or
"A predicate that meets either predecessor.")
- ($.documentation /.all
+ ($.definition /.all
"A predicate that always succeeds.")
- ($.documentation /.and
+ ($.definition /.and
"A predicate that meets both predecessors.")
- ($.documentation /.complement
+ ($.definition /.complement
"The opposite of a predicate.")
- ($.documentation /.difference
+ ($.definition /.difference
"A predicate that meeds 'base', but not 'sub'.")
- ($.documentation /.rec
+ ($.definition /.rec
"Ties the knot for a recursive predicate.")]
[]))
diff --git a/stdlib/source/documentation/lux/control/io.lux b/stdlib/source/documentation/lux/control/io.lux
index ceb754ed1..2ee2d112d 100644
--- a/stdlib/source/documentation/lux/control/io.lux
+++ b/stdlib/source/documentation/lux/control/io.lux
@@ -16,16 +16,16 @@
($.default /.apply)
($.default /.monad)
- ($.documentation (/.IO it)
+ ($.definition (/.IO it)
"A type that represents synchronous, effectful computations that may interact with the outside world.")
- ($.documentation /.io
+ ($.definition /.io
(format "Delays the evaluation of an expression, by wrapping it in an IO 'thunk'."
\n "Great for wrapping effectful computations (which will not be performed until the IO is 'run!').")
[(io (exec
(log! msg)
"Some value..."))])
- ($.documentation /.run!
+ ($.definition /.run!
"A way to execute IO computations and perform their side-effects.")]
[]))
diff --git a/stdlib/source/documentation/lux/control/lazy.lux b/stdlib/source/documentation/lux/control/lazy.lux
index df45b6cd5..aadba8ec1 100644
--- a/stdlib/source/documentation/lux/control/lazy.lux
+++ b/stdlib/source/documentation/lux/control/lazy.lux
@@ -18,11 +18,11 @@
($.default /.apply)
($.default /.monad)
- ($.documentation (/.Lazy it)
+ ($.definition (/.Lazy it)
(format "A value specified by an expression that is calculated only at the last moment possible."
\n "Afterwards, the value is cached for future reference."))
- ($.documentation /.lazy
+ ($.definition /.lazy
"Specifies a lazy value by providing the expression that computes it."
[(lazy eager_computation)])]
[]))
diff --git a/stdlib/source/documentation/lux/control/maybe.lux b/stdlib/source/documentation/lux/control/maybe.lux
index 2157e92ba..73e3affb1 100644
--- a/stdlib/source/documentation/lux/control/maybe.lux
+++ b/stdlib/source/documentation/lux/control/maybe.lux
@@ -21,11 +21,11 @@
($.default /.with)
($.default /.list)
- ($.documentation /.lifted
+ ($.definition /.lifted
"Wraps a monadic value with Maybe machinery."
[(lifted monad)])
- ($.documentation /.else
+ ($.definition /.else
(format "Allows you to provide a default value that will be used"
\n "if a (Maybe x) value turns out to be .#None."
\n "Note: the expression for the default value will not be computed if the base computation succeeds.")
@@ -36,13 +36,13 @@
"=>"
+20])
- ($.documentation /.trusted
+ ($.definition /.trusted
(format "Assumes that a Maybe value is a .#Some and yields its value."
\n "Raises/throws a runtime error otherwise."
\n "WARNING: Use with caution.")
[(trusted trusted_computation)])
- ($.documentation /.when
+ ($.definition /.when
"Can be used as a guard in (co)monadic be/do expressions."
[(do monad
[value (do_something 1 2 3)
diff --git a/stdlib/source/documentation/lux/control/parser.lux b/stdlib/source/documentation/lux/control/parser.lux
index 4d2389f71..b235625ce 100644
--- a/stdlib/source/documentation/lux/control/parser.lux
+++ b/stdlib/source/documentation/lux/control/parser.lux
@@ -16,112 +16,112 @@
($.default /.apply)
($.default /.monad)
- ($.documentation (/.Parser state it)
+ ($.definition (/.Parser state it)
"A generic parser.")
- ($.documentation /.assertion
+ ($.definition /.assertion
"Fails with the given message if the test is #0."
[(assertion message test)])
- ($.documentation /.maybe
+ ($.definition /.maybe
"Optionality combinator."
[(maybe parser)])
- ($.documentation /.result
+ ($.definition /.result
(format "Executes the parser on the input."
\n "Does not verify that all of the input has been consumed by the parser."
\n "Returns both the parser's output, and a value that represents the remaining input.")
[(result parser input)])
- ($.documentation /.and
+ ($.definition /.and
"Sequencing combinator."
[(and first second)])
- ($.documentation /.or
+ ($.definition /.or
"Heterogeneous alternative combinator."
[(or left right)])
- ($.documentation /.either
+ ($.definition /.either
"Homogeneous alternative combinator."
[(either this that)])
- ($.documentation /.some
+ ($.definition /.some
"0-or-more combinator."
[(some parser)])
- ($.documentation /.many
+ ($.definition /.many
"1-or-more combinator."
[(many parser)])
- ($.documentation /.exactly
+ ($.definition /.exactly
"Parse exactly N times."
[(exactly amount parser)])
- ($.documentation /.at_least
+ ($.definition /.at_least
"Parse at least N times."
[(at_least amount parser)])
- ($.documentation /.at_most
+ ($.definition /.at_most
"Parse at most N times."
[(at_most amount parser)])
- ($.documentation /.between
+ ($.definition /.between
""
[(between minimum additional parser)])
- ($.documentation /.separated_by
+ ($.definition /.separated_by
"Parses instances of 'parser' that are separated by instances of 'separator'."
[(separated_by separator parser)])
- ($.documentation /.not
+ ($.definition /.not
"Only succeeds when the underlying parser fails."
[(not parser)])
- ($.documentation /.failure
+ ($.definition /.failure
"Always fail with this 'message'."
[(failure message)])
- ($.documentation /.lifted
+ ($.definition /.lifted
"Lift a potentially failed computation into a parser."
[(lifted operation)])
- ($.documentation /.else
+ ($.definition /.else
"If the given parser fails, returns the default value."
[(else value parser)])
- ($.documentation /.remaining
+ ($.definition /.remaining
"Yield the remaining input (without consuming it).")
- ($.documentation /.rec
+ ($.definition /.rec
"Combinator for recursive parsers."
[(rec parser)])
- ($.documentation /.after
+ ($.definition /.after
"Run the parser after another one (whose output is ignored)."
[(after param subject)])
- ($.documentation /.before
+ ($.definition /.before
"Run the parser before another one (whose output is ignored)."
[(before param subject)])
- ($.documentation /.only
+ ($.definition /.only
"Only succeed when the parser's output passes a test."
[(only test parser)])
- ($.documentation /.parses?
+ ($.definition /.parses?
"Ignore a parser's output and just verify that it succeeds."
[(parses? parser)])
- ($.documentation /.parses
+ ($.definition /.parses
"Ignore a parser's output and just execute it."
[(parses parser)])
- ($.documentation /.speculative
+ ($.definition /.speculative
(format "Executes a parser, without actually consuming the input."
\n "That way, the same input can be consumed again by another parser.")
[(speculative parser)])
- ($.documentation /.codec
+ ($.definition /.codec
"Decode the output of a parser using a codec."
[(codec codec parser)])]
[]))
diff --git a/stdlib/source/documentation/lux/control/pipe.lux b/stdlib/source/documentation/lux/control/pipe.lux
index 0f2fd01ce..71d9faea5 100644
--- a/stdlib/source/documentation/lux/control/pipe.lux
+++ b/stdlib/source/documentation/lux/control/pipe.lux
@@ -12,7 +12,7 @@
(.List $.Module)
($.module /._
"Composable extensions to the piping macros (|> and <|) that enhance them with various abilities."
- [($.documentation /.new
+ [($.definition /.new
"Ignores the piped argument, and begins a new pipe."
[(n.= 1
(|> 20
@@ -20,13 +20,13 @@
(n.+ 4)
(new 0 [++])))])
- ($.documentation /.let
+ ($.definition /.let
"Gives a name to the piped-argument, within the given expression."
[(n.= 10
(|> 5
(let x (n.+ x x))))])
- ($.documentation /.cond
+ ($.definition /.cond
(format "Branching for pipes."
\n "Both the tests and the bodies are piped-code, and must be given inside a tuple.")
[(|> +5
@@ -34,7 +34,7 @@
[i.odd?] [(i.* +3)]
[(new -1 [])]))])
- ($.documentation /.if
+ ($.definition /.if
"If-branching."
[(same? (if (n.even? sample)
"even"
@@ -44,7 +44,7 @@
[(new "even" [])]
[(new "odd" [])])))])
- ($.documentation /.when
+ ($.definition /.when
"Only execute the body when the test passes."
[(same? (if (n.even? sample)
(n.* 2 sample)
@@ -53,14 +53,14 @@
(when [n.even?]
[(n.* 2)])))])
- ($.documentation /.while
+ ($.definition /.while
(format "While loops for pipes."
\n "Both the testing and calculating steps are pipes and must be given inside tuples.")
[(|> +1
(while [(i.< +10)]
[++]))])
- ($.documentation /.do
+ ($.definition /.do
(format "Monadic pipes."
\n "Each steps in the monadic computation is a pipe and must be given inside a tuple.")
[(|> +5
@@ -69,14 +69,14 @@
[(i.+ +4)]
[++]))])
- ($.documentation /.exec
+ ($.definition /.exec
(format "Non-updating pipes."
\n "Will generate piped computations, but their results will not be used in the larger scope.")
[(|> +5
(exec [.nat %n log!])
(i.* +10))])
- ($.documentation /.tuple
+ ($.definition /.tuple
(format "Parallel branching for pipes."
\n "Allows to run multiple pipelines for a value and gives you a tuple of the outputs.")
[(|> +5
@@ -86,7 +86,7 @@
"=>"
[+50 +2 "+5"]])
- ($.documentation /.case
+ ($.definition /.case
(format "Pattern-matching for pipes."
\n "The bodies of each branch are NOT pipes; just regular values.")
[(|> +5
diff --git a/stdlib/source/documentation/lux/control/reader.lux b/stdlib/source/documentation/lux/control/reader.lux
index eaac93dc5..94b74cbe7 100644
--- a/stdlib/source/documentation/lux/control/reader.lux
+++ b/stdlib/source/documentation/lux/control/reader.lux
@@ -16,24 +16,24 @@
($.default /.apply)
($.default /.monad)
- ($.documentation (/.Reader environment it)
+ ($.definition (/.Reader environment it)
"Computations that have access to some environmental value.")
- ($.documentation /.read
+ ($.definition /.read
"Get the environment.")
- ($.documentation /.local
+ ($.definition /.local
"Run computation with a locally-modified environment."
[(local change proc)])
- ($.documentation /.result
+ ($.definition /.result
"Executes the reader against the given environment."
[(result env proc)])
- ($.documentation /.with
+ ($.definition /.with
"Monad transformer for Reader."
[(with monad)])
- ($.documentation /.lifted
+ ($.definition /.lifted
"Lift monadic values to the Reader wrapper.")]
[]))
diff --git a/stdlib/source/documentation/lux/control/region.lux b/stdlib/source/documentation/lux/control/region.lux
index 5432ab07f..55d903d6c 100644
--- a/stdlib/source/documentation/lux/control/region.lux
+++ b/stdlib/source/documentation/lux/control/region.lux
@@ -17,27 +17,27 @@
($.default /.apply)
($.default /.monad)
- ($.documentation (/.Region r ! it)
+ ($.definition (/.Region r ! it)
(format "A region where resources may be be claimed and where a side-effecting computation may be performed."
\n "Every resource is paired with a function that knows how to clean/reclaim it, to make sure there are no leaks."))
- ($.documentation /.run!
+ ($.definition /.run!
"Executes a region-based computation, with a side-effect determined by the monad."
[(run! monad computation)])
- ($.documentation /.acquire!
+ ($.definition /.acquire!
"Acquire a resource while pairing it a function that knows how to reclaim it."
[(acquire! monad cleaner value)])
- ($.documentation /.failure
+ ($.definition /.failure
"Immediately fail with this 'message'."
[(failure monad error)])
- ($.documentation /.except
+ ($.definition /.except
"Fail by throwing/raising an exception."
[(except monad exception message)])
- ($.documentation /.lifted
+ ($.definition /.lifted
"Lift an effectful computation into a region-based computation."
[(lifted monad operation)])]
[]))
diff --git a/stdlib/source/documentation/lux/control/remember.lux b/stdlib/source/documentation/lux/control/remember.lux
index 5c6b1bc2a..9e8b08350 100644
--- a/stdlib/source/documentation/lux/control/remember.lux
+++ b/stdlib/source/documentation/lux/control/remember.lux
@@ -14,7 +14,7 @@
""
[($.default /.must_remember)
- ($.documentation /.remember
+ ($.definition /.remember
(format "A message with an expiration date."
\n "Can have an optional piece of code to focus on.")
[(remember "2022-04-01"
@@ -23,7 +23,7 @@
"Improve the performace."
(some (complicated (computation 123))))])
- ($.documentation /.to_do
+ ($.definition /.to_do
(format "A TODO message with an expiration date."
\n "Can have an optional piece of code to focus on.")
[(to_do "2022-04-01"
@@ -32,7 +32,7 @@
"Improve the performace."
(some (complicated (computation 123))))])
- ($.documentation /.fix_me
+ ($.definition /.fix_me
(format "A FIXME message with an expiration date."
\n "Can have an optional piece of code to focus on.")
[(fix_me "2022-04-01"
diff --git a/stdlib/source/documentation/lux/control/security/capability.lux b/stdlib/source/documentation/lux/control/security/capability.lux
index de8b33889..8d9c7f2ad 100644
--- a/stdlib/source/documentation/lux/control/security/capability.lux
+++ b/stdlib/source/documentation/lux/control/security/capability.lux
@@ -12,15 +12,15 @@
(.List $.Module)
($.module /._
""
- [($.documentation (/.Capability brand input output)
+ [($.definition (/.Capability brand input output)
(format "Represents the capability to perform an operation."
\n "This operation is assumed to have security implications."))
- ($.documentation /.use
+ ($.definition /.use
"Applies a capability against its required input."
[(use capability input)])
- ($.documentation /.capability:
+ ($.definition /.capability:
"Defines a capability as a unique type, and a constructor for instances."
[(capability: (Can_Duplicate a)
(can_duplicate a [a a]))
@@ -31,7 +31,7 @@
[left right] (..use capability 123)]
(same? left right))])
- ($.documentation /.async
+ ($.definition /.async
"Converts a synchronous I/O-based capability into an asynchronous capability."
[(async capability)])]
[]))
diff --git a/stdlib/source/documentation/lux/control/security/policy.lux b/stdlib/source/documentation/lux/control/security/policy.lux
index 07d0ebc8d..a93dcecf3 100644
--- a/stdlib/source/documentation/lux/control/security/policy.lux
+++ b/stdlib/source/documentation/lux/control/security/policy.lux
@@ -22,29 +22,29 @@
($.default /.Can_Trust)
($.default /.Can_Distrust)
- ($.documentation (/.Policy brand value %)
+ ($.definition (/.Policy brand value %)
"A security policy encoded as the means to 'upgrade' or 'downgrade' in a secure context.")
- ($.documentation (/.Can_Upgrade brand % value)
+ ($.definition (/.Can_Upgrade brand % value)
"Represents the capacity to 'upgrade' a value.")
- ($.documentation (/.Can_Downgrade brand % value)
+ ($.definition (/.Can_Downgrade brand % value)
"Represents the capacity to 'downgrade' a value.")
- ($.documentation (/.Privilege brand %)
+ ($.definition (/.Privilege brand %)
"Represents the privilege to both 'upgrade' and 'downgrade' a value.")
- ($.documentation (/.Delegation brand %from %to)
+ ($.definition (/.Delegation brand %from %to)
"Represents the act of delegating policy capacities.")
- ($.documentation /.delegation
+ ($.definition /.delegation
"Delegating policy capacities."
[(delegation downgrade upgrade)])
- ($.documentation (/.Context brand scope %)
+ ($.definition (/.Context brand scope %)
"A computational context with an associated policy privilege.")
- ($.documentation /.with_policy
+ ($.definition /.with_policy
"Activates a security context with the priviledge to enforce it's policy."
[(type Password
(Private Text))
@@ -68,11 +68,11 @@
(%::can_downgrade password)))))))]
[(with_policy context)])
- ($.documentation /.Privacy
+ ($.definition /.Privacy
(format "A security context for privacy."
\n "Private data is data which cannot be allowed to leak outside of the programmed."))
- ($.documentation /.Safety
+ ($.definition /.Safety
(format "A security context for safety."
\n "Safe data is data coming from outside the program which can be trusted to be properly formatted and lacking injections."))]
[]))
diff --git a/stdlib/source/documentation/lux/control/state.lux b/stdlib/source/documentation/lux/control/state.lux
index 9f975818e..69059d064 100644
--- a/stdlib/source/documentation/lux/control/state.lux
+++ b/stdlib/source/documentation/lux/control/state.lux
@@ -16,52 +16,52 @@
($.default /.apply)
($.default /.monad)
- ($.documentation (/.State state it)
+ ($.definition (/.State state it)
"Stateful computations.")
- ($.documentation /.get
+ ($.definition /.get
"Read the current state.")
- ($.documentation /.put
+ ($.definition /.put
"Set the new state."
[(put new_state)])
- ($.documentation /.update
+ ($.definition /.update
"Compute the new state."
[(update change)])
- ($.documentation /.use
+ ($.definition /.use
"Run a function on the current state."
[(use user)])
- ($.documentation /.local
+ ($.definition /.local
"Run the computation with a locally-modified state."
[(local change action)])
- ($.documentation /.result
+ ($.definition /.result
"Run a stateful computation."
[(result state action)])
- ($.documentation /.while
+ ($.definition /.while
"A stateful while loop."
[(while condition body)])
- ($.documentation /.do_while
+ ($.definition /.do_while
"A stateful do-while loop."
[(do_while condition body)])
- ($.documentation /.+State
+ ($.definition /.+State
"Stateful computations decorated by a monad.")
- ($.documentation /.result'
+ ($.definition /.result'
"Execute a stateful computation decorated by a monad."
[(result' state action)])
- ($.documentation /.with
+ ($.definition /.with
"A monad transformer to create composite stateful computations."
[(with monad)])
- ($.documentation /.lifted
+ ($.definition /.lifted
"Lift monadic values to the +State wrapper."
[(lifted monad ma)])]
[]))
diff --git a/stdlib/source/documentation/lux/control/thread.lux b/stdlib/source/documentation/lux/control/thread.lux
index 85945fb00..1b6c9431e 100644
--- a/stdlib/source/documentation/lux/control/thread.lux
+++ b/stdlib/source/documentation/lux/control/thread.lux
@@ -16,32 +16,32 @@
($.default /.apply)
($.default /.monad)
- ($.documentation (/.Thread ! it)
+ ($.definition (/.Thread ! it)
"An imperative process with access to mutable values.")
- ($.documentation (/.Box ! it)
+ ($.definition (/.Box ! it)
"A mutable box holding a value.")
- ($.documentation /.box
+ ($.definition /.box
"A brand-new box initialized to the given value."
[(box init)])
- ($.documentation /.read!
+ ($.definition /.read!
"Reads the current value in the box."
[(read! box)])
- ($.documentation /.write!
+ ($.definition /.write!
"Mutates the value in the box."
[(write! value box)])
- ($.documentation /.result
+ ($.definition /.result
"Executes the imperative thread in a self-contained way."
[(result thread)])
- ($.documentation /.io
+ ($.definition /.io
"Transforms the imperative thread into an I/O computation.")
- ($.documentation /.update!
+ ($.definition /.update!
"Update a box's value by applying a function to it."
[(update! f box)])]
[]))
diff --git a/stdlib/source/documentation/lux/control/try.lux b/stdlib/source/documentation/lux/control/try.lux
index 9ff894fa0..8cc030b09 100644
--- a/stdlib/source/documentation/lux/control/try.lux
+++ b/stdlib/source/documentation/lux/control/try.lux
@@ -17,32 +17,32 @@
($.default /.monad)
($.default /.equivalence)
- ($.documentation (/.Try it)
+ ($.definition (/.Try it)
"A computation that can fail with an error message.")
- ($.documentation /.with
+ ($.definition /.with
"Enhances a monad with error-handling functionality."
[(with monad)])
- ($.documentation /.lifted
+ ($.definition /.lifted
"Wraps a monadic value with error-handling machinery."
[(lifted monad)])
- ($.documentation /.trusted
+ ($.definition /.trusted
(format "Assumes a Try value succeeded, and yields its value."
\n "If it didn't, raises the error as a runtime error."
\n "WARNING: Use with caution.")
[(trusted try)])
- ($.documentation /.maybe
+ ($.definition /.maybe
""
[(maybe try)])
- ($.documentation /.of_maybe
+ ($.definition /.of_maybe
""
[(of_maybe maybe)])
- ($.documentation /.else
+ ($.definition /.else
(format "Allows you to provide a default value that will be used"
\n "if a (Try x) value turns out to be #Failure."
\n "Note: the expression for the default value will not be computed if the base computation succeeds.")
diff --git a/stdlib/source/documentation/lux/control/writer.lux b/stdlib/source/documentation/lux/control/writer.lux
index 58650b8f0..e74e6b47d 100644
--- a/stdlib/source/documentation/lux/control/writer.lux
+++ b/stdlib/source/documentation/lux/control/writer.lux
@@ -16,18 +16,18 @@
($.default /.apply)
($.default /.monad)
- ($.documentation (/.Writer log value)
+ ($.definition (/.Writer log value)
"Represents a value with an associated 'log' to record arbitrary information.")
- ($.documentation /.write
+ ($.definition /.write
"Write a value to the log."
[(write message)])
- ($.documentation /.with
+ ($.definition /.with
"Enhances a monad with Writer functionality."
[(with monoid monad)])
- ($.documentation /.lifted
+ ($.definition /.lifted
"Wraps a monadic value with Writer machinery."
[(lifted monoid monad)])]
[]))
diff --git a/stdlib/source/documentation/lux/data/binary.lux b/stdlib/source/documentation/lux/data/binary.lux
index 09f2b8b87..879785079 100644
--- a/stdlib/source/documentation/lux/data/binary.lux
+++ b/stdlib/source/documentation/lux/data/binary.lux
@@ -39,40 +39,40 @@
($.default \\parser.location)
($.default \\parser.code)
- ($.documentation \\parser.Offset
+ ($.definition \\parser.Offset
"An offset for reading within binary data.")
- ($.documentation (\\parser.Parser it)
+ ($.definition (\\parser.Parser it)
"A parser for raw binary data.")
- ($.documentation \\parser.result
+ ($.definition \\parser.result
"Runs a parser and checks that all the binary data was read by it."
[(result parser input)])
- ($.documentation \\parser.end?
+ ($.definition \\parser.end?
"Checks whether there is no more data to read.")
- ($.documentation \\parser.offset
+ ($.definition \\parser.offset
"The current offset (i.e. how much data has been read).")
- ($.documentation \\parser.remaining
+ ($.definition \\parser.remaining
"How much of the data remains to be read.")
- ($.documentation \\parser.Size
+ ($.definition \\parser.Size
"The size of a chunk of data within a binary array.")
- ($.documentation \\parser.rec
+ ($.definition \\parser.rec
"Tie the knot for a recursive parser.")
- ($.documentation \\parser.any
+ ($.definition \\parser.any
"Does no parsing, and just returns a dummy value.")
- ($.documentation \\parser.segment
+ ($.definition \\parser.segment
"Parses a chunk of data of a given size."
[(segment size)])
(,, (with_template [<size> <name>]
- [($.documentation <name>
+ [($.definition <name>
(format "Parses a block of data prefixed with a size that is " (%.nat <size>) " bytes long."))]
[08 \\parser.binary_8]
@@ -82,7 +82,7 @@
))
(,, (with_template [<size> <name>]
- [($.documentation <name>
+ [($.definition <name>
(format "Parses a block of (UTF-8 encoded) text prefixed with a size that is " (%.nat <size>) " bytes long."))]
[08 \\parser.utf8_8]
@@ -92,7 +92,7 @@
))
(,, (with_template [<size> <name>]
- [($.documentation <name>
+ [($.definition <name>
(format "Parses a sequence of values prefixed with a size that is " (%.nat <size>) " bytes long."))]
[08 \\parser.sequence_8]
@@ -101,11 +101,11 @@
[64 \\parser.sequence_64]
))
- ($.documentation \\parser.list
+ ($.definition \\parser.list
"Parses an arbitrarily long list of values."
[(list value)])
- ($.documentation \\parser.set
+ ($.definition \\parser.set
""
[(set hash value)])]
[])))
@@ -146,38 +146,38 @@
($.default \\format.location)
($.default \\format.code)
- ($.documentation \\format.Mutation
+ ($.definition \\format.Mutation
"A mutation of binary data, tracking where in the data to transform.")
- ($.documentation \\format.Specification
+ ($.definition \\format.Specification
"A description of how to transform binary data.")
- ($.documentation \\format.no_op
+ ($.definition \\format.no_op
"A specification for empty binary data.")
- ($.documentation \\format.instance
+ ($.definition \\format.instance
"Given a specification of how to construct binary data, yields a binary blob that matches it.")
- ($.documentation (\\format.Format it)
+ ($.definition (\\format.Format it)
"An operation that knows how to write information into a binary blob.")
- ($.documentation \\format.result
+ ($.definition \\format.result
"Yields a binary blob with all the information written to it."
[(result format value)])
- ($.documentation \\format.or
+ ($.definition \\format.or
""
[(or left right)])
- ($.documentation \\format.and
+ ($.definition \\format.and
""
[(and pre post)])
- ($.documentation \\format.rec
+ ($.definition \\format.rec
"A combinator for recursive formats."
[(rec body)])
- ($.documentation \\format.segment
+ ($.definition \\format.segment
"Writes at most 'size' bytes of an input binary blob."
[(segment size)])]
[]))
@@ -192,58 +192,58 @@
($.default /.equivalence)
($.default /.monoid)
- ($.documentation /.Binary
+ ($.definition /.Binary
"A binary BLOB of data.")
- ($.documentation /.empty
+ ($.definition /.empty
"A fresh/empty binary BLOB of the specified size."
[(empty size)])
- ($.documentation /.mix
+ ($.definition /.mix
""
[(mix f init binary)])
- ($.documentation /.bits_8
+ ($.definition /.bits_8
"Read 1 byte (8 bits) at the given index."
[(bits_8 index binary)])
- ($.documentation /.bits_16
+ ($.definition /.bits_16
"Read 2 bytes (16 bits) at the given index."
[(bits_16 index binary)])
- ($.documentation /.bits_32
+ ($.definition /.bits_32
"Read 4 bytes (32 bits) at the given index."
[(bits_32 index binary)])
- ($.documentation /.bits_64
+ ($.definition /.bits_64
"Read 8 bytes (64 bits) at the given index."
[(bits_64 index binary)])
- ($.documentation /.has_8!
+ ($.definition /.has_8!
"Write 1 byte (8 bits) at the given index."
[(has_8! index value binary)])
- ($.documentation /.has_16!
+ ($.definition /.has_16!
"Write 2 bytes (16 bits) at the given index."
[(has_16! index value binary)])
- ($.documentation /.has_32!
+ ($.definition /.has_32!
"Write 4 bytes (32 bits) at the given index."
[(has_32! index value binary)])
- ($.documentation /.has_64!
+ ($.definition /.has_64!
"Write 8 bytes (64 bits) at the given index."
[(has_64! index value binary)])
- ($.documentation /.copy!
+ ($.definition /.copy!
"Mutates the target binary BLOB by copying bytes from the source BLOB to it."
[(copy! bytes source_offset source target_offset target)])
- ($.documentation /.slice
+ ($.definition /.slice
"Yields a subset of the binary BLOB, so long as the specified range is valid."
[(slice offset length binary)])
- ($.documentation /.after
+ ($.definition /.after
"Yields a binary BLOB with at most the specified number of bytes removed."
[(after bytes binary)])]
[..\\format
diff --git a/stdlib/source/documentation/lux/data/bit.lux b/stdlib/source/documentation/lux/data/bit.lux
index 25b1262d2..a3c641987 100644
--- a/stdlib/source/documentation/lux/data/bit.lux
+++ b/stdlib/source/documentation/lux/data/bit.lux
@@ -22,7 +22,7 @@
($.default /.conjunction)
($.default /.codec)
- ($.documentation /.complement
+ ($.definition /.complement
(format "Generates the complement of a predicate."
\n "That is a predicate that returns the oposite of the original predicate."))]
[]))
diff --git a/stdlib/source/documentation/lux/data/collection/array.lux b/stdlib/source/documentation/lux/data/collection/array.lux
index c4ce92a7a..3517b2eeb 100644
--- a/stdlib/source/documentation/lux/data/collection/array.lux
+++ b/stdlib/source/documentation/lux/data/collection/array.lux
@@ -22,75 +22,75 @@
($.default /.every?)
($.default /.any?)
- ($.documentation (/.Array it)
+ ($.definition (/.Array it)
"Mutable arrays.")
- ($.documentation /.empty
+ ($.definition /.empty
"An empty array of the specified size."
[(empty size)])
- ($.documentation /.size
+ ($.definition /.size
""
[(size array)])
- ($.documentation /.item
+ ($.definition /.item
""
[(item index array)])
- ($.documentation /.has!
+ ($.definition /.has!
"Mutate the array by writing a value to the specified index."
[(has! index value array)])
- ($.documentation /.lacks!
+ ($.definition /.lacks!
"Mutate the array by deleting the value at the specified index."
[(lacks! index array)])
- ($.documentation /.has?
+ ($.definition /.has?
""
[(has? index array)])
- ($.documentation /.revised!
+ ($.definition /.revised!
"Mutate the array by updating the value at the specified index."
[(revised! index transform array)])
- ($.documentation /.upsert!
+ ($.definition /.upsert!
(format "Mutate the array by updating the value at the specified index."
\n "If there is no value, update and write the default value given.")
[(upsert! index default transform array)])
- ($.documentation /.copy!
+ ($.definition /.copy!
"Writes the contents of one array into the other."
[(copy! length src_start src_array dest_start dest_array)])
- ($.documentation /.occupancy
+ ($.definition /.occupancy
"Finds out how many cells in an array are occupied."
[(occupancy array)])
- ($.documentation /.vacancy
+ ($.definition /.vacancy
"Finds out how many cells in an array are vacant."
[(vacancy array)])
- ($.documentation /.only!
+ ($.definition /.only!
"Delete every item of the array that fails to satisfy the predicate."
[(only! p xs)])
- ($.documentation /.example
+ ($.definition /.example
"Yields the first item in the array that satisfies the predicate."
[(example p xs)])
- ($.documentation /.example'
+ ($.definition /.example'
"Just like 'example', but with access to the index of each value."
[(example' p xs)])
- ($.documentation /.clone
+ ($.definition /.clone
"Yields a shallow clone of the array."
[(clone xs)])
- ($.documentation /.of_list
+ ($.definition /.of_list
""
[(of_list xs)])
- ($.documentation /.list
+ ($.definition /.list
(format "Yields a list with every non-empty item in the array."
\n "Can use the optional default value when encountering an empty cell in the array.")
[(list {.#None} array)
diff --git a/stdlib/source/documentation/lux/data/collection/bits.lux b/stdlib/source/documentation/lux/data/collection/bits.lux
index 522f7eccd..648541759 100644
--- a/stdlib/source/documentation/lux/data/collection/bits.lux
+++ b/stdlib/source/documentation/lux/data/collection/bits.lux
@@ -21,26 +21,26 @@
($.default /.or)
($.default /.xor)
- ($.documentation /.Bits
+ ($.definition /.Bits
"A bit-map.")
- ($.documentation /.size
+ ($.definition /.size
"Measures the size of a bit-map by counting all the 1s in the bit-map."
[(size bits)])
- ($.documentation /.capacity
+ ($.definition /.capacity
""
[(capacity bits)])
- ($.documentation /.bit
+ ($.definition /.bit
""
[(bit index bits)])
- ($.documentation /.intersects?
+ ($.definition /.intersects?
""
[(intersects? reference sample)])
- ($.documentation /.not
+ ($.definition /.not
""
[(not input)])]
[]))
diff --git a/stdlib/source/documentation/lux/data/collection/dictionary.lux b/stdlib/source/documentation/lux/data/collection/dictionary.lux
index 99f6342b4..6cc473b7f 100644
--- a/stdlib/source/documentation/lux/data/collection/dictionary.lux
+++ b/stdlib/source/documentation/lux/data/collection/dictionary.lux
@@ -24,61 +24,61 @@
($.default /.equivalence)
($.default /.functor)
- ($.documentation (/.Dictionary key value)
+ ($.definition (/.Dictionary key value)
"A dictionary implemented as a Hash-Array Mapped Trie (HAMT).")
- ($.documentation /.empty
+ ($.definition /.empty
"An empty dictionary."
[(empty key_hash)])
- ($.documentation /.has
+ ($.definition /.has
""
[(has key val dict)])
- ($.documentation /.lacks
+ ($.definition /.lacks
""
[(lacks key dict)])
- ($.documentation /.value
+ ($.definition /.value
""
[(value key dict)])
- ($.documentation /.key?
+ ($.definition /.key?
""
[(key? dict key)])
- ($.documentation /.has'
+ ($.definition /.has'
"Only puts the KV-pair if the key is not already present."
[(has' key val dict)])
- ($.documentation /.revised
+ ($.definition /.revised
"Transforms the value located at key (if available), using the given function."
[(revised key f dict)])
- ($.documentation /.revised'
+ ($.definition /.revised'
(format "Updates the value at the key; if it exists."
\n "Otherwise, puts a value by applying the function to a default.")
[(revised' key default f dict)])
- ($.documentation /.of_list
+ ($.definition /.of_list
""
[(of_list key_hash kvs)])
- ($.documentation /.composite
+ ($.definition /.composite
(format "Merges 2 dictionaries."
\n "If any collisions with keys occur, the values of dict2 will overwrite those of dict1.")
[(composite dict2 dict1)])
- ($.documentation /.composite_with
+ ($.definition /.composite_with
(format "Merges 2 dictionaries."
\n "If any collisions with keys occur, a new value will be computed by applying 'f' to the values of dict2 and dict1.")
[(composite_with f dict2 dict1)])
- ($.documentation /.re_bound
+ ($.definition /.re_bound
"If there is a value under 'from_key', remove 'from_key' and store the value under 'to_key'."
[(re_bound from_key to_key dict)])
- ($.documentation /.sub
+ ($.definition /.sub
"A sub-dictionary, with only the specified keys."
[(sub keys dict)])]
[/ordered.documentation]))
diff --git a/stdlib/source/documentation/lux/data/collection/dictionary/ordered.lux b/stdlib/source/documentation/lux/data/collection/dictionary/ordered.lux
index 64f18f260..232e3bcdf 100644
--- a/stdlib/source/documentation/lux/data/collection/dictionary/ordered.lux
+++ b/stdlib/source/documentation/lux/data/collection/dictionary/ordered.lux
@@ -21,46 +21,46 @@
($.default /.values)
($.default /.equivalence)
- ($.documentation (/.Dictionary key value)
+ ($.definition (/.Dictionary key value)
"A dictionary data-structure with ordered entries.")
- ($.documentation /.empty
+ ($.definition /.empty
"An empty dictionary, employing the given order."
[(empty order)])
- ($.documentation /.value
+ ($.definition /.value
""
[(value key dict)])
- ($.documentation /.key?
+ ($.definition /.key?
""
[(key? dict key)])
(,, (with_template [<name>]
- [(`` ($.documentation <name>
+ [(`` ($.definition <name>
(format "Yields value under the " (,, (template.text [<name>])) "imum key.")))]
[/.min]
[/.max]
))
- ($.documentation /.size
+ ($.definition /.size
""
[(size dict)])
- ($.documentation /.has
+ ($.definition /.has
""
[(has key value dict)])
- ($.documentation /.lacks
+ ($.definition /.lacks
""
[(lacks key dict)])
- ($.documentation /.revised
+ ($.definition /.revised
""
[(revised key transform dict)])
- ($.documentation /.of_list
+ ($.definition /.of_list
""
[(of_list order list)])]
[])))
diff --git a/stdlib/source/documentation/lux/data/collection/list.lux b/stdlib/source/documentation/lux/data/collection/list.lux
index 60c60b480..0e413e1d7 100644
--- a/stdlib/source/documentation/lux/data/collection/list.lux
+++ b/stdlib/source/documentation/lux/data/collection/list.lux
@@ -32,133 +32,133 @@
($.default /.every?)
($.default /.any?)
- ($.documentation /.mixes
+ ($.definition /.mixes
""
[(mixes f init inputs)])
- ($.documentation /.reversed
+ ($.definition /.reversed
""
[(reversed xs)])
- ($.documentation /.only
+ ($.definition /.only
"A list with only values that satisfy the predicate."
[(only keep? xs)])
- ($.documentation /.partition
+ ($.definition /.partition
"Divide the list into all elements that satisfy a predicate, and all elements that do not."
[(partition satisfies? list)])
- ($.documentation /.pairs
+ ($.definition /.pairs
"Cut the list into pairs of 2."
[(pairs list)])
- ($.documentation /.split_at
+ ($.definition /.split_at
""
[(split_at n xs)])
- ($.documentation /.split_when
+ ($.definition /.split_when
"Segment the list by using a predicate to tell when to cut."
[(split_when predicate xs)])
- ($.documentation /.sub
+ ($.definition /.sub
"Segment the list into sub-lists of (at most) the given size."
[(sub size list)])
- ($.documentation /.repeated
+ ($.definition /.repeated
"A list of the value x, repeated n times."
[(repeated n x)])
- ($.documentation /.iterations
+ ($.definition /.iterations
"Generates a list element by element until the function returns .#None."
[(iterations f x)])
- ($.documentation /.one
+ ($.definition /.one
""
[(one check xs)])
- ($.documentation /.all
+ ($.definition /.all
""
[(all check xs)])
- ($.documentation /.example
+ ($.definition /.example
"Yields the first value in the list that satisfies the predicate."
[(example predicate xs)])
- ($.documentation /.interposed
+ ($.definition /.interposed
"Puts a value between every two elements in the list."
[(interposed sep xs)])
- ($.documentation /.size
+ ($.definition /.size
""
[(size list)])
- ($.documentation /.item
+ ($.definition /.item
"Fetches the element at the specified index."
[(item i xs)])
- ($.documentation /.sorted
+ ($.definition /.sorted
"A list ordered by a comparison function."
[(sorted < xs)])
- ($.documentation /.empty?
+ ($.definition /.empty?
""
[(empty? xs)])
- ($.documentation /.member?
+ ($.definition /.member?
""
[(member? eq xs x)])
(,, (with_template [<name> <doc>]
- [($.documentation <name>
+ [($.definition <name>
<doc>)]
[/.head "Yields the first element of a list."]
[/.tail "For a list of size N, yields the N-1 elements after the first one."]
))
- ($.documentation /.indices
+ ($.definition /.indices
"Produces all the valid indices for a given size."
[(indices size)])
- ($.documentation /.zipped
+ ($.definition /.zipped
"Create list zippers with the specified number of input lists."
[(def zipped_2 (zipped 2))
(def zipped_3 (zipped 3))
(zipped_3 xs ys zs)
((zipped 3) xs ys zs)])
- ($.documentation /.zipped_with
+ ($.definition /.zipped_with
"Create list zippers with the specified number of input lists."
[(def zipped_with_2 (zipped_with 2))
(def zipped_with_3 (zipped_with 3))
(zipped_with_2 + xs ys)
((zipped_with 2) + xs ys)])
- ($.documentation /.last
+ ($.definition /.last
""
[(last xs)])
- ($.documentation /.inits
+ ($.definition /.inits
(format "For a list of size N, yields the first N-1 elements."
\n "Will yield a .#None for empty lists.")
[(inits xs)])
- ($.documentation /.together
+ ($.definition /.together
"The sequential combination of all the lists.")
- ($.documentation /.with
+ ($.definition /.with
"Enhances a monad with List functionality."
[(with monad)])
- ($.documentation /.lifted
+ ($.definition /.lifted
"Wraps a monadic value with List machinery."
[(lifted monad)])
- ($.documentation /.enumeration
+ ($.definition /.enumeration
"Pairs every element in the list with its index, starting at 0."
[(enumeration xs)])
- ($.documentation /.when
+ ($.definition /.when
"Can be used as a guard in (co)monadic be/do expressions."
[(do monad
[value (do_something 1 2 3)
diff --git a/stdlib/source/documentation/lux/data/collection/list/property.lux b/stdlib/source/documentation/lux/data/collection/list/property.lux
index b94d44263..df68a5963 100644
--- a/stdlib/source/documentation/lux/data/collection/list/property.lux
+++ b/stdlib/source/documentation/lux/data/collection/list/property.lux
@@ -19,27 +19,27 @@
($.default /.values)
($.default /.equivalence)
- ($.documentation (/.List it)
+ ($.definition (/.List it)
(format "A property list."
\n "It's a simple dictionary-like structure with Text keys."))
- ($.documentation /.value
+ ($.definition /.value
""
[(value key properties)])
- ($.documentation /.contains?
+ ($.definition /.contains?
""
[(contains? key properties)])
- ($.documentation /.has
+ ($.definition /.has
""
[(has key val properties)])
- ($.documentation /.revised
+ ($.definition /.revised
""
[(revised key f properties)])
- ($.documentation /.lacks
+ ($.definition /.lacks
""
[(lacks key properties)])]
[]))
diff --git a/stdlib/source/documentation/lux/data/collection/queue.lux b/stdlib/source/documentation/lux/data/collection/queue.lux
index 935b0dfc3..5b96e8a10 100644
--- a/stdlib/source/documentation/lux/data/collection/queue.lux
+++ b/stdlib/source/documentation/lux/data/collection/queue.lux
@@ -17,29 +17,29 @@
($.default /.equivalence)
($.default /.functor)
- ($.documentation (/.Queue it)
+ ($.definition (/.Queue it)
"A first-in, first-out sequential data-structure.")
- ($.documentation /.of_list
+ ($.definition /.of_list
""
[(of_list entries)])
- ($.documentation /.list
+ ($.definition /.list
""
[(list queue)])
- ($.documentation /.front
+ ($.definition /.front
"Yields the first value in the queue, if any.")
- ($.documentation /.member?
+ ($.definition /.member?
""
[(member? equivalence queue member)])
- ($.documentation /.next
+ ($.definition /.next
""
[(next queue)])
- ($.documentation /.end
+ ($.definition /.end
""
[(end val queue)])]
[/priority.documentation]))
diff --git a/stdlib/source/documentation/lux/data/collection/queue/priority.lux b/stdlib/source/documentation/lux/data/collection/queue/priority.lux
index 4c6303902..36f889902 100644
--- a/stdlib/source/documentation/lux/data/collection/queue/priority.lux
+++ b/stdlib/source/documentation/lux/data/collection/queue/priority.lux
@@ -19,11 +19,11 @@
($.default /.next)
($.default /.empty?)
- ($.documentation /.member?
+ ($.definition /.member?
""
[(member? equivalence queue member)])
- ($.documentation /.end
+ ($.definition /.end
""
[(end priority value queue)])]
[]))
diff --git a/stdlib/source/documentation/lux/data/collection/sequence.lux b/stdlib/source/documentation/lux/data/collection/sequence.lux
index 9bc09f736..fc8c6fab6 100644
--- a/stdlib/source/documentation/lux/data/collection/sequence.lux
+++ b/stdlib/source/documentation/lux/data/collection/sequence.lux
@@ -24,42 +24,42 @@
($.default /.every?)
($.default /.any?)
- ($.documentation (/.Sequence it)
+ ($.definition (/.Sequence it)
"A sequential data-structure with fast random access.")
- ($.documentation /.suffix
+ ($.definition /.suffix
""
[(suffix val sequence)])
- ($.documentation /.within_bounds?
+ ($.definition /.within_bounds?
"Determines whether the index is within the bounds of the sequence."
[(within_bounds? sequence idx)])
- ($.documentation /.item
+ ($.definition /.item
""
[(item idx sequence)])
- ($.documentation /.has
+ ($.definition /.has
""
[(has idx val sequence)])
- ($.documentation /.revised
+ ($.definition /.revised
""
[(revised idx f sequence)])
- ($.documentation /.prefix
+ ($.definition /.prefix
""
[(prefix sequence)])
- ($.documentation /.list
+ ($.definition /.list
""
[(list sequence)])
- ($.documentation /.member?
+ ($.definition /.member?
""
[(member? equivalence sequence val)])
- ($.documentation /.sequence
+ ($.definition /.sequence
"Sequence literals."
[(is (Sequence Nat)
(sequence 12 34 56 78 90))])]
diff --git a/stdlib/source/documentation/lux/data/collection/set.lux b/stdlib/source/documentation/lux/data/collection/set.lux
index 37024e63b..00d989bca 100644
--- a/stdlib/source/documentation/lux/data/collection/set.lux
+++ b/stdlib/source/documentation/lux/data/collection/set.lux
@@ -30,23 +30,23 @@
($.default /.of_list)
($.default /.predicate)
- ($.documentation /.has
+ ($.definition /.has
""
[(has elem set)])
- ($.documentation /.difference
+ ($.definition /.difference
""
[(difference sub base)])
- ($.documentation /.intersection
+ ($.definition /.intersection
""
[(intersection filter base)])
- ($.documentation /.sub?
+ ($.definition /.sub?
""
[(sub? super sub)])
- ($.documentation /.super?
+ ($.definition /.super?
""
[(super? sub super)])]
[/multi.documentation
diff --git a/stdlib/source/documentation/lux/data/collection/set/multi.lux b/stdlib/source/documentation/lux/data/collection/set/multi.lux
index d6d0947dc..3f06fe230 100644
--- a/stdlib/source/documentation/lux/data/collection/set/multi.lux
+++ b/stdlib/source/documentation/lux/data/collection/set/multi.lux
@@ -25,33 +25,33 @@
($.default /.intersection)
($.default /.difference)
- ($.documentation (/.Set it)
+ ($.definition (/.Set it)
"A set that keeps track of repetition in its entries.")
- ($.documentation /.has
+ ($.definition /.has
""
[(has multiplicity elem set)])
- ($.documentation /.lacks
+ ($.definition /.lacks
""
[(lacks multiplicity elem set)])
- ($.documentation /.multiplicity
+ ($.definition /.multiplicity
""
[(multiplicity set elem)])
- ($.documentation /.sub?
+ ($.definition /.sub?
"Is 'subject' a sub-set of 'reference'?"
[(sub? reference subject)])
- ($.documentation /.support
+ ($.definition /.support
"A set of the unique (non repeated) members."
[(support set)])
- ($.documentation /.member?
+ ($.definition /.member?
""
[(member? set elem)])
- ($.documentation /.super?
+ ($.definition /.super?
"Is 'subject' a super-set of 'reference'?")]
[]))
diff --git a/stdlib/source/documentation/lux/data/collection/set/ordered.lux b/stdlib/source/documentation/lux/data/collection/set/ordered.lux
index 0b8dba28e..6581303a4 100644
--- a/stdlib/source/documentation/lux/data/collection/set/ordered.lux
+++ b/stdlib/source/documentation/lux/data/collection/set/ordered.lux
@@ -23,30 +23,30 @@
($.default /.intersection)
($.default /.equivalence)
- ($.documentation (/.Set it)
+ ($.definition (/.Set it)
"A set with ordered entries.")
- ($.documentation /.member?
+ ($.definition /.member?
""
[(member? set elem)])
- ($.documentation /.has
+ ($.definition /.has
""
[(has elem set)])
- ($.documentation /.lacks
+ ($.definition /.lacks
""
[(lacks elem set)])
- ($.documentation /.difference
+ ($.definition /.difference
""
[(difference param subject)])
- ($.documentation /.sub?
+ ($.definition /.sub?
"Is 'sub' a sub-set of 'super'?"
[(sub? super sub)])
- ($.documentation /.super?
+ ($.definition /.super?
"Is 'super' a super-set of 'sub'?"
[(super? sub super)])]
[]))
diff --git a/stdlib/source/documentation/lux/data/collection/stack.lux b/stdlib/source/documentation/lux/data/collection/stack.lux
index defa3f836..0faad223b 100644
--- a/stdlib/source/documentation/lux/data/collection/stack.lux
+++ b/stdlib/source/documentation/lux/data/collection/stack.lux
@@ -18,18 +18,18 @@
($.default /.equivalence)
($.default /.functor)
- ($.documentation (/.Stack it)
+ ($.definition (/.Stack it)
"A first-in, last-out sequential data-structure.")
- ($.documentation /.value
+ ($.definition /.value
"Yields the top value in the stack, if any."
[(value stack)])
- ($.documentation /.next
+ ($.definition /.next
""
[(next stack)])
- ($.documentation /.top
+ ($.definition /.top
""
[(top value stack)])]
[]))
diff --git a/stdlib/source/documentation/lux/data/collection/stream.lux b/stdlib/source/documentation/lux/data/collection/stream.lux
index 393765c2f..7f6b412cf 100644
--- a/stdlib/source/documentation/lux/data/collection/stream.lux
+++ b/stdlib/source/documentation/lux/data/collection/stream.lux
@@ -23,36 +23,36 @@
($.default /.split_when)
($.default /.split_at)
- ($.documentation (/.Stream it)
+ ($.definition (/.Stream it)
"An infinite sequence of values.")
- ($.documentation /.iterations
+ ($.definition /.iterations
"A stateful way of infinitely calculating the values of a stream."
[(iterations step init)])
- ($.documentation /.repeated
+ ($.definition /.repeated
"Repeat a value forever."
[(repeated x)])
- ($.documentation /.cycle
+ ($.definition /.cycle
"Go over the elements of a list forever."
[(cycle [start next])])
- ($.documentation /.item
+ ($.definition /.item
""
[(item idx stream)])
- ($.documentation /.only
+ ($.definition /.only
"A new stream only with items that satisfy the predicate."
[(only predicate stream)])
- ($.documentation /.partition
+ ($.definition /.partition
(format "Split a stream in two based on a predicate."
\n "The left side contains all entries for which the predicate is #1."
\n "The right side contains all entries for which the predicate is #0.")
[(partition left? xs)])
- ($.documentation /.pattern
+ ($.definition /.pattern
(format "Allows destructuring of streams in pattern-matching expressions."
\n "Caveat emptor: Only use it for destructuring, and not for testing values within the streams.")
[(let [(pattern x y z _tail) (some_stream_func +1 +2 +3)]
diff --git a/stdlib/source/documentation/lux/data/collection/tree.lux b/stdlib/source/documentation/lux/data/collection/tree.lux
index fca76d251..4e063f788 100644
--- a/stdlib/source/documentation/lux/data/collection/tree.lux
+++ b/stdlib/source/documentation/lux/data/collection/tree.lux
@@ -18,22 +18,22 @@
""
[($.default \\parser.cannot_move_further)
- ($.documentation (\\parser.Parser it)
+ ($.definition (\\parser.Parser it)
"A parser of arbitrary trees.")
- ($.documentation \\parser.result'
+ ($.definition \\parser.result'
"Applies the parser against a tree zipper."
[(result' parser zipper)])
- ($.documentation \\parser.result
+ ($.definition \\parser.result
"Applies the parser against a tree."
[(result parser tree)])
- ($.documentation \\parser.value
+ ($.definition \\parser.value
"Yields the value inside the current tree node.")
(,, (with_template [<name> <doc>]
- [($.documentation <name>
+ [($.definition <name>
<doc>)]
[\\parser.down "Move down."]
@@ -61,22 +61,22 @@
($.default /.functor)
($.default /.mix)
- ($.documentation (/.Tree it)
+ ($.definition (/.Tree it)
"A generic tree data-structure.")
- ($.documentation /.flat
+ ($.definition /.flat
"All the leaf values of the tree, in order."
[(flat tree)])
- ($.documentation /.leaf
+ ($.definition /.leaf
""
[(leaf value)])
- ($.documentation /.branch
+ ($.definition /.branch
""
[(branch value children)])
- ($.documentation /.tree
+ ($.definition /.tree
"Tree literals."
[(is (Tree Nat)
(tree 12
diff --git a/stdlib/source/documentation/lux/data/collection/tree/finger.lux b/stdlib/source/documentation/lux/data/collection/tree/finger.lux
index fe0488db4..fbaac3b6f 100644
--- a/stdlib/source/documentation/lux/data/collection/tree/finger.lux
+++ b/stdlib/source/documentation/lux/data/collection/tree/finger.lux
@@ -15,33 +15,33 @@
[($.default /.tag)
($.default /.root)
- ($.documentation (/.Tree @ tag value)
+ ($.definition (/.Tree @ tag value)
"A finger tree.")
- ($.documentation (/.Builder @ tag)
+ ($.definition (/.Builder @ tag)
"A builder for finter tree structures.")
- ($.documentation /.builder
+ ($.definition /.builder
"A new builder using the given monoid."
[(builder monoid)])
- ($.documentation /.value
+ ($.definition /.value
""
[(value tree)])
- ($.documentation /.tags
+ ($.definition /.tags
""
[(tags tree)])
- ($.documentation /.values
+ ($.definition /.values
""
[(values tree)])
- ($.documentation /.one
+ ($.definition /.one
"Finds one value that meets the predicate."
[(one predicate tree)])
- ($.documentation /.exists?
+ ($.definition /.exists?
"Verifies that a value exists which meets the predicate."
[(exists? predicate tree)])]
[]))
diff --git a/stdlib/source/documentation/lux/data/collection/tree/zipper.lux b/stdlib/source/documentation/lux/data/collection/tree/zipper.lux
index 317fd95ac..28535dac0 100644
--- a/stdlib/source/documentation/lux/data/collection/tree/zipper.lux
+++ b/stdlib/source/documentation/lux/data/collection/tree/zipper.lux
@@ -36,22 +36,22 @@
($.default /.functor)
($.default /.comonad)
- ($.documentation (/.Zipper it)
+ ($.definition (/.Zipper it)
"Tree zippers, for easy navigation and editing of trees.")
- ($.documentation /.set
+ ($.definition /.set
""
[(set value zipper)])
- ($.documentation /.update
+ ($.definition /.update
""
[(update transform zipper)])
- ($.documentation /.interpose
+ ($.definition /.interpose
""
[(interpose value zipper)])
- ($.documentation /.adopt
+ ($.definition /.adopt
""
[(adopt value zipper)])]
[]))
diff --git a/stdlib/source/documentation/lux/data/color.lux b/stdlib/source/documentation/lux/data/color.lux
index 20ef0c572..32d48672f 100644
--- a/stdlib/source/documentation/lux/data/color.lux
+++ b/stdlib/source/documentation/lux/data/color.lux
@@ -46,54 +46,54 @@
($.default /.saturated)
($.default /.un_saturated)
- ($.documentation /.RGB
+ ($.definition /.RGB
"Red-Green-Blue color format.")
- ($.documentation /.HSL
+ ($.definition /.HSL
"Hue-Saturation-Lightness color format.")
- ($.documentation /.CMYK
+ ($.definition /.CMYK
"Cyan-Magenta-Yellow-Key color format.")
- ($.documentation /.HSB
+ ($.definition /.HSB
"Hue-Saturation-Brightness color format.")
- ($.documentation /.Color
+ ($.definition /.Color
"A color value, independent of color format.")
- ($.documentation /.complement
+ ($.definition /.complement
"The opposite color."
[(complement color)])
- ($.documentation /.interpolated
+ ($.definition /.interpolated
""
[(interpolated ratio end start)])
- ($.documentation /.analogous
+ ($.definition /.analogous
(palette_documentation /.analogous)
[(analogous spread variations color)])
- ($.documentation /.monochromatic
+ ($.definition /.monochromatic
(palette_documentation /.monochromatic)
[(monochromatic spread variations color)])
- ($.documentation /.Alpha
+ ($.definition /.Alpha
"The degree of transparency of a pigment.")
- ($.documentation /.transparent
+ ($.definition /.transparent
"The maximum degree of transparency.")
- ($.documentation /.translucent
+ ($.definition /.translucent
"The average degree of transparency.")
- ($.documentation /.opaque
+ ($.definition /.opaque
"The minimum degree of transparency.")
- ($.documentation /.Pigment
+ ($.definition /.Pigment
"A color with some degree of transparency.")
(,, (with_template [<name>]
- [(`` ($.documentation <name>
+ [(`` ($.definition <name>
(format "A "
(text.replaced "_" "-" (,, (template.text [<name>])))
" color scheme.")))]
diff --git a/stdlib/source/documentation/lux/data/color/named.lux b/stdlib/source/documentation/lux/data/color/named.lux
index f7da245b1..239281ab1 100644
--- a/stdlib/source/documentation/lux/data/color/named.lux
+++ b/stdlib/source/documentation/lux/data/color/named.lux
@@ -17,7 +17,7 @@
($.module /._
""
[(,, (with_template [<name>]
- [($.documentation <name>
+ [($.definition <name>
(let [[red green blue] (//.rgb <name>)
[_ name] (symbol <name>)]
(format "R:" (hex#encoded red)
diff --git a/stdlib/source/documentation/lux/data/format/json.lux b/stdlib/source/documentation/lux/data/format/json.lux
index d263a0dfa..3670951f3 100644
--- a/stdlib/source/documentation/lux/data/format/json.lux
+++ b/stdlib/source/documentation/lux/data/format/json.lux
@@ -21,19 +21,19 @@
($.default \\parser.unexpected_value)
($.default \\parser.value_mismatch)
- ($.documentation (\\parser.Parser it)
+ ($.definition (\\parser.Parser it)
"A JSON parser.")
- ($.documentation \\parser.result
+ ($.definition \\parser.result
(format "Executes the parser against a JSON object."
\n "Verifies that all of the JSON was consumed by the parser.")
[(result parser json)])
- ($.documentation \\parser.any
+ ($.definition \\parser.any
"Just returns the JSON input without applying any logic.")
(,, (with_template [<name>]
- [(`` ($.documentation <name>
+ [(`` ($.definition <name>
(format "Reads a JSON value as " (,, (template.text [<name>])) ".")))]
[\\parser.null]
@@ -43,9 +43,9 @@
))
(,, (with_template [<test> <check> <read>]
- [(`` ($.documentation <test>
+ [(`` ($.definition <test>
(format "Asks whether a JSON value is a " (,, (template.text [<read>])) ".")))
- (`` ($.documentation <check>
+ (`` ($.definition <check>
(format "Ensures a JSON value is a " (,, (template.text [<read>])) ".")))]
[\\parser.boolean? \\parser.this_boolean ..boolean]
@@ -53,25 +53,25 @@
[\\parser.string? \\parser.this_string ..string]
))
- ($.documentation \\parser.nullable
+ ($.definition \\parser.nullable
"Enhances parser by adding NULL-handling."
[(nullable parser)])
- ($.documentation \\parser.array
+ ($.definition \\parser.array
"Parses the contents of a JSON array."
[(array parser)])
- ($.documentation \\parser.object
+ ($.definition \\parser.object
(format "Parses the contents of a JSON object."
\n "Use this with the 'field' combinator.")
[(object parser)])
- ($.documentation \\parser.field
+ ($.definition \\parser.field
(format "Parses a field inside a JSON object."
\n "Use this inside the 'object' combinator.")
[(field field_name parser)])
- ($.documentation \\parser.dictionary
+ ($.definition \\parser.dictionary
"Parses a dictionary-like JSON object.")]
[])))
@@ -93,7 +93,7 @@
($.default /.format)
($.default /.codec)
- ($.documentation /.json
+ ($.definition /.json
"A simple way to produce JSON literals."
["null"
(json #null)]
@@ -108,20 +108,20 @@
["{'this' 'is', 'an' 'object'}"
(json {"this" "is" "an" "object"})])
- ($.documentation /.fields
+ ($.definition /.fields
"Get all the fields in a JSON object."
[(fields json)])
- ($.documentation /.field
+ ($.definition /.field
"A JSON object field getter."
[(field key json)])
- ($.documentation /.has
+ ($.definition /.has
"A JSON object field setter."
[(has key value json)])
(,, (with_template [<name> <desc>]
- [($.documentation <name>
+ [($.definition <name>
(format "A JSON object field getter for " <desc> "."))]
[/.boolean_field "booleans"]
diff --git a/stdlib/source/documentation/lux/data/format/xml.lux b/stdlib/source/documentation/lux/data/format/xml.lux
index 70f4855b0..2195db0c2 100644
--- a/stdlib/source/documentation/lux/data/format/xml.lux
+++ b/stdlib/source/documentation/lux/data/format/xml.lux
@@ -20,32 +20,32 @@
($.default \\parser.unconsumed_inputs)
($.default \\parser.nowhere)
- ($.documentation (\\parser.Parser it)
+ ($.definition (\\parser.Parser it)
"A parser of XML-encoded data.")
- ($.documentation \\parser.result
+ ($.definition \\parser.result
(format "Applies a parser against a stream of XML documents."
\n "Verifies that all of the inputs are consumed by the parser.")
[(result parser documents)])
- ($.documentation \\parser.text
+ ($.definition \\parser.text
"Yields text from a text node.")
- ($.documentation \\parser.tag
+ ($.definition \\parser.tag
"Yields the tag from the next node.")
- ($.documentation \\parser.attribute
+ ($.definition \\parser.attribute
"Yields the value of an attribute in the current node."
[(attribute name)])
- ($.documentation \\parser.node
+ ($.definition \\parser.node
"Parses the contents of the next node if the tag matches."
[(node expected parser)])
- ($.documentation \\parser.any
+ ($.definition \\parser.any
"Yields the next node.")
- ($.documentation \\parser.somewhere
+ ($.definition \\parser.somewhere
"Applies the parser somewhere among the remaining inputs; instead of demanding that the parser succeeds against the immediate inputs."
[(somewhere parser)])]
[]))
@@ -61,13 +61,13 @@
($.default /.codec)
($.default /.equivalence)
- ($.documentation /.attributes
+ ($.definition /.attributes
"An empty set of XML attributes.")
- ($.documentation /.tag
+ ($.definition /.tag
"The text format of a XML tag."
[(tag name)])
- ($.documentation /.attribute
+ ($.definition /.attribute
"The text format of a XML attribute.")]
[..\\parser]))
diff --git a/stdlib/source/documentation/lux/data/identity.lux b/stdlib/source/documentation/lux/data/identity.lux
index e1d42389e..bdfa6dbd6 100644
--- a/stdlib/source/documentation/lux/data/identity.lux
+++ b/stdlib/source/documentation/lux/data/identity.lux
@@ -17,6 +17,6 @@
($.default /.monad)
($.default /.comonad)
- ($.documentation (/.Identity it)
+ ($.definition (/.Identity it)
"A value, as is, without any extra structure super-imposed on it.")]
[]))
diff --git a/stdlib/source/documentation/lux/data/product.lux b/stdlib/source/documentation/lux/data/product.lux
index 7275ad4ee..aad2b2f31 100644
--- a/stdlib/source/documentation/lux/data/product.lux
+++ b/stdlib/source/documentation/lux/data/product.lux
@@ -15,29 +15,29 @@
[($.default /.equivalence)
($.default /.hash)
- ($.documentation /.left
+ ($.definition /.left
"The left side of a pair.")
- ($.documentation /.right
+ ($.definition /.right
"The right side of a pair.")
- ($.documentation /.curried
+ ($.definition /.curried
"Converts a 2-argument function into nested single-argument functions."
[(curried f)])
- ($.documentation /.uncurried
+ ($.definition /.uncurried
"Converts nested single-argument functions into a 2-argument function."
[(uncurried f)])
- ($.documentation /.swapped
+ ($.definition /.swapped
""
[(swapped [left right])])
- ($.documentation /.then
+ ($.definition /.then
"Apply functions to both sides of a pair."
[(then f g)])
- ($.documentation /.forked
+ ($.definition /.forked
"Yields a pair by applying both functions to a single value."
[(forked f g)])]
[]))
diff --git a/stdlib/source/documentation/lux/data/sum.lux b/stdlib/source/documentation/lux/data/sum.lux
index 2bd740509..19595cc10 100644
--- a/stdlib/source/documentation/lux/data/sum.lux
+++ b/stdlib/source/documentation/lux/data/sum.lux
@@ -18,17 +18,17 @@
($.default /.equivalence)
($.default /.hash)
- ($.documentation /.left
+ ($.definition /.left
"Lifts value to the left side of a 2-variant.")
- ($.documentation /.right
+ ($.definition /.right
"Lifts value to the right side of a 2-variant.")
- ($.documentation /.either
+ ($.definition /.either
"Applies a function to either side of a 2-variant."
[(either on_left on_right)])
- ($.documentation /.then
+ ($.definition /.then
"Applies functions to both sides of a 2-variant."
[(then on_left on_right)])]
[]))
diff --git a/stdlib/source/documentation/lux/data/text.lux b/stdlib/source/documentation/lux/data/text.lux
index 03023fcc1..e783b5ee7 100644
--- a/stdlib/source/documentation/lux/data/text.lux
+++ b/stdlib/source/documentation/lux/data/text.lux
@@ -66,10 +66,10 @@
($.default \\format.list)
($.default \\format.maybe)
- ($.documentation (\\format.Format it)
+ ($.definition (\\format.Format it)
"A way to produce readable text from values.")
- ($.documentation \\format.format
+ ($.definition \\format.format
"Text interpolation."
[(format "Static part " (text static) " does not match URI: " uri)])]
[]))
@@ -87,56 +87,56 @@
($.default \\parser.character_should_not_be)
($.default \\parser.character_does_not_satisfy_predicate)
- ($.documentation \\parser.Offset
+ ($.definition \\parser.Offset
"An offset into a block of text.")
- ($.documentation (\\parser.Parser it)
+ ($.definition (\\parser.Parser it)
"A parser for text.")
- ($.documentation \\parser.Slice
+ ($.definition \\parser.Slice
"A slice of a block of text.")
- ($.documentation \\parser.result
+ ($.definition \\parser.result
(format "Executes a parser against a block of text."
\n "Verifies that the entire input has been processed.")
[(result parser input)])
- ($.documentation \\parser.offset
+ ($.definition \\parser.offset
"Yields the current offset into the input.")
- ($.documentation \\parser.any
+ ($.definition \\parser.any
"Yields the next character without applying any logic.")
- ($.documentation \\parser.any!
+ ($.definition \\parser.any!
"Yields the next character (as a slice) without applying any logic.")
(,, (with_template [<name> <caveat>]
- [(`` ($.documentation <name>
+ [(`` ($.definition <name>
(format "Produce a character" (,, (template.text [<caveat>])) " if the parser fails.")))]
[\\parser.not ""]
[\\parser.not! " (as a slice)"]
))
- ($.documentation \\parser.this
+ ($.definition \\parser.this
"Checks that a specific text shows up in the input."
[(this reference)])
- ($.documentation \\parser.end
+ ($.definition \\parser.end
"Ensure the parser's input is empty.")
- ($.documentation \\parser.next
+ ($.definition \\parser.next
"Yields the next character (without consuming it from the input).")
- ($.documentation \\parser.remaining
+ ($.definition \\parser.remaining
"Get all of the remaining input (without consuming it).")
- ($.documentation \\parser.range
+ ($.definition \\parser.range
"Only yields characters within a range."
[(range bottom top)])
(,, (with_template [<name> <desc>]
- [($.documentation <name>
+ [($.definition <name>
(format "Only yields " <desc> " characters."))]
[\\parser.upper "uppercase"]
@@ -145,17 +145,17 @@
[\\parser.octal "octal"]
))
- ($.documentation \\parser.alpha
+ ($.definition \\parser.alpha
"Yields alphabetic characters.")
- ($.documentation \\parser.alpha_num
+ ($.definition \\parser.alpha_num
"Yields alphanumeric characters.")
- ($.documentation \\parser.hexadecimal
+ ($.definition \\parser.hexadecimal
"Yields hexadecimal digits.")
(,, (with_template [<name> <description_modifier>]
- [($.documentation <name>
+ [($.definition <name>
(format "Yields characters that are" <description_modifier> " part of a piece of text."))]
[\\parser.one_of ""]
@@ -163,32 +163,32 @@
))
(,, (with_template [<name> <description_modifier>]
- [($.documentation <name>
+ [($.definition <name>
(format "Yields characters (as a slice) that are" <description_modifier> " part of a piece of text."))]
[\\parser.one_of! ""]
[\\parser.none_of! " not"]
))
- ($.documentation \\parser.satisfies
+ ($.definition \\parser.satisfies
"Yields characters that satisfy a predicate."
[(satisfies parser)])
- ($.documentation \\parser.space
+ ($.definition \\parser.space
"Yields white-space.")
- ($.documentation \\parser.and
+ ($.definition \\parser.and
"Yields the outputs of both parsers composed together."
[(and left right)])
- ($.documentation \\parser.and!
+ ($.definition \\parser.and!
"Yields the outputs of both parsers composed together (as a slice)."
[(and! left right)])
(,, (with_template [<text> <slice>]
- [(`` ($.documentation <text>
+ [(`` ($.definition <text>
(format "Yields " (,, (template.text [<name>])) " characters as a single continuous text.")))
- (`` ($.documentation <slice>
+ (`` ($.definition <slice>
(format "Yields " (,, (template.text [<name>])) " characters as a single continuous text (as a slice).")))]
[\\parser.some \\parser.some!]
@@ -196,9 +196,9 @@
))
(,, (with_template [<text> <slice> <doc_modifier>]
- [(`` ($.documentation <text>
+ [(`` ($.definition <text>
(format "Yields " <doc_modifier> " N characters.")))
- (`` ($.documentation <slice>
+ (`` ($.definition <slice>
(format "Yields " <doc_modifier> " N characters (as a slice).")))]
[\\parser.exactly \\parser.exactly! "exactly"]
@@ -206,27 +206,27 @@
[\\parser.at_least \\parser.at_least! "at least"]
))
- ($.documentation \\parser.between
+ ($.definition \\parser.between
""
[(between minimum additional parser)])
- ($.documentation \\parser.between!
+ ($.definition \\parser.between!
""
[(between! minimum additional parser)])
- ($.documentation \\parser.enclosed
+ ($.definition \\parser.enclosed
""
[(enclosed [start end] parser)])
- ($.documentation \\parser.local
+ ($.definition \\parser.local
"Applies a parser against the given input."
[(local local_input parser)])
- ($.documentation \\parser.slice
+ ($.definition \\parser.slice
"Converts a slice to a block of text."
[(slice parser)])
- ($.documentation \\parser.then
+ ($.definition \\parser.then
"Embeds a text parser into an arbitrary parser that yields text."
[(then structured text)])]
[])))
@@ -268,93 +268,93 @@
($.default /.lower_cased)
($.default /.upper_cased)
- ($.documentation /.Char
+ ($.definition /.Char
"A character code number.")
- ($.documentation /.line_feed
+ ($.definition /.line_feed
"Same as 'new_line'.")
- ($.documentation /.char
+ ($.definition /.char
"Yields the character at the specified index."
[(char index input)])
- ($.documentation /.index_since
+ ($.definition /.index_since
""
[(index_since from pattern input)])
- ($.documentation /.index
+ ($.definition /.index
""
[(index pattern input)])
- ($.documentation /.last_index
+ ($.definition /.last_index
""
[(last_index part text)])
- ($.documentation /.starts_with?
+ ($.definition /.starts_with?
""
[(starts_with? prefix x)])
- ($.documentation /.ends_with?
+ ($.definition /.ends_with?
""
[(ends_with? postfix x)])
- ($.documentation /.enclosed_by?
+ ($.definition /.enclosed_by?
""
[(enclosed_by? boundary value)])
- ($.documentation /.contains?
+ ($.definition /.contains?
""
[(contains? sub text)])
- ($.documentation /.prefix
+ ($.definition /.prefix
""
[(prefix param subject)])
- ($.documentation /.suffix
+ ($.definition /.suffix
""
[(suffix param subject)])
- ($.documentation /.enclosed
+ ($.definition /.enclosed
"Surrounds the given content text with left and right side additions."
[(enclosed [left right] content)])
- ($.documentation /.enclosed'
+ ($.definition /.enclosed'
"Surrounds the given content text with the same boundary text."
[(enclosed' boundary content)])
- ($.documentation /.clip
+ ($.definition /.clip
"Clips a chunk of text from the input at the specified offset and of the specified size."
[(clip offset size input)])
- ($.documentation /.clip_since
+ ($.definition /.clip_since
"Clips the remaining text from the input at the specified offset."
[(clip_since offset input)])
- ($.documentation /.split_at
+ ($.definition /.split_at
""
[(split_at at x)])
- ($.documentation /.split_by
+ ($.definition /.split_by
""
[(split_by token sample)])
- ($.documentation /.all_split_by
+ ($.definition /.all_split_by
""
[(all_split_by token sample)])
- ($.documentation /.replaced_once
+ ($.definition /.replaced_once
""
[(replaced_once pattern replacement template)])
- ($.documentation /.replaced
+ ($.definition /.replaced
""
[(replaced pattern replacement template)])
- ($.documentation /.interposed
+ ($.definition /.interposed
""
[(interposed separator texts)])
- ($.documentation /.space?
+ ($.definition /.space?
"Checks whether the character is white-space."
[(space? char)])]
[..\\format
diff --git a/stdlib/source/documentation/lux/data/text/buffer.lux b/stdlib/source/documentation/lux/data/text/buffer.lux
index 9f64dd787..38bd18830 100644
--- a/stdlib/source/documentation/lux/data/text/buffer.lux
+++ b/stdlib/source/documentation/lux/data/text/buffer.lux
@@ -17,6 +17,6 @@
($.default /.size)
($.default /.text)
- ($.documentation /.Buffer
+ ($.definition /.Buffer
"Immutable text buffer for efficient text concatenation.")]
[]))
diff --git a/stdlib/source/documentation/lux/data/text/encoding.lux b/stdlib/source/documentation/lux/data/text/encoding.lux
index 471b5970e..40366df2c 100644
--- a/stdlib/source/documentation/lux/data/text/encoding.lux
+++ b/stdlib/source/documentation/lux/data/text/encoding.lux
@@ -16,11 +16,11 @@
""
[($.default /.name)
- ($.documentation /.Encoding
+ ($.definition /.Encoding
"Encoding formats for text.")
(,, (with_template [<name>]
- [($.documentation <name>
+ [($.definition <name>
(format "'" (/.name <name>) "' text encoding. "))]
[/.ascii]
diff --git a/stdlib/source/documentation/lux/data/text/encoding/utf8.lux b/stdlib/source/documentation/lux/data/text/encoding/utf8.lux
index eaa712caf..afe5d2b41 100644
--- a/stdlib/source/documentation/lux/data/text/encoding/utf8.lux
+++ b/stdlib/source/documentation/lux/data/text/encoding/utf8.lux
@@ -12,6 +12,6 @@
(.List $.Module)
($.module /._
""
- [($.documentation /.codec
+ [($.definition /.codec
"A codec for binary encoding of text as UTF-8.")]
[]))
diff --git a/stdlib/source/documentation/lux/data/text/escape.lux b/stdlib/source/documentation/lux/data/text/escape.lux
index aa0ec4015..25081c655 100644
--- a/stdlib/source/documentation/lux/data/text/escape.lux
+++ b/stdlib/source/documentation/lux/data/text/escape.lux
@@ -17,16 +17,16 @@
($.default /.invalid_escape)
($.default /.invalid_unicode_escape)
- ($.documentation /.escaped
+ ($.definition /.escaped
"Yields a escaped version of the text."
[(escaped text)])
- ($.documentation /.un_escaped
+ ($.definition /.un_escaped
(format "Yields an un-escaped text."
\n "Fails if it was improperly escaped.")
[(un_escaped text)])
- ($.documentation /.literal
+ ($.definition /.literal
"If given a escaped text literal, expands to an un-escaped version."
[(/.literal "Line 1\nLine 2")
"=>"
diff --git a/stdlib/source/documentation/lux/data/text/regex.lux b/stdlib/source/documentation/lux/data/text/regex.lux
index fef504012..b939df37d 100644
--- a/stdlib/source/documentation/lux/data/text/regex.lux
+++ b/stdlib/source/documentation/lux/data/text/regex.lux
@@ -14,7 +14,7 @@
""
[($.default /.incorrect_quantification)
- ($.documentation /.regex
+ ($.definition /.regex
"Create lexers using regular-expression syntax."
["Literals"
(regex "a")]
@@ -60,7 +60,7 @@
(regex "a|b")
(regex "a(.)(.)|b(.)(.)")])
- ($.documentation /.pattern
+ ($.definition /.pattern
"Allows you to test text against regular expressions."
[(case some_text
(pattern "(\d{3})-(\d{3})-(\d{4})"
diff --git a/stdlib/source/documentation/lux/data/text/unicode/block.lux b/stdlib/source/documentation/lux/data/text/unicode/block.lux
index d23c6815d..72f45cdaa 100644
--- a/stdlib/source/documentation/lux/data/text/unicode/block.lux
+++ b/stdlib/source/documentation/lux/data/text/unicode/block.lux
@@ -22,19 +22,19 @@
($.default /.equivalence)
($.default /.hash)
- ($.documentation /.Block
+ ($.definition /.Block
"A block of valid unicode characters.")
- ($.documentation /.block
+ ($.definition /.block
""
[(block start additional)])
- ($.documentation /.within?
+ ($.definition /.within?
""
[(within? block char)])
(,, (with_template [<name>]
- [($.documentation <name>
+ [($.definition <name>
(let [[_ name] (symbol <name>)]
(format (hex#encoded (/.start <name>))
"-" (hex#encoded (/.end <name>))
diff --git a/stdlib/source/documentation/lux/data/text/unicode/set.lux b/stdlib/source/documentation/lux/data/text/unicode/set.lux
index 1e637cf5e..57040bb69 100644
--- a/stdlib/source/documentation/lux/data/text/unicode/set.lux
+++ b/stdlib/source/documentation/lux/data/text/unicode/set.lux
@@ -28,11 +28,11 @@
($.default /.upper_case)
($.default /.lower_case)
- ($.documentation /.set
+ ($.definition /.set
""
[(set [head tail])])
- ($.documentation /.member?
+ ($.definition /.member?
""
[(member? set character)])]
[]))
diff --git a/stdlib/source/documentation/lux/debug.lux b/stdlib/source/documentation/lux/debug.lux
index 33cb48573..473cf4035 100644
--- a/stdlib/source/documentation/lux/debug.lux
+++ b/stdlib/source/documentation/lux/debug.lux
@@ -16,15 +16,15 @@
($.default /.type_hole)
($.default /.unknown_local_binding)
- ($.documentation /.inspection
+ ($.definition /.inspection
"A best-effort attempt to generate a textual representation of a value, without knowing its type."
[(inspection value)])
- ($.documentation /.representation
+ ($.definition /.representation
"A best-effort attempt to generate a textual representation of a value, while knowing its type."
[(representation type value)])
- ($.documentation /.private
+ ($.definition /.private
"Allows access to un-exported definitions in other modules."
["Module A"
(def .private (secret_definition input)
@@ -33,11 +33,11 @@
"Module B"
((/.private secret_definition) my_input)])
- ($.documentation /.log!
+ ($.definition /.log!
"Prints/writes a message to standard output."
[(log! message)])
- ($.documentation /.hole
+ ($.definition /.hole
(format "A typed 'hole'."
\n "Reveals the type expected of the expression that should go in the hole.")
[(is (-> Nat Text)
@@ -46,7 +46,7 @@
"=>"
.Text])
- ($.documentation /.here
+ ($.definition /.here
"Shows the names and values of local bindings available around the call to 'here'."
[(let [foo 123
bar +456
diff --git a/stdlib/source/documentation/lux/documentation.lux b/stdlib/source/documentation/lux/documentation.lux
index a7ab8bd82..32e7cf5cb 100644
--- a/stdlib/source/documentation/lux/documentation.lux
+++ b/stdlib/source/documentation/lux/documentation.lux
@@ -7,17 +7,17 @@
[\\library
["[0]" /]])
-(with_expansions [<default> (/.documentation /.default
+(with_expansions [<default> (/.definition /.default
""
[(is /.Definition
(default ..definition))])
- <documentation> (/.documentation /.documentation
+ <documentation> (/.definition /.definition
""
[<default>])
<all> (these (/.default /.unqualified_symbol)
(/.default /.Definition)
(/.default /.Module)
- (/.default /.documentation)
+ (/.default /.definition)
<default>
<documentation>)]
@@ -27,7 +27,7 @@
""
[<all>
- (/.documentation /.module
+ (/.definition /.module
""
[(is (.List /.Module)
(module /._
diff --git a/stdlib/source/documentation/lux/extension.lux b/stdlib/source/documentation/lux/extension.lux
index 702d82bd3..737d19387 100644
--- a/stdlib/source/documentation/lux/extension.lux
+++ b/stdlib/source/documentation/lux/extension.lux
@@ -26,22 +26,22 @@
(.List $.Module)
($.module /._
""
- [($.documentation /.analysis
+ [($.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))])
- ($.documentation /.synthesis
+ ($.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))])
- ($.documentation /.generation
+ ($.definition /.generation
""
[(generation ("my generation" self phase archive [pass_through <synthesis>.any])
(phase archive pass_through))])
- ($.documentation /.declaration
+ ($.definition /.declaration
""
[(declaration ("my declaration" self phase archive [parameters (<>.some <code>.any)])
(do phase.monad
diff --git a/stdlib/source/documentation/lux/ffi.js.lux b/stdlib/source/documentation/lux/ffi.js.lux
index 07c5e5759..1aecf6eee 100644
--- a/stdlib/source/documentation/lux/ffi.js.lux
+++ b/stdlib/source/documentation/lux/ffi.js.lux
@@ -25,10 +25,10 @@
($.default /.on_nashorn?)
($.default /.on_node_js?)
- ($.documentation /.null
+ ($.definition /.null
"The null pointer.")
- ($.documentation /.import
+ ($.definition /.import
"Easily import types, methods, functions and constants."
[(import Uint8Array
"[1]::[0]")
@@ -43,7 +43,7 @@
(new [/.String])
(decode [/.String] String))])
- ($.documentation /.type_of
+ ($.definition /.type_of
"The type of an object, as text."
[(= "boolean"
(type_of #1))]
@@ -54,11 +54,11 @@
[(= "function"
(type_of (function (_ value) value)))])
- ($.documentation /.constant
+ ($.definition /.constant
"Allows using definitions from the JavaScript host platform."
[(constant .Frac [Math PI])])
- ($.documentation /.closure
+ ($.definition /.closure
(format "Allows defining closures/anonymous-functions in the form that JavaScript expects."
\n "This is useful for adapting Lux functions for usage by JavaScript code.")
[(is /.Function
diff --git a/stdlib/source/documentation/lux/ffi.jvm.lux b/stdlib/source/documentation/lux/ffi.jvm.lux
index e095e8a15..9e5d1e31c 100644
--- a/stdlib/source/documentation/lux/ffi.jvm.lux
+++ b/stdlib/source/documentation/lux/ffi.jvm.lux
@@ -24,7 +24,7 @@
($.default /.cannot_cast_to_non_object)
(,, (with_template [<name>]
- [(`` ($.documentation <name>
+ [(`` ($.definition <name>
(format "The type of a (boxed) " (,, (template.text [<name>])) " object.")))]
[/.Boolean]
@@ -38,7 +38,7 @@
))
(,, (with_template [<name>]
- [(`` ($.documentation <name>
+ [(`` ($.definition <name>
(format "The type of an (unboxed) " (,, (template.text [<name>])) " value.")))]
[/.boolean]
@@ -52,7 +52,7 @@
))
(,, (with_template [<name> <from> <to>]
- [(`` ($.documentation <name>
+ [(`` ($.definition <name>
"Type converter."))]
[/.byte_to_long Byte Long]
@@ -92,7 +92,7 @@
[/.short_to_char Short Character]
))
- ($.documentation /.class
+ ($.definition /.class
"Allows defining JVM classes in Lux code."
[(class "final" (TestClass A) [Runnable]
... Fields
@@ -123,12 +123,12 @@
"(::new! []) for calling the class's constructor."
"(::resolve! container [value]) for calling the 'resolve' method."])
- ($.documentation /.interface
+ ($.definition /.interface
"Allows defining JVM interfaces."
[(interface TestInterface
([] foo [boolean String] void "throws" [Exception]))])
- ($.documentation /.object
+ ($.definition /.object
"Allows defining anonymous classes."
["The 1st tuple corresponds to class-level type-variables."
"The 2nd tuple corresponds to parent interfaces."
@@ -141,25 +141,25 @@
(do_something some_value)
[])))])
- ($.documentation /.null
+ ($.definition /.null
"The null pointer."
[(null)])
- ($.documentation /.null?
+ ($.definition /.null?
"Test for the null pointer."
[(= true
(null? (null)))]
[(= false
(null? "YOLO"))])
- ($.documentation /.???
+ ($.definition /.???
"Takes a (potentially null) ObjectType reference and creates a (Maybe ObjectType) for it."
[(= (??? (is java/lang/String (null)))
{.#None})]
[(= (??? "YOLO")
{.#Some "YOLO"})])
- ($.documentation /.!!!
+ ($.definition /.!!!
(format "Takes a (Maybe ObjectType) and returns a ObjectType."
\n "A .#None would get translated into a (null).")
[(= (null)
@@ -167,14 +167,14 @@
[(= "foo"
(!!! (??? "foo")))])
- ($.documentation /.as
+ ($.definition /.as
(format "Checks whether an object is an instance of a particular class."
\n "Caveat emptor: Cannot check for polymorphism, so avoid using parameterized classes.")
[(case (as String "YOLO")
{.#Some value_as_string}
{.#None})])
- ($.documentation /.synchronized
+ ($.definition /.synchronized
"Evaluates body, while holding a lock on a given object."
[(synchronized object_to_be_locked
(exec
@@ -182,13 +182,13 @@
(dosomething else)
(finish the computation)))])
- ($.documentation /.to
+ ($.definition /.to
"Call a variety of methods on an object. Then, return the object."
[(to object
(ClassName::method1 arg0 arg1 arg2)
(ClassName::method2 arg3 arg4 arg5))])
- ($.documentation /.import
+ ($.definition /.import
"Allows importing JVM classes, and using them as types."
["Their methods, fields and enum options can also be imported."
(import java/lang/Object
@@ -236,32 +236,32 @@
(java/util/List::size [] my_list)
java/lang/Character$UnicodeScript::LATIN])
- ($.documentation /.array
+ ($.definition /.array
"Create an array of the given type, with the given size."
[(array java/lang/Object 10)])
- ($.documentation /.length
+ ($.definition /.length
"Gives the length of an array."
[(length my_array)])
- ($.documentation /.read!
+ ($.definition /.read!
"Loads an element from an array."
[(read! 10 my_array)])
- ($.documentation /.write!
+ ($.definition /.write!
"Stores an element into an array."
[(write! 10 my_object my_array)])
- ($.documentation /.class_for
+ ($.definition /.class_for
"Loads the class as a java.lang.Class object."
[(class_for java/lang/String)])
- ($.documentation /.type
+ ($.definition /.type
""
[(is Type
(type java/lang/String))])
- ($.documentation /.is
+ ($.definition /.is
""
[(is java/lang/Object
(is java/lang/String
diff --git a/stdlib/source/documentation/lux/ffi.lua.lux b/stdlib/source/documentation/lux/ffi.lua.lux
index db5e78eb1..a088496ff 100644
--- a/stdlib/source/documentation/lux/ffi.lua.lux
+++ b/stdlib/source/documentation/lux/ffi.lua.lux
@@ -21,11 +21,11 @@
($.default /.Float)
($.default /.String)
- ($.documentation /.import
+ ($.definition /.import
"Easily import types, methods, functions and constants."
[(import (os/getenv [..String] "io" "?" ..String))])
- ($.documentation /.closure
+ ($.definition /.closure
(format "Allows defining closures/anonymous-functions in the form that Lua expects."
\n "This is useful for adapting Lux functions for usage by Lua code.")
[(is ..Function
diff --git a/stdlib/source/documentation/lux/ffi.old.lux b/stdlib/source/documentation/lux/ffi.old.lux
index e0e667494..eb4b5b8fe 100644
--- a/stdlib/source/documentation/lux/ffi.old.lux
+++ b/stdlib/source/documentation/lux/ffi.old.lux
@@ -17,7 +17,7 @@
($.default /.Inheritance)
(,, (with_template [<name> <from> <to>]
- [($.documentation <name>
+ [($.definition <name>
"Type converter.")]
[/.byte_to_long "java.lang.Byte" "java.lang.Long"]
@@ -51,7 +51,7 @@
[/.char_to_long "java.lang.Character" "java.lang.Long"]
))
- ($.documentation /.class
+ ($.definition /.class
"Allows defining JVM classes in Lux code."
[(class "final" (TestClass A) [Runnable]
... Fields
@@ -80,12 +80,12 @@
"(::new! []) for calling the class's constructor."
"(::resolve! container [value]) for calling the 'resolve' method."])
- ($.documentation /.interface
+ ($.definition /.interface
"Allows defining JVM interfaces."
[(interface TestInterface
([] foo [boolean String] void "throws" [Exception]))])
- ($.documentation /.object
+ ($.definition /.object
"Allows defining anonymous classes."
["The 1st tuple corresponds to class-level type-variables."
"The 2nd tuple corresponds to parent interfaces."
@@ -97,25 +97,25 @@
(exec (do_something some_value)
[])))])
- ($.documentation /.null
+ ($.definition /.null
"Null object reference."
(null))
- ($.documentation /.null?
+ ($.definition /.null?
"Test for null object reference."
[(= (null? (null))
true)]
[(= (null? "YOLO")
false)])
- ($.documentation /.???
+ ($.definition /.???
"Takes a (potentially null) ObjectType reference and creates a (Maybe ObjectType) for it."
[(= (??? (is java/lang/String (null)))
{.#None})]
[(= (??? "YOLO")
{.#Some "YOLO"})])
- ($.documentation /.!!!
+ ($.definition /.!!!
"Takes a (Maybe ObjectType) and returns a ObjectType."
[(= "foo"
(!!! (??? "foo")))]
@@ -123,14 +123,14 @@
(= (null)
(!!! (??? (is java/lang/Thread (null)))))])
- ($.documentation /.check
+ ($.definition /.check
(format "Checks whether an object is an instance of a particular class."
\n "Caveat emptor: Cannot check for polymorphism, so avoid using parameterized classes.")
[(case (check java/lang/String "YOLO")
{.#Some value_as_string}
{.#None})])
- ($.documentation /.synchronized
+ ($.definition /.synchronized
"Evaluates body, while holding a lock on a given object."
[(synchronized object_to_be_locked
(exec
@@ -138,13 +138,13 @@
(do_something else)
(finish the computation)))])
- ($.documentation /.to
+ ($.definition /.to
"Call a variety of methods on an object. Then, return the object."
[(to object
(ClassName::method0 arg0 arg1 arg2)
(ClassName::method1 arg3 arg4 arg5))])
- ($.documentation /.import
+ ($.definition /.import
(format "Allows importing JVM classes, and using them as types."
\n "Their methods, fields and enum options can also be imported.")
[(import java/lang/Object
@@ -192,28 +192,28 @@
(java/util/List::size [] my_list)
java/lang/Character$UnicodeScript::LATIN])
- ($.documentation /.array
+ ($.definition /.array
"Create an array of the given type, with the given size."
[(array java/lang/Object 10)])
- ($.documentation /.length
+ ($.definition /.length
"Gives the length of an array."
[(length my_array)])
- ($.documentation /.read!
+ ($.definition /.read!
"Loads an element from an array."
[(read! 10 my_array)])
- ($.documentation /.write!
+ ($.definition /.write!
"Stores an element into an array."
[(write! 10 my_object my_array)])
- ($.documentation /.class_for
+ ($.definition /.class_for
"Loads the class as a java.lang.Class object."
[(is (Primitive "java.lang.Class" ["java.lang.Object"])
(class_for java/lang/String))])
- ($.documentation /.type
+ ($.definition /.type
""
[(is .Type
(type java/lang/String))])]
diff --git a/stdlib/source/documentation/lux/ffi.py.lux b/stdlib/source/documentation/lux/ffi.py.lux
index 734e6c0ab..5ad4b9260 100644
--- a/stdlib/source/documentation/lux/ffi.py.lux
+++ b/stdlib/source/documentation/lux/ffi.py.lux
@@ -21,7 +21,7 @@
($.default /.Float)
($.default /.String)
- ($.documentation /.import
+ ($.definition /.import
"Easily import types, methods, functions and constants."
[(import os
"[1]::[0]"
@@ -45,7 +45,7 @@
("static" getsize [String] "io" "try" Integer)
("static" getmtime [String] "io" "try" Float))])
- ($.documentation /.lambda
+ ($.definition /.lambda
(format "Allows defining closures/anonymous-functions in the form that Python expects."
\n "This is useful for adapting Lux functions for usage by Python code.")
[(is ..Function
diff --git a/stdlib/source/documentation/lux/ffi.rb.lux b/stdlib/source/documentation/lux/ffi.rb.lux
index 3eec0ed72..bcef4c22e 100644
--- a/stdlib/source/documentation/lux/ffi.rb.lux
+++ b/stdlib/source/documentation/lux/ffi.rb.lux
@@ -19,7 +19,7 @@
($.default /.Float)
($.default /.String)
- ($.documentation /.import
+ ($.definition /.import
"Easily import types, methods, functions and constants."
[(import Stat
"[1]::[0]"
diff --git a/stdlib/source/documentation/lux/math/infix.lux b/stdlib/source/documentation/lux/math/infix.lux
index f9b284e44..0e7b51380 100644
--- a/stdlib/source/documentation/lux/math/infix.lux
+++ b/stdlib/source/documentation/lux/math/infix.lux
@@ -12,7 +12,7 @@
(.List $.Module)
($.module /._
""
- [($.documentation /.infix
+ [($.definition /.infix
(format "Infix math syntax."
\n "The rules for infix syntax are simple."
\n "If you want your binary function to work well with it."
diff --git a/stdlib/source/documentation/lux/math/logic/continuous.lux b/stdlib/source/documentation/lux/math/logic/continuous.lux
index d526d2414..1cc6d1c06 100644
--- a/stdlib/source/documentation/lux/math/logic/continuous.lux
+++ b/stdlib/source/documentation/lux/math/logic/continuous.lux
@@ -23,7 +23,7 @@
($.default /.not)
($.default /.=)
- ($.documentation /.implies
+ ($.definition /.implies
""
[(implies consequent antecedent)])]
[]))
diff --git a/stdlib/source/documentation/lux/math/logic/fuzzy.lux b/stdlib/source/documentation/lux/math/logic/fuzzy.lux
index 9e3cb5df1..33926d7db 100644
--- a/stdlib/source/documentation/lux/math/logic/fuzzy.lux
+++ b/stdlib/source/documentation/lux/math/logic/fuzzy.lux
@@ -20,38 +20,38 @@
($.default /.complement)
($.default /.of_set)
- ($.documentation (/.Fuzzy it)
+ ($.definition (/.Fuzzy it)
"A fuzzy set.")
- ($.documentation /.membership
+ ($.definition /.membership
""
[(membership set elem)])
- ($.documentation /.difference
+ ($.definition /.difference
""
[(difference sub base)])
- ($.documentation /.of_predicate
+ ($.definition /.of_predicate
""
[(of_predicate predicate)])
- ($.documentation /.predicate
+ ($.definition /.predicate
""
[(predicate treshold set)])
- ($.documentation /.gradient
+ ($.definition /.gradient
""
[(gradient from to)])
- ($.documentation /.triangle
+ ($.definition /.triangle
""
[(triangle bottom middle top)])
- ($.documentation /.trapezoid
+ ($.definition /.trapezoid
""
[(trapezoid bottom middle_bottom middle_top top)])
- ($.documentation /.cut
+ ($.definition /.cut
""
[(cut treshold set)])]
[]))
diff --git a/stdlib/source/documentation/lux/math/modular.lux b/stdlib/source/documentation/lux/math/modular.lux
index 76c93b01b..a30b9b0be 100644
--- a/stdlib/source/documentation/lux/math/modular.lux
+++ b/stdlib/source/documentation/lux/math/modular.lux
@@ -35,14 +35,14 @@
($.default /.inverse)
($.default /.moduli_are_not_equal)
- ($.documentation (/.Mod %)
+ ($.definition (/.Mod %)
"A number under a modulus.")
- ($.documentation /.modular
+ ($.definition /.modular
""
[(modular modulus value)])
- ($.documentation /.adapter
+ ($.definition /.adapter
""
[(adapter reference subject)])]
[]))
diff --git a/stdlib/source/documentation/lux/math/modulus.lux b/stdlib/source/documentation/lux/math/modulus.lux
index bc0fb952d..3a4d4d043 100644
--- a/stdlib/source/documentation/lux/math/modulus.lux
+++ b/stdlib/source/documentation/lux/math/modulus.lux
@@ -17,15 +17,15 @@
($.default /.divisor)
($.default /.=)
- ($.documentation (/.Modulus %)
+ ($.definition (/.Modulus %)
(format "A number used as a modulus in modular arithmetic."
\n "It cannot be 0."))
- ($.documentation /.congruent?
+ ($.definition /.congruent?
""
[(congruent? modulus reference subject)])
- ($.documentation /.literal
+ ($.definition /.literal
""
["Success!"
(literal 123)]
diff --git a/stdlib/source/documentation/lux/math/number.lux b/stdlib/source/documentation/lux/math/number.lux
index 7fd74e5a0..a16b5a53c 100644
--- a/stdlib/source/documentation/lux/math/number.lux
+++ b/stdlib/source/documentation/lux/math/number.lux
@@ -24,7 +24,7 @@
($.module /._
""
[(,, (with_template [<name> <encoding> <no_commas> <with_commas>]
- [($.documentation <name>
+ [($.definition <name>
(format "Given syntax for a " <encoding> " number, generates a Nat, an Int, a Rev or a Frac.")
[<no_commas>]
["Allows for the presence of commas (,) among the digits."
diff --git a/stdlib/source/documentation/lux/math/number/complex.lux b/stdlib/source/documentation/lux/math/number/complex.lux
index c615842f2..5063568a9 100644
--- a/stdlib/source/documentation/lux/math/number/complex.lux
+++ b/stdlib/source/documentation/lux/math/number/complex.lux
@@ -49,10 +49,10 @@
($.default /.roots)
($.default /.approximately?)
- ($.documentation /.Complex
+ ($.definition /.Complex
"A complex number.")
- ($.documentation /.complex
+ ($.definition /.complex
"Complex literals."
[(complex real imaginary)]
["The imaginary part can be omitted if it's +0.0."
diff --git a/stdlib/source/documentation/lux/math/number/frac.lux b/stdlib/source/documentation/lux/math/number/frac.lux
index 0b27d0b0f..c6fe1ce19 100644
--- a/stdlib/source/documentation/lux/math/number/frac.lux
+++ b/stdlib/source/documentation/lux/math/number/frac.lux
@@ -66,28 +66,28 @@
($.default /.asech)
($.default /.acsch)
- ($.documentation /.=
+ ($.definition /.=
"Frac(tion) equivalence."
[(= reference sample)])
- ($.documentation /.<
+ ($.definition /.<
"Frac(tion) less-than."
[(< reference sample)])
- ($.documentation /.<=
+ ($.definition /.<=
"Frac(tion) less-than or equal."
[(<= reference sample)])
- ($.documentation /.>
+ ($.definition /.>
"Frac(tion) greater-than."
[(> reference sample)])
- ($.documentation /.>=
+ ($.definition /.>=
"Frac(tion) greater-than or equal."
[(>= reference sample)])
(,, (with_template [<name> <doc>]
- [($.documentation <name>
+ [($.definition <name>
<doc>)]
[/.+ "Frac(tion) addition."]
@@ -97,12 +97,12 @@
[/.% "Frac(tion) remainder."]
))
- ($.documentation /./%
+ ($.definition /./%
""
[(/% param subject)])
(,, (with_template [<name> <doc>]
- [($.documentation <name>
+ [($.definition <name>
<doc>)]
[/.min "Frac(tion) minimum."]
@@ -110,7 +110,7 @@
))
(,, (with_template [<name> <doc>]
- [($.documentation <name>
+ [($.definition <name>
<doc>)]
[/.not_a_number "Not a number."]
@@ -118,36 +118,36 @@
[/.negative_infinity "Negative infinity."]
))
- ($.documentation /.not_a_number?
+ ($.definition /.not_a_number?
"Tests whether a frac is actually not-a-number."
[(not_a_number? it)])
- ($.documentation /.approximately?
+ ($.definition /.approximately?
""
[(approximately? margin_of_error standard value)])
- ($.documentation /.mod
+ ($.definition /.mod
""
[(mod divisor dividend)])
- ($.documentation /.e
+ ($.definition /.e
"The base of the natural logarithm.")
- ($.documentation /.pi
+ ($.definition /.pi
"The ratio of a circle's circumference to its diameter.")
- ($.documentation /.tau
+ ($.definition /.tau
"The ratio of a circle's circumference to its radius.")
- ($.documentation /.pow
+ ($.definition /.pow
""
[(pow param subject)])
- ($.documentation /.atan_2
+ ($.definition /.atan_2
""
[(atan_2 x y)])
- ($.documentation /.log_by
+ ($.definition /.log_by
""
[(log_by base it)])]
[])))
diff --git a/stdlib/source/documentation/lux/math/number/i16.lux b/stdlib/source/documentation/lux/math/number/i16.lux
index 8f0caf9b7..aebc72982 100644
--- a/stdlib/source/documentation/lux/math/number/i16.lux
+++ b/stdlib/source/documentation/lux/math/number/i16.lux
@@ -17,6 +17,6 @@
($.default /.i16)
($.default /.i64)
- ($.documentation /.I16
+ ($.definition /.I16
"A 16-bit integer.")]
[]))
diff --git a/stdlib/source/documentation/lux/math/number/i32.lux b/stdlib/source/documentation/lux/math/number/i32.lux
index 726301ba6..ecf4fdc3d 100644
--- a/stdlib/source/documentation/lux/math/number/i32.lux
+++ b/stdlib/source/documentation/lux/math/number/i32.lux
@@ -17,6 +17,6 @@
($.default /.i32)
($.default /.i64)
- ($.documentation /.I32
+ ($.definition /.I32
"A 32-bit integer.")]
[]))
diff --git a/stdlib/source/documentation/lux/math/number/i64.lux b/stdlib/source/documentation/lux/math/number/i64.lux
index 1481ef25b..bdbd334db 100644
--- a/stdlib/source/documentation/lux/math/number/i64.lux
+++ b/stdlib/source/documentation/lux/math/number/i64.lux
@@ -26,7 +26,7 @@
($.default /.right_rotated)
(,, (with_template [<name> <doc>]
- [($.documentation <name>
+ [($.definition <name>
<doc>)]
[/.or "Bitwise or."]
@@ -37,29 +37,29 @@
[/.right_shifted "Unsigned/logic bitwise right-shift."]
))
- ($.documentation /.Mask
+ ($.definition /.Mask
"A pattern of bits that can be imposed on I64 values.")
- ($.documentation /.bit
+ ($.definition /.bit
"A mask with only a specific bit set."
[(bit position)])
- ($.documentation /.sign
+ ($.definition /.sign
"A mask for the sign bit of ints.")
- ($.documentation /.not
+ ($.definition /.not
"Bitwise negation.")
- ($.documentation /.mask
+ ($.definition /.mask
"Mask a block of bits of the specified size."
[(mask amount_of_bits)])
- ($.documentation /.ones
+ ($.definition /.ones
"Count the number of 1s in a bit-map."
[(ones it)])
(,, (with_template [<name> <doc>]
- [($.documentation <name>
+ [($.definition <name>
<doc>)]
[/.zero "Clear bit at the given index."]
@@ -67,22 +67,22 @@
[/.flipped "Flip bit at given index."]
))
- ($.documentation /.one?
+ ($.definition /.one?
""
[(one? index input)])
- ($.documentation /.zero?
+ ($.definition /.zero?
""
[(zero? index input)])
- ($.documentation /.region
+ ($.definition /.region
"A mask for a block of bits of the given size, starting at the given offset."
[(region offset size)])
- ($.documentation (/.Sub width)
+ ($.definition (/.Sub width)
"A sub-space of I64 with a reduce amount of bits.")
- ($.documentation /.sub
+ ($.definition /.sub
"Given a width in the interval (0,64), yields an implementation for integers of that width."
[(sub width)])]
[])))
diff --git a/stdlib/source/documentation/lux/math/number/i8.lux b/stdlib/source/documentation/lux/math/number/i8.lux
index 5e8e3c870..8ddcecb84 100644
--- a/stdlib/source/documentation/lux/math/number/i8.lux
+++ b/stdlib/source/documentation/lux/math/number/i8.lux
@@ -17,6 +17,6 @@
($.default /.i8)
($.default /.i64)
- ($.documentation /.I8
+ ($.definition /.I8
"A 8-bit integer.")]
[]))
diff --git a/stdlib/source/documentation/lux/math/number/int.lux b/stdlib/source/documentation/lux/math/number/int.lux
index e1494b9ba..b840ff34e 100644
--- a/stdlib/source/documentation/lux/math/number/int.lux
+++ b/stdlib/source/documentation/lux/math/number/int.lux
@@ -33,28 +33,28 @@
($.default /.hex)
($.default /.hash)
- ($.documentation /.=
+ ($.definition /.=
"Int(eger) equivalence."
[(= reference sample)])
- ($.documentation /.<
+ ($.definition /.<
"Int(eger) less-than."
[(< reference sample)])
- ($.documentation /.<=
+ ($.definition /.<=
"Int(eger) less-than or equal."
[(<= reference sample)])
- ($.documentation /.>
+ ($.definition /.>
"Int(eger) greater-than."
[(> reference sample)])
- ($.documentation /.>=
+ ($.definition /.>=
"Int(eger) greater-than or equal."
[(>= reference sample)])
(,, (with_template [<name> <doc>]
- [($.documentation <name>
+ [($.definition <name>
<doc>)]
[/.min "Int(eger) minimum."]
@@ -62,7 +62,7 @@
))
(,, (with_template [<name> <doc>]
- [($.documentation <name>
+ [($.definition <name>
<doc>)]
[/.+ "Int(eger) addition."]
@@ -73,30 +73,30 @@
[/./% "Int(eger) [division remainder]."]
))
- ($.documentation /.opposite
+ ($.definition /.opposite
"A value of equal magnitude and opposite sign.")
- ($.documentation /.abs
+ ($.definition /.abs
"A value of equal magnitude and positive sign.")
- ($.documentation /.signum
+ ($.definition /.signum
"A value (either -1, 0 or +0) which represents the sign.")
- ($.documentation /.mod
+ ($.definition /.mod
(format "Integer modulo."
\n "Note: The modulo and the remainder are not the same.")
[(mod divisor dividend)])
- ($.documentation /.gcd
+ ($.definition /.gcd
"Greatest Common Divisor.")
- ($.documentation /.extended_gcd
+ ($.definition /.extended_gcd
"Extended euclidean algorithm.")
- ($.documentation /.lcm
+ ($.definition /.lcm
"Least Common Multiple.")
- ($.documentation /.right_shifted
+ ($.definition /.right_shifted
"Signed/arithmetic bitwise right-shift."
[(right_shifted parameter subject)])]
[])))
diff --git a/stdlib/source/documentation/lux/math/number/nat.lux b/stdlib/source/documentation/lux/math/number/nat.lux
index ac7c6aa10..c1ae8d81c 100644
--- a/stdlib/source/documentation/lux/math/number/nat.lux
+++ b/stdlib/source/documentation/lux/math/number/nat.lux
@@ -31,7 +31,7 @@
($.default /.hash)
(,, (with_template [<name> <documentation>]
- [($.documentation <name>
+ [($.definition <name>
<documentation>)]
[/.= "Nat(ural) equivalence."]
@@ -48,16 +48,16 @@
))
(,, (with_template [<name> <doc>]
- [($.documentation <name>
+ [($.definition <name>
<doc>)]
[/.min "Nat(ural) minimum."]
[/.max "Nat(ural) maximum."]
))
- ($.documentation /.gcd
+ ($.definition /.gcd
"Greatest Common Divisor.")
- ($.documentation /.lcm
+ ($.definition /.lcm
"Least Common Multiple.")]
[])))
diff --git a/stdlib/source/documentation/lux/math/number/ratio.lux b/stdlib/source/documentation/lux/math/number/ratio.lux
index 7cc00373b..a5c2b8473 100644
--- a/stdlib/source/documentation/lux/math/number/ratio.lux
+++ b/stdlib/source/documentation/lux/math/number/ratio.lux
@@ -30,10 +30,10 @@
($.default /.addition)
($.default /.multiplication)
- ($.documentation /.Ratio
+ ($.definition /.Ratio
"An unsigned ratio of numbers.")
- ($.documentation /.ratio
+ ($.definition /.ratio
"Rational literals."
[(ratio numerator denominator)]
["The denominator can be omitted if it is 1."
diff --git a/stdlib/source/documentation/lux/math/number/rev.lux b/stdlib/source/documentation/lux/math/number/rev.lux
index 1d4c746d6..e0ea88432 100644
--- a/stdlib/source/documentation/lux/math/number/rev.lux
+++ b/stdlib/source/documentation/lux/math/number/rev.lux
@@ -40,28 +40,28 @@
($.default /.hex)
($.default /.decimal)
- ($.documentation /.=
+ ($.definition /.=
"Rev(olution) equivalence."
[(= reference sample)])
- ($.documentation /.<
+ ($.definition /.<
"Rev(olution) less-than."
[(< reference sample)])
- ($.documentation /.<=
+ ($.definition /.<=
"Rev(olution) less-than or equal."
[(<= reference sample)])
- ($.documentation /.>
+ ($.definition /.>
"Rev(olution) greater-than."
[(> reference sample)])
- ($.documentation /.>=
+ ($.definition /.>=
"Rev(olution) greater-than or equal."
[(>= reference sample)])
(,, (with_template [<name> <doc>]
- [($.documentation <name>
+ [($.definition <name>
<doc>)]
[/.min "Rev(olution) minimum."]
@@ -69,7 +69,7 @@
))
(,, (with_template [<name> <doc>]
- [($.documentation <name>
+ [($.definition <name>
<doc>)]
[/.+ "Rev(olution) addition."]
@@ -80,15 +80,15 @@
[/.ratio "Ratio between two rev(olution)s."]
))
- ($.documentation /.up
+ ($.definition /.up
""
[(up scale subject)])
- ($.documentation /.down
+ ($.definition /.down
""
[(down scale subject)])
- ($.documentation /.reciprocal
+ ($.definition /.reciprocal
"Rev(olution) reciprocal of a Nat(ural)."
[(reciprocal numerator)])]
[])))
diff --git a/stdlib/source/documentation/lux/math/random.lux b/stdlib/source/documentation/lux/math/random.lux
index 5f1a41f7d..a67401555 100644
--- a/stdlib/source/documentation/lux/math/random.lux
+++ b/stdlib/source/documentation/lux/math/random.lux
@@ -49,71 +49,71 @@
($.default /.month)
($.default /.day)
- ($.documentation /.PRNG
+ ($.definition /.PRNG
"An abstract way to represent any PRNG.")
- ($.documentation (/.Random it)
+ ($.definition (/.Random it)
"A producer of random values based on a PRNG.")
- ($.documentation /.only
+ ($.definition /.only
"Retries the generator until the output satisfies a predicate."
[(only pred gen)])
- ($.documentation /.one
+ ($.definition /.one
""
[(one check random)])
- ($.documentation /.refined
+ ($.definition /.refined
"Retries the generator until the output can be refined."
[(refined refiner gen)])
- ($.documentation /.safe_frac
+ ($.definition /.safe_frac
"A number in the interval [0.0,1.0].")
- ($.documentation /.text
+ ($.definition /.text
""
[(text char_gen size)])
- ($.documentation /.and
+ ($.definition /.and
"Sequencing combinator."
[(and left right)])
- ($.documentation /.or
+ ($.definition /.or
"Heterogeneous alternative combinator."
[(or left right)])
- ($.documentation /.either
+ ($.definition /.either
"Homogeneous alternative combinator."
[(either left right)])
- ($.documentation /.rec
+ ($.definition /.rec
"A combinator for producing recursive random generators."
[(rec gen)])
- ($.documentation /.set
+ ($.definition /.set
""
[(set hash size value_gen)])
- ($.documentation /.dictionary
+ ($.definition /.dictionary
""
[(dictionary hash size key_gen value_gen)])
- ($.documentation /.result
+ ($.definition /.result
""
[(result prng calc)])
- ($.documentation /.prng
+ ($.definition /.prng
""
[(prng update return)])
- ($.documentation /.pcg_32
+ ($.definition /.pcg_32
(format "An implementation of the PCG32 algorithm."
\n "For more information, please see: http://www.pcg-random.org/"))
- ($.documentation /.xoroshiro_128+
+ ($.definition /.xoroshiro_128+
(format "An implementation of the Xoroshiro128+ algorithm."
\n "For more information, please see: http://xoroshiro.di.unimi.it/"))
- ($.documentation /.split_mix_64
+ ($.definition /.split_mix_64
"An implementation of the SplitMix64 algorithm.")]
[]))
diff --git a/stdlib/source/documentation/lux/meta.lux b/stdlib/source/documentation/lux/meta.lux
index 3e6cdd38e..3c8170e86 100644
--- a/stdlib/source/documentation/lux/meta.lux
+++ b/stdlib/source/documentation/lux/meta.lux
@@ -15,6 +15,7 @@
["[1][0]" symbol]
["[1][0]" type]
["[1][0]" macro]
+ ["[1][0]" static]
["[1][0]" target]
["[1][0]/" compiler
["[1][0]" phase]
@@ -45,143 +46,143 @@
($.default /.lifted)
($.default /.try)
- ($.documentation /.result'
+ ($.definition /.result'
(format "Evaluates a computation that depends on Lux's compiler state."
\n "Also returns a (potentially modified) compiler state.")
[(result' lux action)])
- ($.documentation /.result
+ ($.definition /.result
"Evaluates a computation that depends on Lux's compiler state."
[(result lux action)])
- ($.documentation /.either
+ ($.definition /.either
"Pick whichever computation succeeds."
[(either left right)])
- ($.documentation /.assertion
+ ($.definition /.assertion
"Fails with the given message if the test is #0."
[(assertion message test)])
- ($.documentation /.failure
+ ($.definition /.failure
"Fails with the given error message."
[(failure error)])
- ($.documentation /.module
+ ($.definition /.module
"Looks-up a module with the given name."
[(module name)])
- ($.documentation /.current_module_name
+ ($.definition /.current_module_name
"The name of the module currently being compiled, if any.")
- ($.documentation /.current_module
+ ($.definition /.current_module
"The module currently being compiled, if any.")
- ($.documentation /.normal
+ ($.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)])
- ($.documentation /.macro
+ ($.definition /.macro
"Looks-up a macro known by the given name."
[(macro full_name)])
- ($.documentation /.seed
+ ($.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."))
- ($.documentation /.module_exists?
+ ($.definition /.module_exists?
""
[(module_exists? module)])
- ($.documentation /.var_type
+ ($.definition /.var_type
"Looks-up the type of a local variable somewhere in the environment."
[(var_type name)])
- ($.documentation /.definition
+ ($.definition /.definition
"Looks-up a definition's whole data in the available modules (including the current one)."
[(definition name)])
- ($.documentation /.export
+ ($.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)])
- ($.documentation /.definition_type
+ ($.definition /.definition_type
"Looks-up a definition's type in the available modules (including the current one)."
[(definition_type name)])
- ($.documentation /.type
+ ($.definition /.type
"Looks-up the type of either a local variable or a definition."
[(type name)])
- ($.documentation /.type_definition
+ ($.definition /.type_definition
"Finds the value of a type definition (such as Int, Any or Lux)."
[(type_definition name)])
- ($.documentation /.globals
+ ($.definition /.globals
"The entire list of globals in a module (including the non-exported/private ones)."
[(globals module)])
- ($.documentation /.definitions
+ ($.definition /.definitions
"The entire list of definitions in a module (including the non-exported/private ones)."
[(definitions module)])
- ($.documentation /.exports
+ ($.definition /.exports
"All the exported definitions in a module."
[(exports module_name)])
- ($.documentation /.modules
+ ($.definition /.modules
"All the available modules (including the current one).")
- ($.documentation /.tags_of
+ ($.definition /.tags_of
"All the tags associated with a type definition."
[(tags_of type_name)])
- ($.documentation /.location
+ ($.definition /.location
"The location of the current expression being analyzed.")
- ($.documentation /.expected_type
+ ($.definition /.expected_type
"The expected type of the current expression being analyzed.")
- ($.documentation /.imported_modules
+ ($.definition /.imported_modules
"All the modules imported by a specified module."
[(imported_modules module_name)])
- ($.documentation /.imported_by?
+ ($.definition /.imported_by?
""
[(imported_by? import module)])
- ($.documentation /.imported?
+ ($.definition /.imported?
"Checks if the given module has been imported by the current module."
[(imported? import)])
- ($.documentation /.tag
+ ($.definition /.tag
"Given a tag, finds out what is its index, its related tag-list and its associated type."
[(tag tag_name)])
- ($.documentation /.slot
+ ($.definition /.slot
"Given a slot, finds out what is its index, its related slot-list and its associated type."
[(slot slot_name)])
- ($.documentation /.tag_lists
+ ($.definition /.tag_lists
"All the tag-lists defined in a module, with their associated types."
[(tag_lists module)])
- ($.documentation /.locals
+ ($.definition /.locals
"All the local variables currently in scope, separated in different scopes.")
- ($.documentation /.de_aliased
+ ($.definition /.de_aliased
"Given an aliased definition's name, returns the original definition being referenced."
[(de_aliased def_name)])
- ($.documentation /.compiler_state
+ ($.definition /.compiler_state
"Obtains the current state of the compiler.")
- ($.documentation /.type_context
+ ($.definition /.type_context
"The current type-checking context.")
- ($.documentation /.eval
+ ($.definition /.eval
""
[(eval type code)])]
[/code.documentation
@@ -189,5 +190,6 @@
/symbol.documentation
/type.documentation
/macro.documentation
+ /static.documentation
/target.documentation
../compiler]))
diff --git a/stdlib/source/documentation/lux/meta/code.lux b/stdlib/source/documentation/lux/meta/code.lux
index d1bf31f01..36d3ec0d2 100644
--- a/stdlib/source/documentation/lux/meta/code.lux
+++ b/stdlib/source/documentation/lux/meta/code.lux
@@ -18,16 +18,16 @@
(.List $.Module)
($.module \\parser._
""
- [($.documentation (\\parser.Parser it)
+ [($.definition (\\parser.Parser it)
"A Lux code parser.")
- ($.documentation \\parser.any
+ ($.definition \\parser.any
"Yields the next input without applying any logic.")
(,, (with_template [<query> <check>]
- [(`` ($.documentation <query>
+ [(`` ($.definition <query>
(format "Parses the next " (,, (template.text [<query>])) " input.")))
- (`` ($.documentation <check>
+ (`` ($.definition <check>
(format "Checks for a specific " (,, (template.text [<query>])) " input.")))]
[\\parser.bit \\parser.this_bit]
@@ -39,21 +39,21 @@
[\\parser.symbol \\parser.this_symbol]
))
- ($.documentation \\parser.this
+ ($.definition \\parser.this
"Ensures the given Code is the next input."
[(this code)])
(,, (with_template [<query> <check> <desc>]
- [($.documentation <query>
+ [($.definition <query>
(format "Parse a local " <desc> " (a " <desc> " that has no module prefix)."))
- ($.documentation <check>
+ ($.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>]
- [(`` ($.documentation <name>
+ [(`` ($.definition <name>
(format "Parses the contents of a " (,, (template.text [<name>])) ".")))]
[\\parser.form]
@@ -61,25 +61,25 @@
[\\parser.tuple]
))
- ($.documentation \\parser.end
+ ($.definition \\parser.end
"Verifies there are no more inputs.")
- ($.documentation \\parser.end?
+ ($.definition \\parser.end?
"Checks whether there are no more inputs.")
- ($.documentation \\parser.result
+ ($.definition \\parser.result
"Executes a parser against a stream of code, and verifies all the inputs are consumed."
[(result parser inputs)])
- ($.documentation \\parser.locally
+ ($.definition \\parser.locally
"Runs parser against the given list of inputs."
[(locally inputs parser)])
- ($.documentation \\parser.not
+ ($.definition \\parser.not
"Yields the next Code token if the parser fails."
[(not expected_to_fail)])
- ($.documentation \\parser.next
+ ($.definition \\parser.next
"Yields the next Code token without consuming it from the input stream.")]
[])))
@@ -101,10 +101,10 @@
($.default /.equivalence)
($.default /.format)
- ($.documentation /.local
+ ($.definition /.local
"Produces a local symbol (an symbol with no module prefix).")
- ($.documentation /.replaced
+ ($.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 7daade0e8..1dc0d9b11 100644
--- a/stdlib/source/documentation/lux/meta/compiler/language/lux/analysis.lux
+++ b/stdlib/source/documentation/lux/meta/compiler/language/lux/analysis.lux
@@ -21,26 +21,26 @@
[($.default \\parser.cannot_parse)
($.default \\parser.unconsumed_input)
- ($.documentation (\\parser.Parser it)
+ ($.definition (\\parser.Parser it)
"A parser for Lux code analysis nodes.")
- ($.documentation \\parser.result
+ ($.definition \\parser.result
"Executes a parser and makes sure no inputs go unconsumed."
[(result parser input)])
- ($.documentation \\parser.any
+ ($.definition \\parser.any
"Matches any value, without discrimination.")
- ($.documentation \\parser.end
+ ($.definition \\parser.end
"Ensures there are no more inputs.")
- ($.documentation \\parser.end?
+ ($.definition \\parser.end?
"Checks whether there are no more inputs.")
(,, (with_template [<query> <assertion>]
- [($.documentation <query>
+ [($.definition <query>
(format "Queries for a " (template.text [<query>]) " value."))
- ($.documentation <assertion>
+ ($.definition <assertion>
(format "Assert a specific " (template.text [<query>]) " value."))]
[\\parser.bit \\parser.this_bit]
@@ -54,7 +54,7 @@
[\\parser.constant \\parser.this_constant]
))
- ($.documentation \\parser.tuple
+ ($.definition \\parser.tuple
"Parses only within the context of a tuple's contents."
[(tuple parser)])]
[])))
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 dcfe3ce0a..d852e20ff 100644
--- a/stdlib/source/documentation/lux/meta/compiler/language/lux/synthesis.lux
+++ b/stdlib/source/documentation/lux/meta/compiler/language/lux/synthesis.lux
@@ -24,27 +24,27 @@
($.default \\parser.wrong_arity)
($.default \\parser.empty_input)
- ($.documentation (\\parser.Parser it)
+ ($.definition (\\parser.Parser it)
"A parser for the Lux compiler's synthesis nodes using during optimization.")
- ($.documentation \\parser.result
+ ($.definition \\parser.result
(format "Executes the parser against the inputs."
\n "Ensures all inputs are consumed by the parser.")
[(result parser input)])
- ($.documentation \\parser.any
+ ($.definition \\parser.any
"Yields a synthesis node without subjecting it to any analysis.")
- ($.documentation \\parser.end
+ ($.definition \\parser.end
"Ensures there are no more inputs.")
- ($.documentation \\parser.end?
+ ($.definition \\parser.end?
"Checks whether there are no more inputs.")
(,, (with_template [<query> <assertion>]
- [($.documentation <query>
+ [($.definition <query>
(format "Queries for a " (template.text [<query>]) " synthesis node."))
- ($.documentation <assertion>
+ ($.definition <assertion>
(format "Checks for a specific " (template.text [<query>]) " synthesis node."))]
[\\parser.bit \\parser.this_bit]
@@ -56,15 +56,15 @@
[\\parser.constant \\parser.this_constant]
))
- ($.documentation \\parser.tuple
+ ($.definition \\parser.tuple
"Parses the contents of a tuple."
[(tuple parser)])
- ($.documentation \\parser.function
+ ($.definition \\parser.function
"Parses the body of a function with the 'expected' arity."
[(function expected parser)])
- ($.documentation \\parser.loop
+ ($.definition \\parser.loop
"Parses the initial values and the body of a loop."
[(loop init_parsers iteration_parser)])]
[])))
diff --git a/stdlib/source/documentation/lux/meta/location.lux b/stdlib/source/documentation/lux/meta/location.lux
index 44e7af75b..fa3d7d900 100644
--- a/stdlib/source/documentation/lux/meta/location.lux
+++ b/stdlib/source/documentation/lux/meta/location.lux
@@ -16,11 +16,11 @@
($.default /.dummy)
($.default /.format)
- ($.documentation /.here
+ ($.definition /.here
"The Location of the current form."
[(here)])
- ($.documentation /.with
+ ($.definition /.with
""
[(with location error)])]
[]))
diff --git a/stdlib/source/documentation/lux/meta/macro.lux b/stdlib/source/documentation/lux/meta/macro.lux
index da66da131..6e2557f3f 100644
--- a/stdlib/source/documentation/lux/meta/macro.lux
+++ b/stdlib/source/documentation/lux/meta/macro.lux
@@ -18,29 +18,29 @@
(.List $.Module)
($.module /._
""
- [($.documentation /.single_expansion
+ [($.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)])
- ($.documentation /.expansion
+ ($.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)])
- ($.documentation /.full_expansion
+ ($.definition /.full_expansion
"Expands all macro-calls everywhere recursively, until only primitive/base code remains."
[(full_expansion syntax)])
- ($.documentation /.symbol
+ ($.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)])
- ($.documentation /.wrong_syntax_error
+ ($.definition /.wrong_syntax_error
"A generic error message for macro syntax failures.")
- ($.documentation /.with_symbols
+ ($.definition /.with_symbols
"Creates new symbols and offers them to the body expression."
[(def synchronized
(syntax (_ [lock any
@@ -52,11 +52,11 @@
(, g!_) ("jvm monitorexit" (, g!lock))]
(, g!body))))))))])
- ($.documentation /.one_expansion
+ ($.definition /.one_expansion
"Works just like expand, except that it ensures that the output is a single Code token."
[(one_expansion token)])
- ($.documentation /.log_single_expansion!
+ ($.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).")
@@ -69,7 +69,7 @@
(-> Int Int Int)
(int.+ bar baz)))])
- ($.documentation /.log_expansion!
+ ($.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).")
@@ -82,7 +82,7 @@
(-> Int Int Int)
(int.+ bar baz)))])
- ($.documentation /.log_full_expansion!
+ ($.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).")
diff --git a/stdlib/source/documentation/lux/meta/macro/local.lux b/stdlib/source/documentation/lux/meta/macro/local.lux
index e71a685fb..153b6296a 100644
--- a/stdlib/source/documentation/lux/meta/macro/local.lux
+++ b/stdlib/source/documentation/lux/meta/macro/local.lux
@@ -18,7 +18,7 @@
($.default /.cannot_shadow_definition)
($.default /.unknown_definition)
- ($.documentation /.push
+ ($.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."
diff --git a/stdlib/source/documentation/lux/meta/macro/syntax.lux b/stdlib/source/documentation/lux/meta/macro/syntax.lux
index 30dd6b08a..4e3001f3f 100644
--- a/stdlib/source/documentation/lux/meta/macro/syntax.lux
+++ b/stdlib/source/documentation/lux/meta/macro/syntax.lux
@@ -22,7 +22,7 @@
(.List $.Module)
($.module /._
""
- [($.documentation /.syntax
+ [($.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."
diff --git a/stdlib/source/documentation/lux/meta/macro/syntax/check.lux b/stdlib/source/documentation/lux/meta/macro/syntax/check.lux
index c96bf0cde..a63c5b67f 100644
--- a/stdlib/source/documentation/lux/meta/macro/syntax/check.lux
+++ b/stdlib/source/documentation/lux/meta/macro/syntax/check.lux
@@ -18,6 +18,6 @@
($.default /.format)
($.default /.parser)
- ($.documentation /.Check
+ ($.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 fd9fe1a58..bda1526c5 100644
--- a/stdlib/source/documentation/lux/meta/macro/syntax/declaration.lux
+++ b/stdlib/source/documentation/lux/meta/macro/syntax/declaration.lux
@@ -17,10 +17,10 @@
[($.default /.equivalence)
($.default /.format)
- ($.documentation /.Declaration
+ ($.definition /.Declaration
"A declaration for either a constant or a function.")
- ($.documentation /.parser
+ ($.definition /.parser
"A parser for declaration syntax."
["Such as:"
quux
diff --git a/stdlib/source/documentation/lux/meta/macro/syntax/definition.lux b/stdlib/source/documentation/lux/meta/macro/syntax/definition.lux
index cf4b3225f..12a6e12dd 100644
--- a/stdlib/source/documentation/lux/meta/macro/syntax/definition.lux
+++ b/stdlib/source/documentation/lux/meta/macro/syntax/definition.lux
@@ -18,14 +18,14 @@
($.default /.lacks_type)
($.default /.format)
- ($.documentation /.Definition
+ ($.definition /.Definition
"Syntax for a constant definition.")
- ($.documentation /.parser
+ ($.definition /.parser
"A reader that first macro-expands and then analyses the input Code, to ensure it is a definition."
[(parser compiler)])
- ($.documentation /.typed
+ ($.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 6d23bc8b9..a2b9b2f57 100644
--- a/stdlib/source/documentation/lux/meta/macro/syntax/export.lux
+++ b/stdlib/source/documentation/lux/meta/macro/syntax/export.lux
@@ -16,7 +16,7 @@
"Syntax for marking a definition as an export."
[($.default /.default_policy)
- ($.documentation /.parser
+ ($.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 77a6b7cac..f6f81e081 100644
--- a/stdlib/source/documentation/lux/meta/macro/syntax/input.lux
+++ b/stdlib/source/documentation/lux/meta/macro/syntax/input.lux
@@ -17,9 +17,9 @@
[($.default /.equivalence)
($.default /.format)
- ($.documentation /.Input
+ ($.definition /.Input
"The common typed-argument syntax used by many macros.")
- ($.documentation /.parser
+ ($.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 c29df1817..87a08badd 100644
--- a/stdlib/source/documentation/lux/meta/macro/syntax/type/variable.lux
+++ b/stdlib/source/documentation/lux/meta/macro/syntax/type/variable.lux
@@ -17,9 +17,9 @@
[($.default /.equivalence)
($.default /.format)
- ($.documentation /.Variable
+ ($.definition /.Variable
"A variable's name.")
- ($.documentation /.parser
+ ($.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 e75bbfbd9..b28454262 100644
--- a/stdlib/source/documentation/lux/meta/macro/template.lux
+++ b/stdlib/source/documentation/lux/meta/macro/template.lux
@@ -16,7 +16,7 @@
"Utilities commonly used while templating."
[($.default /.irregular_arguments)
- ($.documentation /.spliced
+ ($.definition /.spliced
""
[(spliced [a b c d])
"=>"
@@ -25,13 +25,13 @@
c
d])
- ($.documentation /.amount
+ ($.definition /.amount
""
[(amount [a b c d])
"=>"
4])
- ($.documentation /.with_locals
+ ($.definition /.with_locals
"Creates names for local bindings aliased by the names you choose."
[(with_locals [my_var]
(let [my_var 123]
@@ -39,13 +39,13 @@
"=>"
"__gensym__my_var506"])
- ($.documentation /.text
+ ($.definition /.text
"A text literal made by concatenating pieces of code."
[(text [#0 123 +456 +789.0 "abc" .def ..ghi])
"=>"
"#0123+456+789.0abcdefghi"])
- ($.documentation /.symbol
+ ($.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])
@@ -55,7 +55,7 @@
"=>"
.abcdefghi])
- ($.documentation /.let
+ ($.definition /.let
"Lexically-bound templates."
[(let [(!square <root>)
[(* <root> <root>)]]
diff --git a/stdlib/source/documentation/lux/meta/static.lux b/stdlib/source/documentation/lux/meta/static.lux
index 9ae73aae8..585cec44f 100644
--- a/stdlib/source/documentation/lux/meta/static.lux
+++ b/stdlib/source/documentation/lux/meta/static.lux
@@ -15,7 +15,7 @@
($.module /._
""
[(,, (with_template [<name> <type>]
- [($.documentation <name>
+ [($.definition <name>
(%.code (' (<name>
(is <type>
(value generating expression))))))]
@@ -27,7 +27,7 @@
[/.text .Text]
))
- ($.documentation /.literal
+ ($.definition /.literal
""
[(/.literal
(is (-> ??? Code)
@@ -36,7 +36,7 @@
(value generating expression)))])
(,, (with_template [<name> <type>]
- [($.documentation <name>
+ [($.definition <name>
(%.code (' (is <type>
(<name>)))))]
@@ -46,7 +46,7 @@
[/.random_frac .Frac]
))
- ($.documentation /.random
+ ($.definition /.random
""
[(/.random
(is (-> ??? Code)
diff --git a/stdlib/source/documentation/lux/meta/symbol.lux b/stdlib/source/documentation/lux/meta/symbol.lux
index 2011a508c..929a54f69 100644
--- a/stdlib/source/documentation/lux/meta/symbol.lux
+++ b/stdlib/source/documentation/lux/meta/symbol.lux
@@ -17,9 +17,9 @@
($.default /.order)
($.default /.codec)
- ($.documentation /.module
+ ($.definition /.module
"The module part of a symbol.")
- ($.documentation /.short
+ ($.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 a10a6e3f5..7a7fd454c 100644
--- a/stdlib/source/documentation/lux/meta/target.lux
+++ b/stdlib/source/documentation/lux/meta/target.lux
@@ -31,7 +31,7 @@
($.default /.r)
($.default /.scheme)
- ($.documentation /.Target
+ ($.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
diff --git a/stdlib/source/documentation/lux/meta/type.lux b/stdlib/source/documentation/lux/meta/type.lux
index f2335eb24..c357029c5 100644
--- a/stdlib/source/documentation/lux/meta/type.lux
+++ b/stdlib/source/documentation/lux/meta/type.lux
@@ -46,59 +46,59 @@
($.default \\parser.recursive_self)
($.default \\parser.recursive_call)
- ($.documentation \\parser.Env
+ ($.definition \\parser.Env
"An environment for type parsing.")
- ($.documentation (\\parser.Parser it)
+ ($.definition (\\parser.Parser it)
"A parser of Lux types.")
- ($.documentation \\parser.fresh
+ ($.definition \\parser.fresh
"An empty parsing environment.")
- ($.documentation \\parser.result
+ ($.definition \\parser.result
(format "Applies a parser against a type."
\n "Verifies that the parser fully consumes the type's information.")
[(result poly type)])
- ($.documentation \\parser.env
+ ($.definition \\parser.env
"Yields the current parsing environment.")
- ($.documentation \\parser.next
+ ($.definition \\parser.next
"Inspect a type in the input stream without consuming it.")
- ($.documentation \\parser.any
+ ($.definition \\parser.any
"Yields a type, without examination.")
- ($.documentation \\parser.local
+ ($.definition \\parser.local
"Apply a parser to the given inputs."
[(local types poly)])
- ($.documentation \\parser.with_extension
+ ($.definition \\parser.with_extension
""
[(with_extension type poly)])
(,, (with_template [<name>]
- [(`` ($.documentation <name>
+ [(`` ($.definition <name>
(format "Parses the contents of a " (,, (template.text [<name>])) " type.")))]
[\\parser.variant]
[\\parser.tuple]
))
- ($.documentation \\parser.polymorphic
+ ($.definition \\parser.polymorphic
""
[(polymorphic poly)])
- ($.documentation \\parser.function
+ ($.definition \\parser.function
"Parses a function's inputs and output."
[(function in_poly out_poly)])
- ($.documentation \\parser.applied
+ ($.definition \\parser.applied
"Parses a type application."
[(applied poly)])
(,, (with_template [<name> <doc>]
- [($.documentation <name>
+ [($.definition <name>
<doc>)]
[\\parser.exactly "Parses a type exactly."]
@@ -106,21 +106,21 @@
[\\parser.super "Parses a super type."]
))
- ($.documentation \\parser.argument
+ ($.definition \\parser.argument
""
[(argument env idx)])
- ($.documentation \\parser.this_parameter
+ ($.definition \\parser.this_parameter
""
[(this_parameter id)])
- ($.documentation \\parser.existential
+ ($.definition \\parser.existential
"Yields an existential type.")
- ($.documentation \\parser.named
+ ($.definition \\parser.named
"Yields a named type.")
- ($.documentation \\parser.recursive
+ ($.definition \\parser.recursive
""
[(recursive poly)])]
[])))
@@ -132,90 +132,90 @@
[($.default /.equivalence)
(,, (with_template [<name>]
- [($.documentation <name>
+ [($.definition <name>
"The number of parameters, and the body, of a quantified type.")]
[/.flat_univ_q]
[/.flat_ex_q]
))
- ($.documentation /.flat_function
+ ($.definition /.flat_function
"The input, and the output of a function type."
[(flat_function type)])
- ($.documentation /.flat_application
+ ($.definition /.flat_application
"The quantified type, and its parameters, for a type-application."
[(flat_application type)])
(,, (with_template [<name>]
- [($.documentation <name>
+ [($.definition <name>
"The members of a composite type.")]
[/.flat_variant]
[/.flat_tuple]
))
- ($.documentation /.format
+ ($.definition /.format
"A (readable) textual representable of a type."
[(format type)])
- ($.documentation /.applied
+ ($.definition /.applied
"To the extend possible, applies a quantified type to the given parameters."
[(applied params func)])
- ($.documentation /.code
+ ($.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)])
- ($.documentation /.de_aliased
+ ($.definition /.de_aliased
"A (potentially named) type that does not have its name shadowed by other names."
[(de_aliased type)])
- ($.documentation /.anonymous
+ ($.definition /.anonymous
"A type without any names covering it."
[(anonymous type)])
(,, (with_template [<name>]
- [($.documentation <name>
+ [($.definition <name>
"A composite type, constituted by the given member types.")]
[/.variant]
[/.tuple]
))
- ($.documentation /.function
+ ($.definition /.function
"A function type, with the given inputs and output."
[(function inputs output)])
- ($.documentation /.application
+ ($.definition /.application
"An un-evaluated type application, with the given quantified type, and parameters."
[(application params quant)])
(,, (with_template [<name>]
- [($.documentation <name>
+ [($.definition <name>
"A quantified type, with the given number of parameters, and body.")]
[/.univ_q]
[/.ex_q]
))
- ($.documentation /.quantified?
+ ($.definition /.quantified?
"Only yields #1 for universally or existentially quantified types."
[(quantified? type)])
- ($.documentation /.array
+ ($.definition /.array
"An array type, with the given level of nesting/depth, and the given element type."
[(array depth element_type)])
- ($.documentation /.flat_array
+ ($.definition /.flat_array
"The level of nesting/depth and element type for an array type."
[(flat_array type)])
- ($.documentation /.array?
+ ($.definition /.array?
"Is a type an array type?")
- ($.documentation /.log!
+ ($.definition /.log!
"Logs to the console/terminal the type of an expression."
[(log! (is Foo (foo expression)))
"=>"
@@ -223,7 +223,7 @@
" Type: Foo"
(foo expression)])
- ($.documentation /.as
+ ($.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.")
@@ -234,7 +234,7 @@
(is (Foo Bit [Nat Text])
(foo expression))))])
- ($.documentation /.sharing
+ ($.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]
@@ -244,7 +244,7 @@
(is (Bar a b c)
(bar expression))))])
- ($.documentation /.by_example
+ ($.definition /.by_example
"Constructs a type that shares type-variables with an expression of some other type."
[(is Type
(by_example [a b c]
@@ -255,7 +255,7 @@
"=>"
(.type_literal (Bar Bit Nat Text))])
- ($.documentation /.let
+ ($.definition /.let
"Local bindings for types."
[(let [side (Either Int Frac)]
(List [side side]))])]
diff --git a/stdlib/source/documentation/lux/meta/type/check.lux b/stdlib/source/documentation/lux/meta/type/check.lux
index f9d19f78b..312eba27d 100644
--- a/stdlib/source/documentation/lux/meta/type/check.lux
+++ b/stdlib/source/documentation/lux/meta/type/check.lux
@@ -24,54 +24,54 @@
($.default /.peek)
($.default /.read)
- ($.documentation /.Var
+ ($.definition /.Var
"The ID for a type-variable in a type-checking context.")
- ($.documentation (/.Check it)
+ ($.definition (/.Check it)
"A type-checking computation which may fail or yield a value.")
- ($.documentation /.result
+ ($.definition /.result
""
[(result context proc)])
- ($.documentation /.failure
+ ($.definition /.failure
""
[(failure message)])
- ($.documentation /.assertion
+ ($.definition /.assertion
""
[(assertion message test)])
- ($.documentation /.except
+ ($.definition /.except
""
[(except exception message)])
- ($.documentation /.existential
+ ($.definition /.existential
"A brand-new existential type.")
- ($.documentation /.bind
+ ($.definition /.bind
(format "Attemmpts to buy a type-variable."
\n "Fails if the variable has been bound already.")
[(bind type id)])
- ($.documentation /.var
+ ($.definition /.var
"A brand-new (unbound) type-variable.")
- ($.documentation /.fresh_context
+ ($.definition /.fresh_context
"An empty/un-used type-checking context.")
- ($.documentation /.check
+ ($.definition /.check
"Type-check to ensure that the 'expected' type subsumes the 'actual' type."
[(check expected actual)])
- ($.documentation /.subsumes?
+ ($.definition /.subsumes?
"A simple type-checking function that just returns a yes/no answer."
[(subsumes? expected actual)])
- ($.documentation /.context
+ ($.definition /.context
"The current state of the type-checking context.")
- ($.documentation /.clean
+ ($.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 8340126cd..7224fa3cf 100644
--- a/stdlib/source/documentation/lux/meta/type/dynamic.lux
+++ b/stdlib/source/documentation/lux/meta/type/dynamic.lux
@@ -15,15 +15,15 @@
[($.default /.wrong_type)
($.default /.format)
- ($.documentation /.Dynamic
+ ($.definition /.Dynamic
"A value coupled with its type, so it can be checked later.")
- ($.documentation /.dynamic
+ ($.definition /.dynamic
""
[(is Dynamic
(dynamic 123))])
- ($.documentation /.static
+ ($.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 d3ee56899..001435ce8 100644
--- a/stdlib/source/documentation/lux/meta/type/implicit.lux
+++ b/stdlib/source/documentation/lux/meta/type/implicit.lux
@@ -12,7 +12,7 @@
(.List $.Module)
($.module /._
""
- [($.documentation /.a/an
+ [($.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,"
@@ -36,13 +36,13 @@
["(Functor List) each"
(a/an each ++ (list.indices 10))])
- ($.documentation /.with
+ ($.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)))])
- ($.documentation /.implicitly
+ ($.definition /.implicitly
"Establish local definitions for implementations that will be prioritized over foreign definitions."
[(implicitly n.multiplication)
diff --git a/stdlib/source/documentation/lux/meta/type/poly.lux b/stdlib/source/documentation/lux/meta/type/poly.lux
index e5317320a..26cd6c823 100644
--- a/stdlib/source/documentation/lux/meta/type/poly.lux
+++ b/stdlib/source/documentation/lux/meta/type/poly.lux
@@ -18,7 +18,7 @@
""
[($.default /.polytypic)
- ($.documentation /.code
+ ($.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 9e1cf4f4f..1f042cb52 100644
--- a/stdlib/source/documentation/lux/meta/type/primitive.lux
+++ b/stdlib/source/documentation/lux/meta/type/primitive.lux
@@ -12,18 +12,18 @@
(.List $.Module)
($.module /._
""
- [($.documentation /.Frame
+ [($.definition /.Frame
"Meta-data about an abstract/nominal type in a stack of them.")
- ($.documentation /.current
+ ($.definition /.current
"The currently-being-defined abstract/nominal type.")
- ($.documentation /.specific
+ ($.definition /.specific
"A specific abstract/nominal type still being defined somewhere in the scope."
[(specific name)])
(,, (with_template [<name> <from> <$> <to>]
- [($.documentation <name>
+ [($.definition <name>
"Type-casting macro for abstract/nominal types."
[(|> value
(is <from>)
@@ -34,7 +34,7 @@
[/.representation Abstraction representation Representation]
))
- ($.documentation /.primitive
+ ($.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
@@ -100,7 +100,7 @@
(representation body)
"}"))))])
- ($.documentation /.transmutation
+ ($.definition /.transmutation
"Transmutes an abstract/nominal type's phantom types."
[(primitive (JavaScript a)
Text
diff --git a/stdlib/source/documentation/lux/meta/type/quotient.lux b/stdlib/source/documentation/lux/meta/type/quotient.lux
index c68949188..a8c16fd4b 100644
--- a/stdlib/source/documentation/lux/meta/type/quotient.lux
+++ b/stdlib/source/documentation/lux/meta/type/quotient.lux
@@ -17,19 +17,19 @@
($.default /.label)
($.default /.equivalence)
- ($.documentation (/.Class value label)
+ ($.definition (/.Class value label)
"The class knows how to classify/label values that are meant to be equivalent to one another.")
- ($.documentation (/.Quotient value label)
+ ($.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."))
- ($.documentation /.quotient
+ ($.definition /.quotient
""
[(quotient class value)])
- ($.documentation /.type
+ ($.definition /.type
"The Quotient type associated with a Class type."
[(def even
(class even?))
diff --git a/stdlib/source/documentation/lux/meta/type/refinement.lux b/stdlib/source/documentation/lux/meta/type/refinement.lux
index cc9019d71..0ae9d91f0 100644
--- a/stdlib/source/documentation/lux/meta/type/refinement.lux
+++ b/stdlib/source/documentation/lux/meta/type/refinement.lux
@@ -15,30 +15,30 @@
[($.default /.value)
($.default /.predicate)
- ($.documentation (/.Refined it)
+ ($.definition (/.Refined it)
"A refined version of another type, using a predicate to select valid instances.")
- ($.documentation (/.Refiner it)
+ ($.definition (/.Refiner it)
"A selection mechanism for refined instances of a type.")
- ($.documentation /.refiner
+ ($.definition /.refiner
""
[(refiner predicate)])
- ($.documentation /.lifted
+ ($.definition /.lifted
(format "Yields a function that can work on refined values."
\n "Respects the constraints of the refinement.")
[(lifted transform)])
- ($.documentation /.only
+ ($.definition /.only
""
[(only refiner values)])
- ($.documentation /.partition
+ ($.definition /.partition
"Separates refined values from the un-refined ones."
[(partition refiner values)])
- ($.documentation /.type
+ ($.definition /.type
"The Refined type associated with a Refiner type."
[(def even
(refiner even?))
diff --git a/stdlib/source/documentation/lux/meta/type/resource.lux b/stdlib/source/documentation/lux/meta/type/resource.lux
index da7f24173..6d6596cbf 100644
--- a/stdlib/source/documentation/lux/meta/type/resource.lux
+++ b/stdlib/source/documentation/lux/meta/type/resource.lux
@@ -16,57 +16,57 @@
($.default /.index_cannot_be_repeated)
($.default /.amount_cannot_be_zero)
- ($.documentation (/.Procedure monad input output value)
+ ($.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."))
- ($.documentation (/.Linear monad value)
+ ($.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."))
- ($.documentation (/.Affine monad permissions value)
+ ($.definition (/.Affine monad permissions value)
"A procedure which expands the number of available resources.")
- ($.documentation (/.Relevant monad permissions value)
+ ($.definition (/.Relevant monad permissions value)
"A procedure which reduces the number of available resources.")
- ($.documentation /.run!
+ ($.definition /.run!
""
[(run! monad procedure)])
- ($.documentation /.lifted
+ ($.definition /.lifted
""
[(lifted monad procedure)])
- ($.documentation /.Ordered
+ ($.definition /.Ordered
"The mode of keys which CANNOT be swapped, and for whom order of release/consumption matters.")
- ($.documentation /.Commutative
+ ($.definition /.Commutative
"The mode of keys which CAN be swapped, and for whom order of release/consumption DOES NOT matters.")
- ($.documentation (/.Key mode key)
+ ($.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."))
- ($.documentation (/.Res key value)
+ ($.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>]
- [($.documentation <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]
))
- ($.documentation /.read
+ ($.definition /.read
"Access the value of a resource, so long as its key is available."
[(read monad resource)])
- ($.documentation /.exchange
+ ($.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.")
@@ -79,7 +79,7 @@
(in (format left right)))])
(,, (with_template [<name>]
- [($.documentation <name>
+ [($.definition <name>
"Group/un-group keys in the keyring into/out-of tuples."
[(do (monad !)
[res|left (commutative ! pre)
diff --git a/stdlib/source/documentation/lux/meta/type/unit.lux b/stdlib/source/documentation/lux/meta/type/unit.lux
index 79e2ce918..e2ecdf84d 100644
--- a/stdlib/source/documentation/lux/meta/type/unit.lux
+++ b/stdlib/source/documentation/lux/meta/type/unit.lux
@@ -38,33 +38,33 @@
($.default /.*)
($.default /./)
- ($.documentation (/.Measure unit)
+ ($.definition (/.Measure unit)
"A quantity with an associated unit of measurement.")
- ($.documentation (/.Unit unit)
+ ($.definition (/.Unit unit)
"A unit of measurement, to qualify numbers with.")
- ... ($.documentation (/.Scale scale)
+ ... ($.definition (/.Scale scale)
... "A scale of magnitude.")
- ... ($.documentation /.Pure
+ ... ($.definition /.Pure
... "A pure, unit-less measure.")
- ($.documentation /.unit
+ ($.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 []))])
- ... ($.documentation /.scale
+ ... ($.definition /.scale
... "Define a scale of magnitude."
... [(def bajillion (scale [1 1,234,567,890]))])
- ... ($.documentation /.re_scaled
+ ... ($.definition /.re_scaled
... ""
... [(re_scaled from to measure)])
... (,, (with_template [<type> <scale>]
- ... [(`` ($.documentation <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) "."))))]
@@ -79,7 +79,7 @@
... ))
(,, (with_template [<unit>]
- [(`` ($.documentation <unit>
+ [(`` ($.definition <unit>
(format "The '" (,, (template.text [<unit>])) "' unit of meaurement.")))]
[/.gram]
diff --git a/stdlib/source/documentation/lux/meta/type/variance.lux b/stdlib/source/documentation/lux/meta/type/variance.lux
index 5d0845693..fa6c3e36f 100644
--- a/stdlib/source/documentation/lux/meta/type/variance.lux
+++ b/stdlib/source/documentation/lux/meta/type/variance.lux
@@ -15,12 +15,12 @@
(.List $.Module)
($.module /._
""
- [($.documentation (/.Co it)
+ [($.definition (/.Co it)
"A constraint for covariant types.")
- ($.documentation (/.Contra it)
+ ($.definition (/.Contra it)
"A constraint for contravariant types.")
- ($.documentation (/.In it)
+ ($.definition (/.In it)
"A constraint for invariant types.")]
[]))
diff --git a/stdlib/source/documentation/lux/program.lux b/stdlib/source/documentation/lux/program.lux
index 4617fafa1..60f433db2 100644
--- a/stdlib/source/documentation/lux/program.lux
+++ b/stdlib/source/documentation/lux/program.lux
@@ -15,36 +15,36 @@
(.List $.Module)
($.module \\parser._
""
- [($.documentation (\\parser.Parser it)
+ [($.definition (\\parser.Parser it)
"A command-line interface parser.")
- ($.documentation \\parser.result
+ ($.definition \\parser.result
"Executes the parser and verifies that all inputs are processed."
[(result parser inputs)])
- ($.documentation \\parser.any
+ ($.definition \\parser.any
"Just returns the next input without applying any logic.")
- ($.documentation \\parser.parse
+ ($.definition \\parser.parse
"Parses the next input with a parsing function."
[(parse parser)])
- ($.documentation \\parser.this
+ ($.definition \\parser.this
"Checks that a token is in the inputs."
[(this reference)])
- ($.documentation \\parser.somewhere
+ ($.definition \\parser.somewhere
"Given a parser, tries to parse it somewhere in the inputs (i.e. not necessarily parsing the immediate inputs)."
[(somewhere cli)])
- ($.documentation \\parser.end
+ ($.definition \\parser.end
"Ensures there are no more inputs.")
- ($.documentation \\parser.named
+ ($.definition \\parser.named
"Parses a named parameter and yields its value."
[(named name value)])
- ($.documentation \\parser.parameter
+ ($.definition \\parser.parameter
"Parses a parameter that can have either a short or a long name."
[(parameter [short long] value)])]
[]))
@@ -53,7 +53,7 @@
(.List $.Module)
($.module /._
""
- [($.documentation /.program:
+ [($.definition /.program:
"Defines the entry-point to a program (similar to the 'main' function/method in other programming languages)."
["Can take a list of all the input parameters to the program."
(program: all_arguments
diff --git a/stdlib/source/documentation/lux/test.lux b/stdlib/source/documentation/lux/test.lux
index 4c76f2278..289f668f1 100644
--- a/stdlib/source/documentation/lux/test.lux
+++ b/stdlib/source/documentation/lux/test.lux
@@ -15,90 +15,90 @@
[($.default /.must_try_test_at_least_once)
($.default /.error_during_execution)
- ($.documentation /.Tally
+ ($.definition /.Tally
"A record of successes and failures while executing tests.")
- ($.documentation /.Assertion
+ ($.definition /.Assertion
"An asynchronous operation that yields test results.")
- ($.documentation /.Test
+ ($.definition /.Test
"A test that relies on random data generation to thoroughly cover different scenarios.")
- ($.documentation /.and'
+ ($.definition /.and'
"Sequencing combinator (for assertions)."
[(and' left right)])
- ($.documentation /.and
+ ($.definition /.and
"Sequencing combinator."
[(and left right)])
- ($.documentation /.context
+ ($.definition /.context
"Adds a contextual description to a test's documentation."
[(context description)])
- ($.documentation /.failure
+ ($.definition /.failure
"A failing test, with a given error message.")
- ($.documentation /.assertion
+ ($.definition /.assertion
"Check that a condition is #1, and fail with the given message otherwise."
[(assertion message condition)])
- ($.documentation /.property
+ ($.definition /.property
"Check that a condition is #1, and fail with the given message otherwise."
[(property message condition)])
- ($.documentation /.lifted
+ ($.definition /.lifted
""
[(lifted message random)])
- ($.documentation /.Seed
+ ($.definition /.Seed
"The seed value used for random testing (if that feature is used).")
- ($.documentation /.seed
+ ($.definition /.seed
(format "Execute the given test with a specific seed value."
\n "This allows you to reproduce a failing test case as many times as you want while debugging.")
[(seed value test)])
- ($.documentation /.times
+ ($.definition /.times
(format "Allows executing a test several times."
\n "By doing this, it's possible to thoroughly test code with many different scenarios."
\n "This assumes that random data generation is being used in tests instead of fixed/constant inputs.")
[(times amount test)])
- ($.documentation /.run!
+ ($.definition /.run!
(format "Executes a test, and exits the program with either a successful or a failing exit code."
\n "WARNING: This procedure is only meant to be used in (program: ...) forms.")
[(run! test)])
- ($.documentation /.coverage'
+ ($.definition /.coverage'
(format "Specifies a test as covering one or more definitions."
\n "Adds to the test tally information to track which definitions have been tested.")
[(coverage' [definition/0 definition/1 ,,, definition/N]
(is Bit
(some "computation")))])
- ($.documentation /.coverage
+ ($.definition /.coverage
(format "Specifies a test as covering one or more definitions."
\n "Adds to the test tally information to track which definitions have been tested.")
[(coverage [definition/0 definition/1 ,,, definition/N]
(is Bit
(some "computation")))])
- ($.documentation /.for
+ ($.definition /.for
(format "Specifies a context for tests as covering one or more definitions."
\n "Adds to the test tally information to track which definitions have been tested.")
[(for [definition/0 definition/1 ,,, definition/N]
(is Test
some_test))])
- ($.documentation /.covering
+ ($.definition /.covering
(format "Specifies the module being covered by a test."
\n "Adds tracking information to the tally to know which exported definitions in the module need to be covered.")
[(covering .._
(is Test
some_test))])
- ($.documentation /.in_parallel
+ ($.definition /.in_parallel
"Executes multiple tests in parallel (if the host platform supports it) to take advantage of multiple cores."
[(in_parallel tests)])]
[]))
diff --git a/stdlib/source/documentation/lux/tool.lux b/stdlib/source/documentation/lux/tool.lux
deleted file mode 100644
index c5d46aba3..000000000
--- a/stdlib/source/documentation/lux/tool.lux
+++ /dev/null
@@ -1,13 +0,0 @@
-(.require
- [library
- [lux (.except char)
- ["$" documentation]
- [data
- [text (.only \n)
- ["%" \\format (.only format)]]
- [collection
- ["[0]" list]]]]]
- ["[0]" /
- ])
-
-
diff --git a/stdlib/source/documentation/lux/world/console.lux b/stdlib/source/documentation/lux/world/console.lux
index b2a2f1d15..01924beae 100644
--- a/stdlib/source/documentation/lux/world/console.lux
+++ b/stdlib/source/documentation/lux/world/console.lux
@@ -20,18 +20,18 @@
($.default /.default)))
(,, (these))))
- ($.documentation (/.Console !)
+ ($.definition (/.Console !)
"An interface to console/terminal I/O.")
- ($.documentation /.write_line
+ ($.definition /.write_line
"Writes the message on the console and appends a new-line/line-feed at the end."
[(write_line message console)])
- ($.documentation (/.Mock s)
+ ($.definition (/.Mock s)
(format "A mock/simulation of a console."
\n "Useful for testing."))
- ($.documentation /.mock
+ ($.definition /.mock
""
[(mock mock init)])]
[]))))
diff --git a/stdlib/source/documentation/lux/world/environment.lux b/stdlib/source/documentation/lux/world/environment.lux
index 4703069ed..d27256846 100644
--- a/stdlib/source/documentation/lux/world/environment.lux
+++ b/stdlib/source/documentation/lux/world/environment.lux
@@ -15,23 +15,23 @@
""
[($.default \\parser.unknown_property)
- ($.documentation \\parser.Property
+ ($.definition \\parser.Property
"A property in the environment.")
- ($.documentation \\parser.Environment
+ ($.definition \\parser.Environment
"An abstraction for environment variables of a program.")
- ($.documentation (\\parser.Parser it)
+ ($.definition (\\parser.Parser it)
"A parser of environment variables of a program.")
- ($.documentation \\parser.empty
+ ($.definition \\parser.empty
"An empty environment.")
- ($.documentation \\parser.property
+ ($.definition \\parser.property
""
[(property name)])
- ($.documentation \\parser.result
+ ($.definition \\parser.result
(format "Executes a parser against the given environment variables."
\n "Does not check whether all environment variables were parsed, since they're usually an open set.")
[(result parser environment)])]
@@ -45,14 +45,14 @@
($.default /.async)
($.default /.default)
- ($.documentation (/.Environment !)
+ ($.definition (/.Environment !)
"Access to ambient environment data and the capacity to exit the program.")
- ($.documentation /.environment
+ ($.definition /.environment
"Assembles the environment variables available to the program."
[(environment monad program)])
- ($.documentation /.mock
+ ($.definition /.mock
""
[(mock environment home directory)])]
[..\\parser]))
diff --git a/stdlib/source/documentation/lux/world/file.lux b/stdlib/source/documentation/lux/world/file.lux
index 04ba576a5..97a8b0966 100644
--- a/stdlib/source/documentation/lux/world/file.lux
+++ b/stdlib/source/documentation/lux/world/file.lux
@@ -25,39 +25,39 @@
(,, (for @.lua (,, (these))
(,, (these ($.default /.default)))))
- ($.documentation /.Path
+ ($.definition /.Path
"A path to a file or a directory in a file-system.")
- ($.documentation (/.System !)
+ ($.definition (/.System !)
"An interface to a file-system.")
- ($.documentation /.parent
+ ($.definition /.parent
"If a path represents a nested file/directory, extracts its parent directory."
[(parent fs path)])
- ($.documentation /.name
+ ($.definition /.name
"The un-nested name of a file/directory."
[(name fs path)])
- ($.documentation /.rooted
+ ($.definition /.rooted
"A nested path for a file/directory, given a root/parent path and a file/directory name within it."
[(rooted fs parent child)])
- ($.documentation /.exists?
+ ($.definition /.exists?
"Checks if either a file or a directory exists at the given path."
[(exists? monad fs path)])
- ($.documentation /.mock
+ ($.definition /.mock
(format "A purely in-memory simulation of a file-system."
\n "Useful for testing.")
[(mock separator)])
- ($.documentation /.make_directories
+ ($.definition /.make_directories
(format "Creates the directory specified by the given path."
\n "Also, creates every super-directory necessary to make the given path valid.")
[(make_directories monad fs path)])
- ($.documentation /.make_file
+ ($.definition /.make_file
"Creates a new file with the given content if-and-only-if the file does not already exist."
[(make_file monad fs content path)])]
[/watch.documentation]))))
diff --git a/stdlib/source/documentation/lux/world/file/watch.lux b/stdlib/source/documentation/lux/world/file/watch.lux
index 75ca237dd..b1f441915 100644
--- a/stdlib/source/documentation/lux/world/file/watch.lux
+++ b/stdlib/source/documentation/lux/world/file/watch.lux
@@ -24,27 +24,27 @@
($.default /.not_being_watched)
($.default /.cannot_poll_a_non_existent_directory)
- ($.documentation /.Concern
+ ($.definition /.Concern
"A particular concern to watch-out for.")
- ($.documentation /.and
+ ($.definition /.and
""
[(and left right)])
- ($.documentation (/.Watcher !)
+ ($.definition (/.Watcher !)
"Machinery for watching a file-system for changes to files and directories.")
- ($.documentation /.polling
+ ($.definition /.polling
(format "A simple watcher that works for any file-system."
"Polls files and directories to detect changes.")
[(polling fs)])
- ($.documentation /.mock
+ ($.definition /.mock
(format "A fake/emulated watcher."
\n "Must be given a path separator for the file-system.")
[(mock separator)])
- (,, (for @.jvm (,, (these ($.documentation /.default
+ (,, (for @.jvm (,, (these ($.definition /.default
"The default watcher for the default file-system.")))
(,, (these))))]
[]))))
diff --git a/stdlib/source/documentation/lux/world/input/keyboard.lux b/stdlib/source/documentation/lux/world/input/keyboard.lux
index 148cb708b..be9db67b1 100644
--- a/stdlib/source/documentation/lux/world/input/keyboard.lux
+++ b/stdlib/source/documentation/lux/world/input/keyboard.lux
@@ -97,9 +97,9 @@
($.default /.release)
($.default /.press)
- ($.documentation /.Key
+ ($.definition /.Key
"A key from a keyboard, identify by a numeric ID.")
- ($.documentation /.Press
+ ($.definition /.Press
"A key-press for a key.")]
[]))
diff --git a/stdlib/source/documentation/lux/world/locale.lux b/stdlib/source/documentation/lux/world/locale.lux
index b03601d73..1818dcfb2 100644
--- a/stdlib/source/documentation/lux/world/locale.lux
+++ b/stdlib/source/documentation/lux/world/locale.lux
@@ -21,10 +21,10 @@
($.default /.hash)
($.default /.equivalence)
- ($.documentation /.Locale
+ ($.definition /.Locale
"A description of a locale; with territory, (optional) language, and (optional) text-encoding.")
- ($.documentation /.locale
+ ($.definition /.locale
""
[(locale language territory encoding)])]
[/language.documentation
diff --git a/stdlib/source/documentation/lux/world/locale/language.lux b/stdlib/source/documentation/lux/world/locale/language.lux
index cc0f4e7be..a9d5f6ef6 100644
--- a/stdlib/source/documentation/lux/world/locale/language.lux
+++ b/stdlib/source/documentation/lux/world/locale/language.lux
@@ -654,6 +654,6 @@
..items/y
..items/z
- ($.documentation /.Language
+ ($.definition /.Language
"An ISO 639 language.")]
[])))
diff --git a/stdlib/source/documentation/lux/world/locale/territory.lux b/stdlib/source/documentation/lux/world/locale/territory.lux
index 232f18038..eab56ae6a 100644
--- a/stdlib/source/documentation/lux/world/locale/territory.lux
+++ b/stdlib/source/documentation/lux/world/locale/territory.lux
@@ -315,6 +315,6 @@
..items/pqrs
..items/tuvwxyz
- ($.documentation /.Territory
+ ($.definition /.Territory
"An ISO 3166 territory.")]
[])))
diff --git a/stdlib/source/documentation/lux/world/net.lux b/stdlib/source/documentation/lux/world/net.lux
index 5f309dcb4..f2e301d2f 100644
--- a/stdlib/source/documentation/lux/world/net.lux
+++ b/stdlib/source/documentation/lux/world/net.lux
@@ -20,13 +20,13 @@
""
[($.default /.Location)
- ($.documentation /.Address
+ ($.definition /.Address
"A TCP/IP address.")
- ($.documentation /.Port
+ ($.definition /.Port
"A TCP/IP port.")
- ($.documentation /.URL
+ ($.definition /.URL
"A Uniform Resource Locator.")]
[/uri.documentation
/http/client.documentation
diff --git a/stdlib/source/documentation/lux/world/net/http/client.lux b/stdlib/source/documentation/lux/world/net/http/client.lux
index fe77ae817..e5605d57c 100644
--- a/stdlib/source/documentation/lux/world/net/http/client.lux
+++ b/stdlib/source/documentation/lux/world/net/http/client.lux
@@ -21,11 +21,11 @@
(,, (for @.jvm (,, (these ($.default /.default)))
(,, (these))))
- ($.documentation (/.Client !)
+ ($.definition (/.Client !)
"A HTTP client capable of issuing requests to a HTTP server.")
(,, (with_template [<name>]
- [($.documentation <name>
+ [($.definition <name>
(format "A " (text.upper_cased (template.text [<name>])) " request."))]
[/.post]
diff --git a/stdlib/source/documentation/lux/world/net/http/status.lux b/stdlib/source/documentation/lux/world/net/http/status.lux
index 0e38a3e54..94b646d02 100644
--- a/stdlib/source/documentation/lux/world/net/http/status.lux
+++ b/stdlib/source/documentation/lux/world/net/http/status.lux
@@ -16,7 +16,7 @@
($.module /._
""
[(,, (with_template [<name>]
- [($.documentation <name>
+ [($.definition <name>
(|> (template.text [<name>])
(text.replaced "_" " ")
text.upper_cased
diff --git a/stdlib/source/documentation/lux/world/net/uri.lux b/stdlib/source/documentation/lux/world/net/uri.lux
index 64aadc1fd..ab808ab5f 100644
--- a/stdlib/source/documentation/lux/world/net/uri.lux
+++ b/stdlib/source/documentation/lux/world/net/uri.lux
@@ -13,9 +13,9 @@
(.List $.Module)
($.module /._
""
- [($.documentation /.URI
+ [($.definition /.URI
"A Uniform Resource Identifier.")
- ($.documentation /.separator
+ ($.definition /.separator
"A separator for the pieces of a URI.")]
[]))
diff --git a/stdlib/source/documentation/lux/world/output/video/resolution.lux b/stdlib/source/documentation/lux/world/output/video/resolution.lux
index 1a3652c74..a53ea1ff0 100644
--- a/stdlib/source/documentation/lux/world/output/video/resolution.lux
+++ b/stdlib/source/documentation/lux/world/output/video/resolution.lux
@@ -18,11 +18,11 @@
[($.default /.hash)
($.default /.equivalence)
- ($.documentation /.Resolution
+ ($.definition /.Resolution
"A screen resolution.")
(,, (with_template [<name>]
- [($.documentation <name>
+ [($.definition <name>
(let [name (|> (template.text [<name>])
(text.replaced "_" " ")
text.upper_cased)]
diff --git a/stdlib/source/documentation/lux/world/shell.lux b/stdlib/source/documentation/lux/world/shell.lux
index f551aa6ce..9bc4e1978 100644
--- a/stdlib/source/documentation/lux/world/shell.lux
+++ b/stdlib/source/documentation/lux/world/shell.lux
@@ -21,25 +21,25 @@
($.default /.default)))
(,, (these))))
- ($.documentation /.Exit
+ ($.definition /.Exit
"A program exit code.")
- ($.documentation (/.Process !)
+ ($.definition (/.Process !)
"The means for communicating with a program/process being executed by the operating system.")
- ($.documentation /.Command
+ ($.definition /.Command
"A command that can be executed by the operating system.")
- ($.documentation /.Argument
+ ($.definition /.Argument
"A parameter for a command.")
- ($.documentation (/.Shell !)
+ ($.definition (/.Shell !)
"The means for issuing commands to the operating system.")
- ($.documentation (/.Mock s)
+ ($.definition (/.Mock s)
"A simulated process.")
- ($.documentation /.mock
+ ($.definition /.mock
""
[(mock mock init)])]
[]))))
diff --git a/stdlib/source/documentation/lux/world/time.lux b/stdlib/source/documentation/lux/world/time.lux
index f327e942a..177b8b2f6 100644
--- a/stdlib/source/documentation/lux/world/time.lux
+++ b/stdlib/source/documentation/lux/world/time.lux
@@ -30,7 +30,7 @@
($.default /.parser)
(,, (with_template [<name> <doc>]
- [($.documentation <name>
+ [($.definition <name>
<doc>)]
[/.milli_seconds "Number of milli-seconds in a second."]
@@ -39,28 +39,28 @@
[/.hours "Number of hours in an day."]
))
- ($.documentation /.Time
+ ($.definition /.Time
"Time is defined as milliseconds since the start of the day (00:00:00.000).")
- ($.documentation /.midnight
+ ($.definition /.midnight
"The instant corresponding to the start of the day: 00:00:00.000")
- ($.documentation /.of_millis
+ ($.definition /.of_millis
""
[(of_millis milli_seconds)])
- ($.documentation /.Clock
+ ($.definition /.Clock
"A clock marking the specific hour, minute, second, and milli-second in a day.")
- ($.documentation /.clock
+ ($.definition /.clock
""
[(clock time)])
- ($.documentation /.time
+ ($.definition /.time
""
[(time clock)])
- ($.documentation /.codec
+ ($.definition /.codec
(format "Based on ISO 8601."
\n "For example: 21:14:51.827"))]
[/date.documentation
diff --git a/stdlib/source/documentation/lux/world/time/date.lux b/stdlib/source/documentation/lux/world/time/date.lux
index 17fd0143b..6c508233f 100644
--- a/stdlib/source/documentation/lux/world/time/date.lux
+++ b/stdlib/source/documentation/lux/world/time/date.lux
@@ -25,14 +25,14 @@
($.default /.of_days)
($.default /.enum)
- ($.documentation /.Date
+ ($.definition /.Date
"A date specified as a year/month/day triplet.")
- ($.documentation /.date
+ ($.definition /.date
"A date, within the allowed limits."
[(date year month day_of_month)])
- ($.documentation /.codec
+ ($.definition /.codec
(format "Based on ISO 8601."
\n "For example: 2017-01-15"))]
[]))
diff --git a/stdlib/source/documentation/lux/world/time/day.lux b/stdlib/source/documentation/lux/world/time/day.lux
index e7923dfe0..c72d8dbb3 100644
--- a/stdlib/source/documentation/lux/world/time/day.lux
+++ b/stdlib/source/documentation/lux/world/time/day.lux
@@ -22,9 +22,9 @@
($.default /.by_number)
($.default /.hash)
- ($.documentation /.Day
+ ($.definition /.Day
"A day of the week.")
- ($.documentation /.week
+ ($.definition /.week
"All the days, ordered by when they come in a week.")]
[]))
diff --git a/stdlib/source/documentation/lux/world/time/duration.lux b/stdlib/source/documentation/lux/world/time/duration.lux
index 0b9ddaa0b..3cc1a1372 100644
--- a/stdlib/source/documentation/lux/world/time/duration.lux
+++ b/stdlib/source/documentation/lux/world/time/duration.lux
@@ -38,10 +38,10 @@
($.default /.codec)
($.default /.enum)
- ($.documentation /.Duration
+ ($.definition /.Duration
"Durations have a resolution of milli-seconds.")
- ($.documentation /.difference
+ ($.definition /.difference
""
[(difference from to)])]
[]))
diff --git a/stdlib/source/documentation/lux/world/time/instant.lux b/stdlib/source/documentation/lux/world/time/instant.lux
index c5fbe2b01..b06126fc8 100644
--- a/stdlib/source/documentation/lux/world/time/instant.lux
+++ b/stdlib/source/documentation/lux/world/time/instant.lux
@@ -21,36 +21,36 @@
($.default /.time)
($.default /.day_of_week)
- ($.documentation /.Instant
+ ($.definition /.Instant
"Instant is defined as milli-seconds since the epoch.")
- ($.documentation /.span
+ ($.definition /.span
""
[(span from to)])
- ($.documentation /.after
+ ($.definition /.after
""
[(after duration instant)])
- ($.documentation /.relative
+ ($.definition /.relative
""
[(relative instant)])
- ($.documentation /.absolute
+ ($.definition /.absolute
""
[(absolute offset)])
- ($.documentation /.epoch
+ ($.definition /.epoch
"The instant corresponding to 1970-01-01T00:00:00Z.")
- ($.documentation /.codec
+ ($.definition /.codec
(format "Based on ISO 8601."
\n "For example: 2017-01-15T21:14:51.827Z"))
- ($.documentation /.now
+ ($.definition /.now
"Yields the current instant, as measured from the operating-system's clock.")
- ($.documentation /.of_date_time
+ ($.definition /.of_date_time
""
[(of_date_time date time)])]
[]))
diff --git a/stdlib/source/documentation/lux/world/time/month.lux b/stdlib/source/documentation/lux/world/time/month.lux
index 9e9d4dc28..6ad0cc526 100644
--- a/stdlib/source/documentation/lux/world/time/month.lux
+++ b/stdlib/source/documentation/lux/world/time/month.lux
@@ -22,17 +22,17 @@
($.default /.not_a_month_of_the_year)
($.default /.codec)
- ($.documentation /.Month
+ ($.definition /.Month
"A month of the year.")
- ($.documentation /.days
+ ($.definition /.days
"The amount of days of a month."
[(days month)])
- ($.documentation /.leap_year_days
+ ($.definition /.leap_year_days
"The amount of days of a month (in a leap year)."
[(leap_year_days month)])
- ($.documentation /.year
+ ($.definition /.year
"All the months, ordered by when they come in a year.")]
[]))
diff --git a/stdlib/source/documentation/lux/world/time/year.lux b/stdlib/source/documentation/lux/world/time/year.lux
index 1ac6a11ca..93a7c34aa 100644
--- a/stdlib/source/documentation/lux/world/time/year.lux
+++ b/stdlib/source/documentation/lux/world/time/year.lux
@@ -23,26 +23,26 @@
($.default /.equivalence)
($.default /.order)
- ($.documentation /.Year
+ ($.definition /.Year
(format "A year in the gregorian calendar."
\n "Both negative (< 0) and positive (> 0) values are valid, but not 0."
\n "This is because the first year of the gregorian calendar was year 1."))
- ($.documentation /.year
+ ($.definition /.year
"A valid year in the gregorian calendar, if possible."
[(year value)])
- ($.documentation /.days
+ ($.definition /.days
"The amount of days in a typical year.")
- ($.documentation /.Period
+ ($.definition /.Period
"An amount of years.")
- ($.documentation /.leaps
+ ($.definition /.leaps
"The number of leap years in a period of years."
[(leaps year)])
- ($.documentation /.codec
+ ($.definition /.codec
(format "Based on ISO 8601."
\n "For example: 2017"))]
[]))
diff --git a/stdlib/source/library/lux/documentation.lux b/stdlib/source/library/lux/documentation.lux
index adb868db6..1a0c9ce38 100644
--- a/stdlib/source/library/lux/documentation.lux
+++ b/stdlib/source/library/lux/documentation.lux
@@ -592,7 +592,7 @@
(,* (list#each code.local parameters))))])))]
((, g!_) [])))))))))
-(def .public documentation
+(def .public definition
(syntax (_ [[name parameters] ..declaration
extra (<>.some <code>.any)])
(macro.with_symbols [g!_]
diff --git a/stdlib/source/test/lux/documentation.lux b/stdlib/source/test/lux/documentation.lux
index c9d9cbc43..0a306c771 100644
--- a/stdlib/source/test/lux/documentation.lux
+++ b/stdlib/source/test/lux/documentation.lux
@@ -43,8 +43,8 @@
Nat
123)
- (def documentation
- (/.documentation /.documentation
+ (def definition
+ (/.definition /.definition
'definition_description'))
(def .public test
@@ -67,12 +67,12 @@
_
false))
- (_.coverage [/.documentation]
- (case ..documentation
+ (_.coverage [/.definition]
+ (case ..definition
(list documentation)
(and (|> documentation
(the /.#definition)
- (text#= (template.text [/.documentation])))
+ (text#= (template.text [/.definition])))
(|> documentation
(the /.#documentation)
md.markdown
@@ -90,7 +90,7 @@
[]))
super (`` (/.module .._
(,, (template.text ['super_description']))
- [..documentation]
+ [..definition]
[sub]))]
(and (text.contains? (template.text ['sub_description'])
(/.markdown sub))
@@ -98,7 +98,7 @@
(/.markdown super))
(text.contains? (template.text ['super_description'])
(/.markdown super))
- (case ..documentation
+ (case ..definition
(list documentation)
(text.contains? (md.markdown (the /.#documentation documentation))
(/.markdown super))
@@ -111,11 +111,11 @@
[(macro_error <example>)]
[(/.default g!default)]
- [(/.documentation g!default
+ [(/.definition g!default
(,, (template.text ['definition_description'])))]
[(/.module g!default
""
- [..documentation]
+ [..definition]
[sub])]
)))))
)))))