aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/documentation/lux.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/documentation/lux.lux')
-rw-r--r--stdlib/source/documentation/lux.lux52
1 files changed, 26 insertions, 26 deletions
diff --git a/stdlib/source/documentation/lux.lux b/stdlib/source/documentation/lux.lux
index 1d675d339..e8906c6c0 100644
--- a/stdlib/source/documentation/lux.lux
+++ b/stdlib/source/documentation/lux.lux
@@ -39,7 +39,7 @@
["[1][0]" type]
["[1][0]" world]])
-(.def: .public documentation
+(.def .public documentation
(.List $.Module)
($.module /._
""
@@ -146,7 +146,7 @@
(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
- (def: (this will not)
+ (def (this will not)
(Be Defined)
(because it will be (commented out))))])
@@ -239,14 +239,14 @@
(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.")
- [(` (def: (~ name)
+ [(` (def (~ name)
(function ((~' _) (~+ args))
(~ body))))])
(documentation /.`'
(format "Unhygienic quasi-quotation as a macro."
\n "Unquote (~) and unquote-splice (~+) must also be used as forms.")
- [(`' (def: (~ name)
+ [(`' (def (~ name)
(function (_ (~+ args))
(~ body))))])
@@ -282,7 +282,7 @@
""
["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>]
- [(def: .public <name>
+ [(def .public <name>
(-> Int Int)
(+ <diff>))]
@@ -379,7 +379,7 @@
... {#Saturday}
... {#Sunday}))
- ... (def: (weekend? day)
+ ... (def (weekend? day)
... (-> Weekday Bit)
... (case day
... (^or {#Saturday} {#Sunday})
@@ -408,26 +408,26 @@
0 1
_ (* n (factorial (-- n))))))])
- (documentation /.def:
+ (documentation /.def
"Defines global constants/functions."
- [(def: branching_exponent
+ [(def branching_exponent
Int
+5)]
["The type is optional."
- (def: branching_exponent
+ (def branching_exponent
+5)]
- [(def: (pair_list pair)
+ [(def (pair_list pair)
(-> [Code Code] (List Code))
(let [[left right] pair]
(list left right)))]
["Can pattern-match on the inputs to functions."
- (def: (pair_list [left right])
+ (def (pair_list [left right])
(-> [Code Code] (List Code))
(list left right))])
(documentation /.macro
"Macro-definition macro."
- [(def: .public symbol
+ [(def .public symbol
(macro (_ tokens)
(case tokens
(^with_template [<tag>]
@@ -464,9 +464,9 @@
"Express a value that implements an interface."
[(is (Order Int)
(implementation
- (def: equivalence
+ (def equivalence
equivalence)
- (def: (< reference subject)
+ (def (< reference subject)
(< reference subject))
))])
@@ -521,7 +521,7 @@
(documentation /.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)
+ [(def .public (range enum from to)
(All (_ a) (-> (Enum a) a a (List a)))
(let [(open "[0]") enum]
(loop (again [end to
@@ -554,8 +554,8 @@
"Opens a implementation and generates a definition for each of its members (including nested members)."
[(open: "i:[0]" order)
"=>"
- (def: i:= (at order =))
- (def: i:< (at order <))])
+ (def i:= (at order =))
+ (def i:< (at order <))])
(documentation /.|>>
"Similar to the piping macro, but rather than taking an initial object to work on, creates a function for taking it."
@@ -624,7 +624,7 @@
... (documentation /.^template
... "It's similar to template, but meant to be used during pattern-matching."
- ... [(def: (reduced env type)
+ ... [(def (reduced env type)
... (-> (List Type) Type Type)
... (case type
... {.#Primitive name params}
@@ -684,7 +684,7 @@
(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.")
- [(def: test
+ [(def test
Test
(with_expansions
[<tests> (with_template [<function> <parameter> <expected>]
@@ -712,8 +712,8 @@
\n "* Rev"
\n "* Frac"
\n "* Text")
- [(def: my_nat 123)
- (def: my_text "456")
+ [(def my_nat 123)
+ (def my_text "456")
(and (case [my_nat my_text]
(pattern (static [..my_nat ..my_text]))
true
@@ -757,7 +757,7 @@
(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."
- (def: .public (of_list list)
+ (def .public (of_list list)
(All (_ a) (-> (List a) (Sequence a)))
(list#mix add
(is (Sequence (parameter 0))
@@ -776,7 +776,7 @@
... (documentation /.^let
... "Allows you to simultaneously bind and de-structure a value."
- ... [(def: (hash (^let set [member_hash _]))
+ ... [(def (hash (^let set [member_hash _]))
... (list#mix (function (_ elem acc)
... (+ acc
... (at member_hash hash elem)))
@@ -799,7 +799,7 @@
(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.")
- [(def: (square x)
+ [(def (square x)
(-> Int Int)
(undefined))])
@@ -816,7 +816,7 @@
(documentation /.template
(format "Define macros in the style of with_template."
\n "For simple macros that do not need any fancy features.")
- [(def: square
+ [(def square
(template (square x)
(* x x)))])
@@ -839,7 +839,7 @@
(documentation /.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
+ [(def js
"JavaScript")
(for "JVM" (do jvm stuff)