aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/documentation
diff options
context:
space:
mode:
authorEduardo Julian2022-08-11 16:50:42 -0400
committerEduardo Julian2022-08-11 16:50:42 -0400
commite5625dd840a8b8adc76987f649da254335d3d93a (patch)
treefb672669383525d90d462edf8c141f98bc953894 /stdlib/source/documentation
parent065e8a4d8122d4616b570496915d2c0e2c78cd6b (diff)
Improved exception-definition macro.
Diffstat (limited to 'stdlib/source/documentation')
-rw-r--r--stdlib/source/documentation/lux.lux16
-rw-r--r--stdlib/source/documentation/lux/control/concatenative.lux261
-rw-r--r--stdlib/source/documentation/lux/control/exception.lux8
-rw-r--r--stdlib/source/documentation/lux/data/text/encoding.lux21
-rw-r--r--stdlib/source/documentation/lux/math/number/frac.lux293
-rw-r--r--stdlib/source/documentation/lux/meta/compiler/language/lux/synthesis.lux80
-rw-r--r--stdlib/source/documentation/lux/meta/macro/syntax/export.lux2
-rw-r--r--stdlib/source/documentation/lux/meta/target/js.lux122
-rw-r--r--stdlib/source/documentation/lux/meta/target/lua.lux122
-rw-r--r--stdlib/source/documentation/lux/meta/target/ruby.lux33
-rw-r--r--stdlib/source/documentation/lux/world/net/http/status.lux45
11 files changed, 540 insertions, 463 deletions
diff --git a/stdlib/source/documentation/lux.lux b/stdlib/source/documentation/lux.lux
index 21b90e2a6..1cf289c4b 100644
--- a/stdlib/source/documentation/lux.lux
+++ b/stdlib/source/documentation/lux.lux
@@ -43,7 +43,7 @@
/world.documentation
))
-(def all/1-4
+(def all_1/4
(List $.Documentation)
(list ($.definition /.prelude
(format "The name of the prelude module"
@@ -172,7 +172,7 @@
(List (Self a))])])
))
-(def all/2-4
+(def all_2/4
(List $.Documentation)
(list ($.definition /.->
"Function types."
@@ -296,7 +296,7 @@
)])
))
-(`` (def all/3-4
+(`` (def all_3/4
(List $.Documentation)
(list ($.definition /.not
"Bit negation."
@@ -620,7 +620,7 @@
(setter value my_record))])
)))
-(`` (def all/4-4
+(`` (def all_4/4
(List $.Documentation)
(list ($.definition /.revised
"Modifies the value of a record at a given tag, based on some function."
@@ -909,10 +909,10 @@
(def .public documentation
(List $.Documentation)
(all list#composite
- all/1-4
- all/2-4
- all/3-4
- all/4-4
+ all_1/4
+ all_2/4
+ all_3/4
+ all_4/4
..sub_modules
))
diff --git a/stdlib/source/documentation/lux/control/concatenative.lux b/stdlib/source/documentation/lux/control/concatenative.lux
index 6c8b17adf..e72231627 100644
--- a/stdlib/source/documentation/lux/control/concatenative.lux
+++ b/stdlib/source/documentation/lux/control/concatenative.lux
@@ -4,7 +4,9 @@
["$" documentation]
[data
[text
- ["%" \\format (.only format)]]]
+ ["%" \\format (.only format)]]
+ [collection
+ ["[0]" list]]]
[math
[number
["n" nat]
@@ -17,74 +19,9 @@
[\\library
["[0]" /]])
-(`` (def .public documentation
+(`` (def arithmetic
(.List $.Documentation)
- (list ($.module /._
- "")
-
- ($.definition /.value)
-
- ($.definition /.=>
- "Concatenative function types."
- [(=> [Nat] [Nat])]
- [(All (_ a)
- (-> a (=> [] [a])))]
- [(All (_ t)
- (=> [t] []))]
- [(All (_ a b c)
- (=> [a b c] [b c a]))]
- [(All (_ ,,,0 ,,,1)
- (=> [then (=> ,,,0 ,,,1)
- else (=> ,,,0 ,,,1)]
- ,,,0 [Bit then else] ,,,1))])
-
- ($.definition /.apply
- "A generator for functions that turn arity N functions into arity N concatenative functions."
- [(is (=> [Nat] [Nat])
- ((apply 1) ++))])
-
- (,, (with_template [<arity>]
- [(with_expansions [<name> (template.symbol [/._] ["apply_" <arity>])
- <doc> (template.text ["Lift a function of arity " <arity>
- " into a concatenative function of arity " <arity> "."])]
- ($.definition <name>
- <doc>))]
-
- [1] [2] [3] [4]
- [5] [6] [7] [8]
- ))
-
- ($.definition /.push
- "Push a value onto the stack.")
-
- ($.definition /.drop
- "Drop/pop a value from the top of the stack.")
-
- ($.definition /.nip
- "Drop the second-to-last value from the top of the stack.")
-
- ($.definition /.dup
- "Duplicate the top of the stack.")
-
- ($.definition /.swap
- "Swaps the 2 topmost stack values.")
-
- ($.definition /.left_rotation
- "Rotes the 3 topmost stack values to the left.")
-
- ($.definition /.right_rotation
- "Rotes the 3 topmost stack values to the right.")
-
- ($.definition /.&&
- "Groups the 2 topmost stack values as a 2-tuple.")
-
- ($.definition /.left
- "Left-injects the top into sum.")
-
- ($.definition /.right
- "Right-injects the top into sum.")
-
- (,, (with_template [<input> <word> <func>]
+ (list (,, (with_template [<input> <word> <func>]
[(`` ($.definition (,, (template.symbol [/._] [<word>]))
(,, (template.text [<func> " for " <input> " arithmetic."]))))]
@@ -132,63 +69,133 @@
[Frac f/> f.>]
[Frac f/>= f.>=]
))
-
- ($.definition /.if
- "If expression."
- [(same? "then"
- (/.value (|>> (push true)
- (push "then")
- (push "else")
- if)))])
-
- ($.definition /.call
- "Executes an anonymous block on the stack.")
-
- ($.definition /.loop
- "Executes a block as a loop until it yields #0 to stop.")
-
- ($.definition /.dip
- "Executes a block on the stack, save for the topmost value.")
-
- ($.definition /.dip_2
- "Executes a block on the stack, save for the 2 topmost values.")
-
- ($.definition /.do
- "Do-while loop expression."
- [(n.= (++ sample)
- (/.value (|>> (push sample)
- (push (push false))
- (push (|>> (push 1) n/+))
- do while)))])
-
- ($.definition /.while
- "While loop expression."
- [(n.= (n.+ distance start)
- (/.value (|>> (push start)
- (push (|>> dup
- (push start) n/-
- (push distance) n/<))
- (push (|>> (push 1) n/+))
- while)))])
-
- ($.definition /.compose
- "Function composition."
- [(n.= (n.+ 2 sample)
- (/.value (|>> (push sample)
- (push (|>> (push 1) n/+))
- (push (|>> (push 1) n/+))
- compose
- call)))])
-
- ($.definition /.partial
- "Partial application."
- [(n.= (n.+ sample sample)
- (/.value (|>> (push sample)
- (push sample)
- (push n/+)
- partial
- call)))])
-
- ($.definition /.?
- "Choose the top value when #0 and the second-to-top when #1.")
)))
+
+(`` (def .public documentation
+ (.List $.Documentation)
+ (list.partial ($.module /._
+ "")
+
+ ($.definition /.value)
+
+ ($.definition /.=>
+ "Concatenative function types."
+ [(=> [Nat] [Nat])]
+ [(All (_ a)
+ (-> a (=> [] [a])))]
+ [(All (_ t)
+ (=> [t] []))]
+ [(All (_ a b c)
+ (=> [a b c] [b c a]))]
+ [(All (_ ,,,0 ,,,1)
+ (=> [then (=> ,,,0 ,,,1)
+ else (=> ,,,0 ,,,1)]
+ ,,,0 [Bit then else] ,,,1))])
+
+ ($.definition /.apply
+ "A generator for functions that turn arity N functions into arity N concatenative functions."
+ [(is (=> [Nat] [Nat])
+ ((apply 1) ++))])
+
+ (,, (with_template [<arity>]
+ [(with_expansions [<name> (template.symbol [/._] ["apply_" <arity>])
+ <doc> (template.text ["Lift a function of arity " <arity>
+ " into a concatenative function of arity " <arity> "."])]
+ ($.definition <name>
+ <doc>))]
+
+ [1] [2] [3] [4]
+ [5] [6] [7] [8]
+ ))
+
+ ($.definition /.push
+ "Push a value onto the stack.")
+
+ ($.definition /.drop
+ "Drop/pop a value from the top of the stack.")
+
+ ($.definition /.nip
+ "Drop the second-to-last value from the top of the stack.")
+
+ ($.definition /.dup
+ "Duplicate the top of the stack.")
+
+ ($.definition /.swap
+ "Swaps the 2 topmost stack values.")
+
+ ($.definition /.left_rotation
+ "Rotes the 3 topmost stack values to the left.")
+
+ ($.definition /.right_rotation
+ "Rotes the 3 topmost stack values to the right.")
+
+ ($.definition /.&&
+ "Groups the 2 topmost stack values as a 2-tuple.")
+
+ ($.definition /.left
+ "Left-injects the top into sum.")
+
+ ($.definition /.right
+ "Right-injects the top into sum.")
+
+ ($.definition /.if
+ "If expression."
+ [(same? "then"
+ (/.value (|>> (push true)
+ (push "then")
+ (push "else")
+ if)))])
+
+ ($.definition /.call
+ "Executes an anonymous block on the stack.")
+
+ ($.definition /.loop
+ "Executes a block as a loop until it yields #0 to stop.")
+
+ ($.definition /.dip
+ "Executes a block on the stack, save for the topmost value.")
+
+ ($.definition /.dip_2
+ "Executes a block on the stack, save for the 2 topmost values.")
+
+ ($.definition /.do
+ "Do-while loop expression."
+ [(n.= (++ sample)
+ (/.value (|>> (push sample)
+ (push (push false))
+ (push (|>> (push 1) n/+))
+ do while)))])
+
+ ($.definition /.while
+ "While loop expression."
+ [(n.= (n.+ distance start)
+ (/.value (|>> (push start)
+ (push (|>> dup
+ (push start) n/-
+ (push distance) n/<))
+ (push (|>> (push 1) n/+))
+ while)))])
+
+ ($.definition /.compose
+ "Function composition."
+ [(n.= (n.+ 2 sample)
+ (/.value (|>> (push sample)
+ (push (|>> (push 1) n/+))
+ (push (|>> (push 1) n/+))
+ compose
+ call)))])
+
+ ($.definition /.partial
+ "Partial application."
+ [(n.= (n.+ sample sample)
+ (/.value (|>> (push sample)
+ (push sample)
+ (push n/+)
+ partial
+ call)))])
+
+ ($.definition /.?
+ "Choose the top value when #0 and the second-to-top when #1.")
+
+ ..arithmetic
+ )))
diff --git a/stdlib/source/documentation/lux/control/exception.lux b/stdlib/source/documentation/lux/control/exception.lux
index 6d0bbc2dd..27e2a28d5 100644
--- a/stdlib/source/documentation/lux/control/exception.lux
+++ b/stdlib/source/documentation/lux/control/exception.lux
@@ -39,14 +39,14 @@
"Decorate an error message with an Exception and lift it into the error-handling context."
[(except exception message)])
- ($.definition /.exception
+ ($.definition /.def
(format "Define a new exception type."
\n "It mostly just serves as a way to tag error messages for later catching.")
["Simple case:"
- (exception .public some_exception)]
+ (/.def .public some_exception)]
["Complex case:"
- (exception .public [arbitrary type variables] (some_exception [optional Text
- arguments Int])
+ (/.def .public [arbitrary type variables] (some_exception [optional arguments])
+ (/.Exception [Text Int])
optional_body)])
($.definition /.report
diff --git a/stdlib/source/documentation/lux/data/text/encoding.lux b/stdlib/source/documentation/lux/data/text/encoding.lux
index f370ef501..44040dbdd 100644
--- a/stdlib/source/documentation/lux/data/text/encoding.lux
+++ b/stdlib/source/documentation/lux/data/text/encoding.lux
@@ -17,7 +17,7 @@
[($.definition <name>
(format "'" (/.name <name>) "' text encoding. "))]))
-(`` (def all/ibm
+(`` (def all_ibm_1/2
(List $.Documentation)
(list (,, (with_template [<name>]
[(description <name>)]
@@ -60,6 +60,14 @@
[/.ibm_871]
[/.ibm_874]
[/.ibm_875]
+ ))
+ )))
+
+(`` (def all_ibm_2/2
+ (List $.Documentation)
+ (list (,, (with_template [<name>]
+ [(description <name>)]
+
[/.ibm_918]
[/.ibm_921]
[/.ibm_922]
@@ -107,7 +115,7 @@
))
)))
-(`` (def all/iso-mac
+(`` (def all_iso-mac
(List $.Documentation)
(list (,, (with_template [<name>]
[(description <name>)]
@@ -148,7 +156,7 @@
))
)))
-(`` (def all/utf-koi8
+(`` (def all_utf-koi8
(List $.Documentation)
(list (,, (with_template [<name>]
[(description <name>)]
@@ -197,9 +205,10 @@
))
(all list#composite
- all/ibm
- all/iso-mac
- all/utf-koi8
+ all_ibm_1/2
+ all_ibm_2/2
+ all_iso-mac
+ all_utf-koi8
/utf8.documentation
)
)))
diff --git a/stdlib/source/documentation/lux/math/number/frac.lux b/stdlib/source/documentation/lux/math/number/frac.lux
index 5094916d2..d543143f6 100644
--- a/stdlib/source/documentation/lux/math/number/frac.lux
+++ b/stdlib/source/documentation/lux/math/number/frac.lux
@@ -3,152 +3,157 @@
[lux (.except)
["$" documentation]
[data
- ["[0]" text (.only \n)
- ["%" \\format (.only format)]]]]]
+ [collection
+ ["[0]" list]]]]]
[\\library
["[0]" /]])
+(def math
+ (.List $.Documentation)
+ (list ($.definition /.cos)
+ ($.definition /.sin)
+ ($.definition /.tan)
+ ($.definition /.acos)
+ ($.definition /.asin)
+ ($.definition /.atan)
+ ($.definition /.exp)
+ ($.definition /.log)
+ ($.definition /.ceil)
+ ($.definition /.floor)
+ ($.definition /.root_2)
+ ($.definition /.root_3)
+ ($.definition /.round)
+ ($.definition /.factorial)
+ ($.definition /.hypotenuse)
+ ($.definition /.sinh)
+ ($.definition /.csch)
+ ($.definition /.cosh)
+ ($.definition /.sech)
+ ($.definition /.tanh)
+ ($.definition /.coth)
+ ($.definition /.asinh)
+ ($.definition /.acosh)
+ ($.definition /.atanh)
+ ($.definition /.acoth)
+ ($.definition /.asech)
+ ($.definition /.acsch)
+
+ ($.definition /.e
+ "The base of the natural logarithm.")
+
+ ($.definition /.pi
+ "The ratio of a circle's circumference to its diameter.")
+
+ ($.definition /.tau
+ "The ratio of a circle's circumference to its radius.")
+
+ ($.definition /.pow
+ ""
+ [(pow param subject)])
+
+ ($.definition /.atan_2
+ ""
+ [(atan_2 x y)])
+
+ ($.definition /.log_by
+ ""
+ [(log_by base it)])
+ ))
+
(`` (def .public documentation
(.List $.Documentation)
- (list ($.module /._
- "")
-
- ($.definition /.positive?)
- ($.definition /.negative?)
- ($.definition /.zero?)
- ($.definition /.opposite)
- ($.definition /.abs)
- ($.definition /.signum)
- ($.definition /.nat)
- ($.definition /.int)
- ($.definition /.rev)
- ($.definition /.equivalence)
- ($.definition /.order)
- ($.definition /.smallest)
- ($.definition /.biggest)
- ($.definition /.addition)
- ($.definition /.multiplication)
- ($.definition /.minimum)
- ($.definition /.maximum)
- ($.definition /.number?)
- ($.definition /.decimal)
- ($.definition /.bits)
- ($.definition /.of_bits)
- ($.definition /.binary)
- ($.definition /.octal)
- ($.definition /.hex)
- ($.definition /.hash)
-
- ($.definition /.cos)
- ($.definition /.sin)
- ($.definition /.tan)
- ($.definition /.acos)
- ($.definition /.asin)
- ($.definition /.atan)
- ($.definition /.exp)
- ($.definition /.log)
- ($.definition /.ceil)
- ($.definition /.floor)
- ($.definition /.root_2)
- ($.definition /.root_3)
- ($.definition /.round)
- ($.definition /.factorial)
- ($.definition /.hypotenuse)
- ($.definition /.sinh)
- ($.definition /.csch)
- ($.definition /.cosh)
- ($.definition /.sech)
- ($.definition /.tanh)
- ($.definition /.coth)
- ($.definition /.asinh)
- ($.definition /.acosh)
- ($.definition /.atanh)
- ($.definition /.acoth)
- ($.definition /.asech)
- ($.definition /.acsch)
-
- ($.definition /.=
- "Frac(tion) equivalence."
- [(= reference sample)])
-
- ($.definition /.<
- "Frac(tion) less-than."
- [(< reference sample)])
-
- ($.definition /.<=
- "Frac(tion) less-than or equal."
- [(<= reference sample)])
-
- ($.definition /.>
- "Frac(tion) greater-than."
- [(> reference sample)])
-
- ($.definition /.>=
- "Frac(tion) greater-than or equal."
- [(>= reference sample)])
-
- (,, (with_template [<name> <doc>]
- [($.definition <name>
- <doc>)]
-
- [/.+ "Frac(tion) addition."]
- [/.- "Frac(tion) substraction."]
- [/.* "Frac(tion) multiplication."]
- [/./ "Frac(tion) division."]
- [/.% "Frac(tion) remainder."]
- ))
-
- ($.definition /./%
- ""
- [(/% param subject)])
-
- (,, (with_template [<name> <doc>]
- [($.definition <name>
- <doc>)]
-
- [/.min "Frac(tion) minimum."]
- [/.max "Frac(tion) minimum."]
- ))
-
- (,, (with_template [<name> <doc>]
- [($.definition <name>
- <doc>)]
-
- [/.not_a_number "Not a number."]
- [/.positive_infinity "Positive infinity."]
- [/.negative_infinity "Negative infinity."]
- ))
-
- ($.definition /.not_a_number?
- "Tests whether a frac is actually not-a-number."
- [(not_a_number? it)])
-
- ($.definition /.approximately?
- ""
- [(approximately? margin_of_error standard value)])
-
- ($.definition /.mod
- ""
- [(mod divisor dividend)])
-
- ($.definition /.e
- "The base of the natural logarithm.")
-
- ($.definition /.pi
- "The ratio of a circle's circumference to its diameter.")
-
- ($.definition /.tau
- "The ratio of a circle's circumference to its radius.")
-
- ($.definition /.pow
- ""
- [(pow param subject)])
-
- ($.definition /.atan_2
- ""
- [(atan_2 x y)])
-
- ($.definition /.log_by
- ""
- [(log_by base it)])
- )))
+ (list.partial ($.module /._
+ "")
+
+ ($.definition /.positive?)
+ ($.definition /.negative?)
+ ($.definition /.zero?)
+ ($.definition /.opposite)
+ ($.definition /.abs)
+ ($.definition /.signum)
+ ($.definition /.nat)
+ ($.definition /.int)
+ ($.definition /.rev)
+ ($.definition /.equivalence)
+ ($.definition /.order)
+ ($.definition /.smallest)
+ ($.definition /.biggest)
+ ($.definition /.addition)
+ ($.definition /.multiplication)
+ ($.definition /.minimum)
+ ($.definition /.maximum)
+ ($.definition /.number?)
+ ($.definition /.decimal)
+ ($.definition /.bits)
+ ($.definition /.of_bits)
+ ($.definition /.binary)
+ ($.definition /.octal)
+ ($.definition /.hex)
+ ($.definition /.hash)
+
+ ($.definition /.=
+ "Frac(tion) equivalence."
+ [(= reference sample)])
+
+ ($.definition /.<
+ "Frac(tion) less-than."
+ [(< reference sample)])
+
+ ($.definition /.<=
+ "Frac(tion) less-than or equal."
+ [(<= reference sample)])
+
+ ($.definition /.>
+ "Frac(tion) greater-than."
+ [(> reference sample)])
+
+ ($.definition /.>=
+ "Frac(tion) greater-than or equal."
+ [(>= reference sample)])
+
+ (,, (with_template [<name> <doc>]
+ [($.definition <name>
+ <doc>)]
+
+ [/.+ "Frac(tion) addition."]
+ [/.- "Frac(tion) substraction."]
+ [/.* "Frac(tion) multiplication."]
+ [/./ "Frac(tion) division."]
+ [/.% "Frac(tion) remainder."]
+ ))
+
+ ($.definition /./%
+ ""
+ [(/% param subject)])
+
+ (,, (with_template [<name> <doc>]
+ [($.definition <name>
+ <doc>)]
+
+ [/.min "Frac(tion) minimum."]
+ [/.max "Frac(tion) minimum."]
+ ))
+
+ (,, (with_template [<name> <doc>]
+ [($.definition <name>
+ <doc>)]
+
+ [/.not_a_number "Not a number."]
+ [/.positive_infinity "Positive infinity."]
+ [/.negative_infinity "Negative infinity."]
+ ))
+
+ ($.definition /.not_a_number?
+ "Tests whether a frac is actually not-a-number."
+ [(not_a_number? it)])
+
+ ($.definition /.approximately?
+ ""
+ [(approximately? margin_of_error standard value)])
+
+ ($.definition /.mod
+ ""
+ [(mod divisor dividend)])
+
+ ..math
+ )))
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 af6cc479e..8b14adb0e 100644
--- a/stdlib/source/documentation/lux/meta/compiler/language/lux/synthesis.lux
+++ b/stdlib/source/documentation/lux/meta/compiler/language/lux/synthesis.lux
@@ -6,7 +6,7 @@
[text (.only \n)
["%" \\format (.only format)]]
[collection
- ["[0]" list]]]
+ ["[0]" list (.use "[1]#[0]" monoid)]]]
[meta
[macro
["[0]" template]]]]]
@@ -70,6 +70,44 @@
[(loop init_parsers iteration_parser)])
)))
+(def all_templates
+ (List $.Documentation)
+ (list ($.definition /.path/pop)
+ ($.definition /.path/side)
+ ($.definition /.path/member)
+ ($.definition /.side/left)
+ ($.definition /.side/right)
+ ($.definition /.member/left)
+ ($.definition /.member/right)
+ ($.definition /.path/bind)
+ ($.definition /.path/then)
+ ($.definition /.path/alt)
+ ($.definition /.path/seq)
+ ($.definition /.unit)
+ ($.definition /.bit)
+ ($.definition /.i64)
+ ($.definition /.f64)
+ ($.definition /.text)
+ ($.definition /.variant)
+ ($.definition /.tuple)
+ ($.definition /.variable)
+ ($.definition /.constant)
+ ($.definition /.variable/local)
+ ($.definition /.variable/foreign)
+ ($.definition /.branch/when)
+ ($.definition /.branch/let)
+ ($.definition /.branch/if)
+ ($.definition /.branch/get)
+ ($.definition /.loop/again)
+ ($.definition /.loop/scope)
+ ($.definition /.function/abstraction)
+ ($.definition /.function/apply)
+ ($.definition /.!bind_top)
+ ($.definition /.!multi_pop)
+ ($.definition /.simple_left_side)
+ ($.definition /.simple_right_side)
+ ))
+
(def .public documentation
(List $.Documentation)
(list.partial ($.module /._
@@ -95,53 +133,21 @@
($.definition /.Handler)
($.definition /.Bundle)
($.definition /.Path)
- ($.definition /.path/pop)
- ($.definition /.path/side)
- ($.definition /.path/member)
- ($.definition /.side/left)
- ($.definition /.side/right)
- ($.definition /.member/left)
- ($.definition /.member/right)
- ($.definition /.path/bind)
- ($.definition /.path/then)
- ($.definition /.path/alt)
- ($.definition /.path/seq)
($.definition /.Abstraction)
($.definition /.Apply)
- ($.definition /.unit)
($.definition /.with_locals)
($.definition /.locals)
($.definition /.with_currying?)
($.definition /.currying?)
($.definition /.with_new_local)
- ($.definition /.bit)
- ($.definition /.i64)
- ($.definition /.f64)
- ($.definition /.text)
- ($.definition /.variant)
- ($.definition /.tuple)
- ($.definition /.variable)
- ($.definition /.constant)
- ($.definition /.variable/local)
- ($.definition /.variable/foreign)
- ($.definition /.branch/when)
- ($.definition /.branch/let)
- ($.definition /.branch/if)
- ($.definition /.branch/get)
- ($.definition /.loop/again)
- ($.definition /.loop/scope)
- ($.definition /.function/abstraction)
- ($.definition /.function/apply)
($.definition /.%path')
($.definition /.%synthesis)
($.definition /.%path)
($.definition /.equivalence)
($.definition /.hash)
- ($.definition /.!bind_top)
- ($.definition /.!multi_pop)
- ($.definition /.simple_left_side)
- ($.definition /.simple_right_side)
-
- ..\\parser
+ (all list#composite
+ ..all_templates
+ ..\\parser
+ )
))
diff --git a/stdlib/source/documentation/lux/meta/macro/syntax/export.lux b/stdlib/source/documentation/lux/meta/macro/syntax/export.lux
index f436ac551..10191449c 100644
--- a/stdlib/source/documentation/lux/meta/macro/syntax/export.lux
+++ b/stdlib/source/documentation/lux/meta/macro/syntax/export.lux
@@ -15,7 +15,7 @@
(list ($.module /._
"Syntax for marking a definition as an export.")
- ($.definition /.default_policy)
+ ($.definition /.default)
($.definition /.parser
""
diff --git a/stdlib/source/documentation/lux/meta/target/js.lux b/stdlib/source/documentation/lux/meta/target/js.lux
index b52e937f0..0ac24da98 100644
--- a/stdlib/source/documentation/lux/meta/target/js.lux
+++ b/stdlib/source/documentation/lux/meta/target/js.lux
@@ -10,66 +10,13 @@
[\\library
["[0]" /]])
-(def .public documentation
+(def all_statement
(List $.Documentation)
- (list ($.module /._
- "")
-
- ($.definition /.Code)
- ($.definition /.code)
- ($.definition /.Expression)
- ($.definition /.Computation)
- ($.definition /.Location)
- ($.definition /.Statement)
- ($.definition /.Var)
- ($.definition /.Access)
- ($.definition /.Literal)
+ (list ($.definition /.Statement)
($.definition /.Loop)
($.definition /.Label)
- ($.definition /.null)
- ($.definition /.undefined)
- ($.definition /.boolean)
- ($.definition /.number)
- ($.definition /.string)
- ($.definition /.array)
- ($.definition /.var)
- ($.definition /.at)
- ($.definition /.the)
- ($.definition /.apply)
- ($.definition /.do)
- ($.definition /.object)
- ($.definition /.,)
($.definition /.then)
($.definition /.function_definition)
- ($.definition /.function)
- ($.definition /.closure)
- ($.definition /.=)
- ($.definition /.<)
- ($.definition /.<=)
- ($.definition /.>)
- ($.definition /.>=)
- ($.definition /.+)
- ($.definition /.-)
- ($.definition /.*)
- ($.definition /./)
- ($.definition /.%)
- ($.definition /.left_shift)
- ($.definition /.arithmetic_right_shift)
- ($.definition /.logic_right_shift)
- ($.definition /.or)
- ($.definition /.and)
- ($.definition /.bit_xor)
- ($.definition /.bit_or)
- ($.definition /.bit_and)
- ($.definition /.not)
- ($.definition /.bit_not)
- ($.definition /.opposite)
- ($.definition /.to_i32)
- ($.definition /.i32)
- ($.definition /.int)
- ($.definition /.?)
- ($.definition /.type_of)
- ($.definition /.new)
($.definition /.statement)
($.definition /.use_strict)
($.definition /.declare)
@@ -90,9 +37,68 @@
($.definition /.break_at)
($.definition /.continue)
($.definition /.continue_at)
- ($.definition /.++)
- ($.definition /.--)
($.definition /.comment)
($.definition /.switch)
- ($.definition /.not_a_number?)
))
+
+(def .public documentation
+ (List $.Documentation)
+ (list.partial ($.module /._
+ "")
+
+ ($.definition /.Code)
+ ($.definition /.code)
+ ($.definition /.Expression)
+ ($.definition /.Computation)
+ ($.definition /.Location)
+ ($.definition /.Var)
+ ($.definition /.Access)
+ ($.definition /.Literal)
+ ($.definition /.null)
+ ($.definition /.undefined)
+ ($.definition /.boolean)
+ ($.definition /.number)
+ ($.definition /.string)
+ ($.definition /.array)
+ ($.definition /.var)
+ ($.definition /.at)
+ ($.definition /.the)
+ ($.definition /.apply)
+ ($.definition /.do)
+ ($.definition /.object)
+ ($.definition /.,)
+ ($.definition /.function)
+ ($.definition /.closure)
+ ($.definition /.=)
+ ($.definition /.<)
+ ($.definition /.<=)
+ ($.definition /.>)
+ ($.definition /.>=)
+ ($.definition /.+)
+ ($.definition /.-)
+ ($.definition /.*)
+ ($.definition /./)
+ ($.definition /.%)
+ ($.definition /.left_shift)
+ ($.definition /.arithmetic_right_shift)
+ ($.definition /.logic_right_shift)
+ ($.definition /.or)
+ ($.definition /.and)
+ ($.definition /.bit_xor)
+ ($.definition /.bit_or)
+ ($.definition /.bit_and)
+ ($.definition /.not)
+ ($.definition /.bit_not)
+ ($.definition /.opposite)
+ ($.definition /.to_i32)
+ ($.definition /.i32)
+ ($.definition /.int)
+ ($.definition /.?)
+ ($.definition /.type_of)
+ ($.definition /.new)
+ ($.definition /.++)
+ ($.definition /.--)
+ ($.definition /.not_a_number?)
+
+ ..all_statement
+ ))
diff --git a/stdlib/source/documentation/lux/meta/target/lua.lux b/stdlib/source/documentation/lux/meta/target/lua.lux
index 8d7b66680..231242a26 100644
--- a/stdlib/source/documentation/lux/meta/target/lua.lux
+++ b/stdlib/source/documentation/lux/meta/target/lua.lux
@@ -10,60 +10,10 @@
[\\library
["[0]" /]])
-(def .public documentation
+(def all_statement
(List $.Documentation)
- (list ($.module /._
- "")
-
- ($.definition /.Code)
- ($.definition /.equivalence)
- ($.definition /.hash)
- ($.definition /.manual)
- ($.definition /.code)
- ($.definition /.Expression)
- ($.definition /.Computation)
- ($.definition /.Location)
- ($.definition /.Statement)
- ($.definition /.Literal)
- ($.definition /.Var)
- ($.definition /.Access)
+ (list ($.definition /.Statement)
($.definition /.Label)
- ($.definition /.nil)
- ($.definition /.boolean)
- ($.definition /.int)
- ($.definition /.float)
- ($.definition /.string)
- ($.definition /.multi)
- ($.definition /.array)
- ($.definition /.table)
- ($.definition /.item)
- ($.definition /.the)
- ($.definition /.length)
- ($.definition /.apply)
- ($.definition /.do)
- ($.definition /.=)
- ($.definition /.<)
- ($.definition /.<=)
- ($.definition /.>)
- ($.definition /.>=)
- ($.definition /.+)
- ($.definition /.-)
- ($.definition /.*)
- ($.definition /.^)
- ($.definition /./)
- ($.definition /.//)
- ($.definition /.%)
- ($.definition /.concat)
- ($.definition /.or)
- ($.definition /.and)
- ($.definition /.bit_or)
- ($.definition /.bit_and)
- ($.definition /.bit_xor)
- ($.definition /.bit_shl)
- ($.definition /.bit_shr)
- ($.definition /.not)
- ($.definition /.opposite)
- ($.definition /.var)
($.definition /.label)
($.definition /.statement)
($.definition /.then)
@@ -84,10 +34,66 @@
($.definition /.break)
($.definition /.set_label)
($.definition /.go_to)
- ($.definition /.error/1)
- ($.definition /.print/1)
- ($.definition /.require/1)
- ($.definition /.type/1)
- ($.definition /.ipairs/1)
- ($.definition /.error/2)
))
+
+(def .public documentation
+ (List $.Documentation)
+ (list.partial ($.module /._
+ "")
+
+ ($.definition /.Code)
+ ($.definition /.equivalence)
+ ($.definition /.hash)
+ ($.definition /.manual)
+ ($.definition /.code)
+ ($.definition /.Expression)
+ ($.definition /.Computation)
+ ($.definition /.Location)
+ ($.definition /.Literal)
+ ($.definition /.Var)
+ ($.definition /.Access)
+ ($.definition /.nil)
+ ($.definition /.boolean)
+ ($.definition /.int)
+ ($.definition /.float)
+ ($.definition /.string)
+ ($.definition /.multi)
+ ($.definition /.array)
+ ($.definition /.table)
+ ($.definition /.item)
+ ($.definition /.the)
+ ($.definition /.length)
+ ($.definition /.apply)
+ ($.definition /.do)
+ ($.definition /.=)
+ ($.definition /.<)
+ ($.definition /.<=)
+ ($.definition /.>)
+ ($.definition /.>=)
+ ($.definition /.+)
+ ($.definition /.-)
+ ($.definition /.*)
+ ($.definition /.^)
+ ($.definition /./)
+ ($.definition /.//)
+ ($.definition /.%)
+ ($.definition /.concat)
+ ($.definition /.or)
+ ($.definition /.and)
+ ($.definition /.bit_or)
+ ($.definition /.bit_and)
+ ($.definition /.bit_xor)
+ ($.definition /.bit_shl)
+ ($.definition /.bit_shr)
+ ($.definition /.not)
+ ($.definition /.opposite)
+ ($.definition /.var)
+ ($.definition /.error/1)
+ ($.definition /.print/1)
+ ($.definition /.require/1)
+ ($.definition /.type/1)
+ ($.definition /.ipairs/1)
+ ($.definition /.error/2)
+
+ ..all_statement
+ ))
diff --git a/stdlib/source/documentation/lux/meta/target/ruby.lux b/stdlib/source/documentation/lux/meta/target/ruby.lux
index d67257929..593504138 100644
--- a/stdlib/source/documentation/lux/meta/target/ruby.lux
+++ b/stdlib/source/documentation/lux/meta/target/ruby.lux
@@ -6,16 +6,13 @@
[text (.only \n)
["%" \\format (.only format)]]
[collection
- ["[0]" list]]]]]
+ ["[0]" list (.use "[1]#[0]" monoid)]]]]]
[\\library
["[0]" /]])
-(def .public documentation
+(def all_1/3
(List $.Documentation)
- (list ($.module /._
- "")
-
- ($.definition /.Code)
+ (list ($.definition /.Code)
($.definition /.equivalence)
($.definition /.hash)
($.definition /.manual)
@@ -50,7 +47,11 @@
($.definition /.case_insensitivity_flag)
($.definition /.input_record_separator)
($.definition /.output_record_separator)
- ($.definition /.script_name)
+ ))
+
+(def all_2/3
+ (List $.Documentation)
+ (list ($.definition /.script_name)
($.definition /.process_id)
($.definition /.exit_status)
($.definition /.command_line_arguments)
@@ -85,7 +86,11 @@
($.definition /.break)
($.definition /.function)
($.definition /.lambda)
- ($.definition /.=)
+ ))
+
+(def all_3/3
+ (List $.Documentation)
+ (list ($.definition /.=)
($.definition /.<)
($.definition /.<=)
($.definition /.>)
@@ -112,3 +117,15 @@
($.definition /.print/2)
($.definition /.throw/1)
))
+
+(def .public documentation
+ (List $.Documentation)
+ (list.partial ($.module /._
+ "")
+
+ (all list#composite
+ all_1/3
+ all_2/3
+ all_3/3
+ )
+ ))
diff --git a/stdlib/source/documentation/lux/world/net/http/status.lux b/stdlib/source/documentation/lux/world/net/http/status.lux
index 0a65db6dd..03225ca9f 100644
--- a/stdlib/source/documentation/lux/world/net/http/status.lux
+++ b/stdlib/source/documentation/lux/world/net/http/status.lux
@@ -3,25 +3,28 @@
[lux (.except)
["$" documentation]
[data
- ["[0]" text (.only \n)
- ["%" \\format (.only format)]]]
+ ["[0]" text (.only)
+ ["%" \\format (.only format)]]
+ [collection
+ ["[0]" list (.use "[1]#[0]" monoid)]]]
[meta
[macro
["[0]" template]]]]]
[\\library
["[0]" /]])
-(`` (def .public documentation
- (List $.Documentation)
- (list ($.module /._
- "")
+(def description
+ (template (_ <name>)
+ [($.definition <name>
+ (|> (template.text [<name>])
+ (text.replaced "_" " ")
+ text.upper_cased
+ (format (%.nat <name>) ": ")))]))
- (,, (with_template [<name>]
- [($.definition <name>
- (|> (template.text [<name>])
- (text.replaced "_" " ")
- text.upper_cased
- (format (%.nat <name>) ": ")))]
+(`` (def all_100-300
+ (List $.Documentation)
+ (list (,, (with_template [<name>]
+ [(description <name>)]
... 1xx Informational response
[/.continue]
@@ -51,6 +54,13 @@
[/.switch_proxy]
[/.temporary_redirect]
[/.permanent_redirect]
+ ))
+ )))
+
+(`` (def all_400-500
+ (List $.Documentation)
+ (list (,, (with_template [<name>]
+ [(description <name>)]
... 4xx Client errors
[/.bad_request]
@@ -96,3 +106,14 @@
[/.network_authentication_required]
))
)))
+
+(def .public documentation
+ (List $.Documentation)
+ (list.partial ($.module /._
+ "")
+
+ (all list#composite
+ all_100-300
+ all_400-500
+ )
+ ))