aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/documentation
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/documentation/lux.lux4
-rw-r--r--stdlib/source/documentation/lux/data.lux98
-rw-r--r--stdlib/source/documentation/lux/data/color.lux112
-rw-r--r--stdlib/source/documentation/lux/data/color/named.lux10
-rw-r--r--stdlib/source/documentation/lux/math.lux7
-rw-r--r--stdlib/source/documentation/lux/math/arithmetic/infix.lux (renamed from stdlib/source/documentation/lux/math/infix.lux)0
-rw-r--r--stdlib/source/documentation/lux/math/arithmetic/modular.lux (renamed from stdlib/source/documentation/lux/math/modular.lux)0
-rw-r--r--stdlib/source/documentation/lux/meta.lux4
-rw-r--r--stdlib/source/documentation/lux/meta/compiler/language/lux/translation.lux4
-rw-r--r--stdlib/source/documentation/lux/meta/extension.lux5
10 files changed, 112 insertions, 132 deletions
diff --git a/stdlib/source/documentation/lux.lux b/stdlib/source/documentation/lux.lux
index 13b7e6d8a..0e2454aab 100644
--- a/stdlib/source/documentation/lux.lux
+++ b/stdlib/source/documentation/lux.lux
@@ -601,7 +601,7 @@
[//
[type (.use "[0]" equivalence)]])))
- ($.definition /.at
+ ($.definition /.of
"Allows accessing the value of a implementation's member."
($.example (of codec encoded))
@@ -792,6 +792,8 @@
($.example (same? +5
(+ +2 +3))))
+ ($.alias /.alias?)
+
... ($.definition /.^let
... "Allows you to simultaneously bind and de-structure a value."
... ($.example (def (hash (^let set [member_hash _]))
diff --git a/stdlib/source/documentation/lux/data.lux b/stdlib/source/documentation/lux/data.lux
index 93ecf8753..9f0f9d036 100644
--- a/stdlib/source/documentation/lux/data.lux
+++ b/stdlib/source/documentation/lux/data.lux
@@ -9,20 +9,114 @@
["[1][0]" binary]
["[1][0]" bit]
["[1][0]" collection]
- ["[1][0]" color]
+ ["[1][0]" color
+ ["[1]/[0]" named]]
["[1][0]" format]
["[1][0]" identity]
["[1][0]" product]
["[1][0]" sum]
["[1][0]" text]])
+... (def palette_documentation
+... (syntax (_ [[_ name] <code>.symbol])
+... (in (list (code.text (format "A " (text.replaced "_" "-" name) " palette."))))))
+
+... (`` (def .public documentation
+... (List $.Documentation)
+... (let [encoding (list ($.definition /.of_rgb)
+... ($.definition /.rgb)
+
+... ($.definition /.HSL
+... "Hue-Saturation-Lightness color format.")
+
+... ($.definition /.hsl)
+... ($.definition /.of_hsl)
+
+... ($.definition /.hsb)
+... ($.definition /.of_hsb)
+
+... ($.definition /.HSB
+... "Hue-Saturation-Brightness color format."))
+... transformation (list ($.definition /.gray_scale)
+... ($.definition /.darker)
+... ($.definition /.brighter)
+... ($.definition /.saturated)
+... ($.definition /.un_saturated)
+
+... ($.definition /.complement
+... "The opposite color."
+... ($.example (complement color)))
+
+... ($.definition /.interpolated
+... ""
+... ($.example (interpolated ratio end start))))
+... alpha (list ($.definition /.Alpha
+... "The degree of transparency of a pigment.")
+
+... ($.definition /.transparent
+... "The maximum degree of transparency.")
+
+... ($.definition /.translucent
+... "The medium degree of transparency.")
+
+... ($.definition /.opaque
+... "The minimum degree of transparency."))
+... scheme (list ($.definition /.Spread)
+... ($.definition /.Palette)
+
+... ($.definition /.analogous
+... (palette_documentation /.analogous)
+... ($.example (analogous spread variations color)))
+
+... ($.definition /.monochromatic
+... (palette_documentation /.monochromatic)
+... ($.example (monochromatic spread variations color)))
+
+... (,, (with_template [<name>]
+... [(`` ($.definition <name>
+... (format "A "
+... (text.replaced "_" "-" (,, (template.text [<name>])))
+... " color scheme.")))]
+
+... [/.triad]
+... [/.clash]
+... [/.split_complement]
+... [/.square]
+... [/.tetradic]
+... )))]
+... (list.partial ($.module /._
+... "")
+
+... ($.definition /.Color
+... "A color value, independent of color format.")
+
+... ($.definition /.equivalence)
+... ($.definition /.hash)
+... ($.definition /.black)
+... ($.definition /.white)
+... ($.definition /.addition)
+... ($.definition /.subtraction)
+
+... ($.definition /.Pigment
+... "A color with some degree of transparency.")
+
+... (all list#composite
+... encoding
+... transformation
+... alpha
+... scheme
+
+... /named.documentation
+... )
+... ))))
+
(def .public documentation
(List $.Documentation)
(list.together
(list /binary.documentation
/bit.documentation
/collection.documentation
- /color.documentation
+ /color/named.documentation
/format.documentation
/identity.documentation
/product.documentation
diff --git a/stdlib/source/documentation/lux/data/color.lux b/stdlib/source/documentation/lux/data/color.lux
deleted file mode 100644
index 768fb1ffb..000000000
--- a/stdlib/source/documentation/lux/data/color.lux
+++ /dev/null
@@ -1,112 +0,0 @@
-(.require
- [library
- [lux (.except)
- ["$" documentation]
- [data
- ["[0]" text (.only \n)
- ["%" \\format (.only format)]]
- [collection
- ["[0]" list (.use "[1]#[0]" monoid)]]]
- [meta
- ["[0]" code (.only)
- ["<[1]>" \\parser]]
- [macro
- [syntax (.only syntax)]
- ["[0]" template]]]]]
- [\\library
- ["[0]" /]]
- ["[0]" /
- ["[1][0]" named]])
-
-(def palette_documentation
- (syntax (_ [[_ name] <code>.symbol])
- (in (list (code.text (format "A " (text.replaced "_" "-" name) " palette."))))))
-
-(`` (def .public documentation
- (List $.Documentation)
- (let [encoding (list ($.definition /.of_rgb)
- ($.definition /.rgb)
-
- ($.definition /.HSL
- "Hue-Saturation-Lightness color format.")
-
- ($.definition /.hsl)
- ($.definition /.of_hsl)
-
- ($.definition /.hsb)
- ($.definition /.of_hsb)
-
- ($.definition /.HSB
- "Hue-Saturation-Brightness color format."))
- transformation (list ($.definition /.gray_scale)
- ($.definition /.darker)
- ($.definition /.brighter)
- ($.definition /.saturated)
- ($.definition /.un_saturated)
-
- ($.definition /.complement
- "The opposite color."
- ($.example (complement color)))
-
- ($.definition /.interpolated
- ""
- ($.example (interpolated ratio end start))))
- alpha (list ($.definition /.Alpha
- "The degree of transparency of a pigment.")
-
- ($.definition /.transparent
- "The maximum degree of transparency.")
-
- ($.definition /.translucent
- "The medium degree of transparency.")
-
- ($.definition /.opaque
- "The minimum degree of transparency."))
- scheme (list ($.definition /.Spread)
- ($.definition /.Palette)
-
- ($.definition /.analogous
- (palette_documentation /.analogous)
- ($.example (analogous spread variations color)))
-
- ($.definition /.monochromatic
- (palette_documentation /.monochromatic)
- ($.example (monochromatic spread variations color)))
-
- (,, (with_template [<name>]
- [(`` ($.definition <name>
- (format "A "
- (text.replaced "_" "-" (,, (template.text [<name>])))
- " color scheme.")))]
-
- [/.triad]
- [/.clash]
- [/.split_complement]
- [/.square]
- [/.tetradic]
- )))]
- (list.partial ($.module /._
- "")
-
- ($.definition /.Color
- "A color value, independent of color format.")
-
- ($.definition /.equivalence)
- ($.definition /.hash)
- ($.definition /.black)
- ($.definition /.white)
- ($.definition /.addition)
- ($.definition /.subtraction)
-
- ($.definition /.Pigment
- "A color with some degree of transparency.")
-
- (all list#composite
- encoding
- transformation
- alpha
- scheme
-
- /named.documentation
- )
- ))))
diff --git a/stdlib/source/documentation/lux/data/color/named.lux b/stdlib/source/documentation/lux/data/color/named.lux
index 49eb0847d..fe90ee829 100644
--- a/stdlib/source/documentation/lux/data/color/named.lux
+++ b/stdlib/source/documentation/lux/data/color/named.lux
@@ -12,17 +12,17 @@
["[0]" nat (.use "hex#[0]" hex)]]]]]
[\\library
["[0]" / (.only)
- ["/[1]" // (.only)
+ [//
["[0]" rgb]]]])
(def description
(template (_ <name>)
[($.definition <name>
- (let [[red green blue] (//.rgb <name>)
+ (let [[red green blue] <name>
[_ name] (symbol <name>)]
- (format "R:" (hex#encoded (rgb.number red))
- " G:" (hex#encoded (rgb.number green))
- " B:" (hex#encoded (rgb.number blue))
+ (format "R:" (hex#encoded red)
+ " G:" (hex#encoded green)
+ " B:" (hex#encoded blue)
" | " (text.replaced "_" " " name))))]))
(`` (def .public documentation
diff --git a/stdlib/source/documentation/lux/math.lux b/stdlib/source/documentation/lux/math.lux
index afc959c96..c2ae9b908 100644
--- a/stdlib/source/documentation/lux/math.lux
+++ b/stdlib/source/documentation/lux/math.lux
@@ -8,12 +8,13 @@
[collection
["[0]" list (.use "[1]#[0]" monoid)]]]]]
["[0]" /
- ["[1][0]" infix]
["[1][0]" modulus]
- ["[1][0]" modular]
["[1][0]" number]
["[1][0]" logic]
- ["[1][0]" random]]
+ ["[1][0]" random]
+ [arithmetic
+ ["[1][0]" infix]
+ ["[1][0]" modular]]]
[\\library
["[0]" /]])
diff --git a/stdlib/source/documentation/lux/math/infix.lux b/stdlib/source/documentation/lux/math/arithmetic/infix.lux
index 5b3d00381..5b3d00381 100644
--- a/stdlib/source/documentation/lux/math/infix.lux
+++ b/stdlib/source/documentation/lux/math/arithmetic/infix.lux
diff --git a/stdlib/source/documentation/lux/math/modular.lux b/stdlib/source/documentation/lux/math/arithmetic/modular.lux
index 64d76ae02..64d76ae02 100644
--- a/stdlib/source/documentation/lux/math/modular.lux
+++ b/stdlib/source/documentation/lux/math/arithmetic/modular.lux
diff --git a/stdlib/source/documentation/lux/meta.lux b/stdlib/source/documentation/lux/meta.lux
index f2a72fb32..85ecc6f4b 100644
--- a/stdlib/source/documentation/lux/meta.lux
+++ b/stdlib/source/documentation/lux/meta.lux
@@ -19,7 +19,7 @@
["[1][0]" extension]
["[1][0]" target]
["[1][0]/" compiler
- ["[1][0]" phase]
+ ... ["[1][0]" phase]
[language
[lux
["[1][0]" analysis]
@@ -30,7 +30,7 @@
(def /compiler
(List $.Documentation)
(list.together
- (list /compiler/phase.documentation
+ (list ... /compiler/phase.documentation
/compiler/analysis.documentation
/compiler/declaration.documentation
/compiler/translation.documentation
diff --git a/stdlib/source/documentation/lux/meta/compiler/language/lux/translation.lux b/stdlib/source/documentation/lux/meta/compiler/language/lux/translation.lux
index f37babfcd..0b614941e 100644
--- a/stdlib/source/documentation/lux/meta/compiler/language/lux/translation.lux
+++ b/stdlib/source/documentation/lux/meta/compiler/language/lux/translation.lux
@@ -49,10 +49,6 @@
($.definition /.save!)
($.definition /.learn)
($.definition /.learn_custom)
- ($.definition /.learn_analyser)
- ($.definition /.learn_synthesizer)
- ($.definition /.learn_translator)
- ($.definition /.learn_declaration)
($.definition /.unknown_definition)
($.definition /.remember)
($.definition /.no_context)
diff --git a/stdlib/source/documentation/lux/meta/extension.lux b/stdlib/source/documentation/lux/meta/extension.lux
index 3c81d0205..8e1faf319 100644
--- a/stdlib/source/documentation/lux/meta/extension.lux
+++ b/stdlib/source/documentation/lux/meta/extension.lux
@@ -14,10 +14,9 @@
[macro
["[0]" template]]
[compiler
- ["[0]" phase]
[language
[lux
- [phase
+ ["[0]" phase (.only)
["[0]" declaration]]]]]]]]
[\\library
["[0]" /]])
@@ -40,7 +39,7 @@
($.definition /.translation
""
($.example (translation ("my translation" self phase archive [pass_through <synthesis>.any])
- (phase archive pass_through))))
+ (phase archive pass_through))))
($.definition /.declaration
""