aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/documentation
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/documentation')
-rw-r--r--stdlib/source/documentation/lux/control/parser/tree.lux20
-rw-r--r--stdlib/source/documentation/lux/data/collection/list.lux2
-rw-r--r--stdlib/source/documentation/lux/data/product.lux20
-rw-r--r--stdlib/source/documentation/lux/data/sum.lux20
-rw-r--r--stdlib/source/documentation/lux/macro/syntax.lux14
-rw-r--r--stdlib/source/documentation/lux/target/js.lux2
-rw-r--r--stdlib/source/documentation/lux/target/python.lux2
-rw-r--r--stdlib/source/documentation/lux/target/ruby.lux4
-rw-r--r--stdlib/source/documentation/lux/type.lux4
-rw-r--r--stdlib/source/documentation/lux/type/primitive.lux (renamed from stdlib/source/documentation/lux/type/abstract.lux)34
10 files changed, 57 insertions, 65 deletions
diff --git a/stdlib/source/documentation/lux/control/parser/tree.lux b/stdlib/source/documentation/lux/control/parser/tree.lux
index 416b9f910..282fcc7af 100644
--- a/stdlib/source/documentation/lux/control/parser/tree.lux
+++ b/stdlib/source/documentation/lux/control/parser/tree.lux
@@ -1,14 +1,14 @@
(.using
- [library
- [lux "*"
- ["$" documentation {"+" documentation:}]
- [data
- [text {"+" \n}
- ["%" format {"+" format}]]]
- [macro
- ["[0]" template]]]]
- [\\library
- ["[0]" /]])
+ [library
+ [lux {"-" left right}
+ ["$" documentation {"+" documentation:}]
+ [data
+ [text {"+" \n}
+ ["%" format {"+" format}]]]
+ [macro
+ ["[0]" template]]]]
+ [\\library
+ ["[0]" /]])
(documentation: (/.Parser it)
"A parser of arbitrary trees.")
diff --git a/stdlib/source/documentation/lux/data/collection/list.lux b/stdlib/source/documentation/lux/data/collection/list.lux
index 5497350e7..459e1f8c9 100644
--- a/stdlib/source/documentation/lux/data/collection/list.lux
+++ b/stdlib/source/documentation/lux/data/collection/list.lux
@@ -1,6 +1,6 @@
(.using
[library
- [lux "*"
+ [lux {"-" all}
["$" documentation {"+" documentation:}]
[control
["<>" parser
diff --git a/stdlib/source/documentation/lux/data/product.lux b/stdlib/source/documentation/lux/data/product.lux
index 621ea9edb..a437421f5 100644
--- a/stdlib/source/documentation/lux/data/product.lux
+++ b/stdlib/source/documentation/lux/data/product.lux
@@ -1,14 +1,14 @@
(.using
- [library
- [lux {"-" nat int rev list type or and}
- ["$" documentation {"+" documentation:}]
- [data
- [text
- ["%" format {"+" format}]]]
- [macro
- ["[0]" template]]]]
- [\\library
- ["[0]" /]])
+ [library
+ [lux {"-" left right}
+ ["$" documentation {"+" documentation:}]
+ [data
+ [text
+ ["%" format {"+" format}]]]
+ [macro
+ ["[0]" template]]]]
+ [\\library
+ ["[0]" /]])
(documentation: /.left
"The left side of a pair.")
diff --git a/stdlib/source/documentation/lux/data/sum.lux b/stdlib/source/documentation/lux/data/sum.lux
index 7bdd8e54a..8d4a1edc5 100644
--- a/stdlib/source/documentation/lux/data/sum.lux
+++ b/stdlib/source/documentation/lux/data/sum.lux
@@ -1,14 +1,14 @@
(.using
- [library
- [lux "*"
- ["$" documentation {"+" documentation:}]
- [data
- [text {"+" \n}
- ["%" format {"+" format}]]]
- [macro
- ["[0]" template]]]]
- [\\library
- ["[0]" /]])
+ [library
+ [lux {"-" left right}
+ ["$" documentation {"+" documentation:}]
+ [data
+ [text {"+" \n}
+ ["%" format {"+" format}]]]
+ [macro
+ ["[0]" template]]]]
+ [\\library
+ ["[0]" /]])
(documentation: /.left
"Lifts value to the left side of a 2-variant.")
diff --git a/stdlib/source/documentation/lux/macro/syntax.lux b/stdlib/source/documentation/lux/macro/syntax.lux
index c4867ea7a..664439f72 100644
--- a/stdlib/source/documentation/lux/macro/syntax.lux
+++ b/stdlib/source/documentation/lux/macro/syntax.lux
@@ -22,13 +22,13 @@
(format \n "A more advanced way to define macros than 'macro:'."
\n "The inputs to the macro can be parsed in complex ways through the use of syntax parsers."
\n "The macro body is also (implicitly) run in the Meta monad, to save some typing."
- \n "Also, the compiler state can be accessed through the *lux* binding.")
- [(syntax: .public (object [.let [imports (class_imports *lux*)]
- .let [class_vars (list)]
- super (opt (super_class_decl^ imports class_vars))
- interfaces (tuple (some (super_class_decl^ imports class_vars)))
- constructor_args (constructor_args^ imports class_vars)
- methods (some (overriden_method_def^ imports))])
+ \n "Also, the compiler state can be accessed through a special binding.")
+ [(syntax: .public (object lux_state [.let [imports (class_imports lux_state)]
+ .let [class_vars (list)]
+ super (opt (super_class_decl^ imports class_vars))
+ interfaces (tuple (some (super_class_decl^ imports class_vars)))
+ constructor_args (constructor_args^ imports class_vars)
+ methods (some (overriden_method_def^ imports))])
(let [def_code (all text#composite "anon-class:"
(spaced (list (super_class_decl$ (maybe.else object_super_class super))
(with_brackets (spaced (list#each super_class_decl$ interfaces)))
diff --git a/stdlib/source/documentation/lux/target/js.lux b/stdlib/source/documentation/lux/target/js.lux
index 32c800816..744b61310 100644
--- a/stdlib/source/documentation/lux/target/js.lux
+++ b/stdlib/source/documentation/lux/target/js.lux
@@ -34,7 +34,7 @@
($.default /.var)
($.default /.at)
($.default /.the)
- ($.default /.apply_*)
+ ($.default /.apply)
($.default /.do)
($.default /.object)
($.default /.,)
diff --git a/stdlib/source/documentation/lux/target/python.lux b/stdlib/source/documentation/lux/target/python.lux
index 4fa9c05e3..60d5172bd 100644
--- a/stdlib/source/documentation/lux/target/python.lux
+++ b/stdlib/source/documentation/lux/target/python.lux
@@ -48,7 +48,7 @@
($.default /.slice)
($.default /.slice_from)
($.default /.dict)
- ($.default /.apply/*)
+ ($.default /.apply)
($.default /.splat_poly)
($.default /.splat_keyword)
($.default /.the)
diff --git a/stdlib/source/documentation/lux/target/ruby.lux b/stdlib/source/documentation/lux/target/ruby.lux
index f295a437e..0f24c30da 100644
--- a/stdlib/source/documentation/lux/target/ruby.lux
+++ b/stdlib/source/documentation/lux/target/ruby.lux
@@ -62,8 +62,8 @@
($.default /.array_range)
($.default /.array)
($.default /.hash)
- ($.default /.apply/*)
- ($.default /.apply_lambda/*)
+ ($.default /.apply)
+ ($.default /.apply_lambda)
($.default /.the)
($.default /.item)
($.default /.?)
diff --git a/stdlib/source/documentation/lux/type.lux b/stdlib/source/documentation/lux/type.lux
index 957dac26a..f7d1e3f64 100644
--- a/stdlib/source/documentation/lux/type.lux
+++ b/stdlib/source/documentation/lux/type.lux
@@ -13,7 +13,7 @@
[\\library
["[0]" /]]
["[0]" / "_"
- ["[1][0]" abstract]
+ ["[1][0]" primitive]
["[1][0]" check]
["[1][0]" dynamic]
["[1][0]" implicit]
@@ -186,7 +186,7 @@
..by_example
..let
($.default /.equivalence)]
- [/abstract.documentation
+ [/primitive.documentation
/check.documentation
/dynamic.documentation
/implicit.documentation
diff --git a/stdlib/source/documentation/lux/type/abstract.lux b/stdlib/source/documentation/lux/type/primitive.lux
index 4fdf9e3fc..e4a180bfc 100644
--- a/stdlib/source/documentation/lux/type/abstract.lux
+++ b/stdlib/source/documentation/lux/type/primitive.lux
@@ -1,6 +1,6 @@
(.using
[library
- [lux {"-" pattern}
+ [lux "*"
["$" documentation {"+" documentation:}]
[control
["<>" parser
@@ -35,10 +35,10 @@
[/.representation Abstraction representation Representation]
)
-(documentation: /.abstract:
+(documentation: /.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.")
- [(abstract: String
+ [(primitive: String
Text
(def: (string value)
@@ -49,21 +49,21 @@
(-> String Text)
(representation value)))]
["Type-parameters are optional."
- (abstract: (Duplicate a)
+ (primitive: (Duplicate a)
[a a]
(def: (duplicate value)
(All (_ a) (-> a (Duplicate a)))
(abstraction [value value])))]
["Definitions can be nested."
- (abstract: (Single a)
+ (primitive: (Single a)
a
(def: (single value)
(All (_ a) (-> a (Single a)))
(abstraction value))
- (abstract: (Double a)
+ (primitive: (Double a)
[a a]
(def: (double value)
@@ -83,11 +83,11 @@
representation)))))]
["Type-parameters do not necessarily have to be used in the representation type."
"If they are not used, they become phantom types and can be used to customize types without changing the representation."
- (abstract: (JavaScript a)
+ (primitive: (JavaScript a)
Text
- (abstract: Expression Any)
- (abstract: Statement Any)
+ (primitive: Expression Any)
+ (primitive: Statement Any)
(def: (+ x y)
(-> (JavaScript Expression) (JavaScript Expression) (JavaScript Expression))
@@ -103,11 +103,11 @@
(documentation: /.transmutation
"Transmutes an abstract/nominal type's phantom types."
- [(abstract: (JavaScript a)
+ [(primitive: (JavaScript a)
Text
- (abstract: Expression Any)
- (abstract: Statement Any)
+ (primitive: Expression Any)
+ (primitive: Statement Any)
(def: (statement expression)
(-> (JavaScript Expression) (JavaScript Statement))
@@ -117,13 +117,6 @@
(-> (JavaScript Expression) (JavaScript Statement))
(transmutation JavaScript expression)))])
-(documentation: /.pattern
- "Pattern-matching macro to easily extract a representation."
- [(def: (computation abstraction)
- (All (_ a) (-> (Abstract a) ???))
- (let [(pattern value) abstraction]
- (foo (bar (baz value)))))])
-
(.def: .public documentation
(.List $.Module)
($.module /._
@@ -133,8 +126,7 @@
..specific
..abstraction
..representation
- ..abstract:
+ ..primitive:
..transmutation
- ..pattern
($.default /.no_active_frames)]
[]))