aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/documentation/lux.lux
diff options
context:
space:
mode:
authorEduardo Julian2022-04-06 05:24:14 -0400
committerEduardo Julian2022-04-06 05:24:14 -0400
commit0494295b95c5c44ef389f1259e408f9445cfe0a1 (patch)
treea02dc1341cb31f1e2eccf023db3d01ae15ac70ac /stdlib/source/documentation/lux.lux
parent60daee098f92a44c3b404a9f5801f2e8126ad650 (diff)
Got documentation back in working condition.
Diffstat (limited to 'stdlib/source/documentation/lux.lux')
-rw-r--r--stdlib/source/documentation/lux.lux204
1 files changed, 102 insertions, 102 deletions
diff --git a/stdlib/source/documentation/lux.lux b/stdlib/source/documentation/lux.lux
index 5dbef4fac..63fa76177 100644
--- a/stdlib/source/documentation/lux.lux
+++ b/stdlib/source/documentation/lux.lux
@@ -369,27 +369,27 @@
_
{#None})])
-(documentation: /.^or
- (format "Or-patterns."
- \n "It's a special macro meant to be used with 'case'.")
- [(type: Weekday
- (Variant
- {#Monday}
- {#Tuesday}
- {#Wednesday}
- {#Thursday}
- {#Friday}
- {#Saturday}
- {#Sunday}))
-
- (def: (weekend? day)
- (-> Weekday Bit)
- (case day
- (^or {#Saturday} {#Sunday})
- #1
-
- _
- #0))])
+... (documentation: /.^or
+... (format "Or-patterns."
+... \n "It's a special macro meant to be used with 'case'.")
+... [(type: Weekday
+... (Variant
+... {#Monday}
+... {#Tuesday}
+... {#Wednesday}
+... {#Thursday}
+... {#Friday}
+... {#Saturday}
+... {#Sunday}))
+
+... (def: (weekend? day)
+... (-> Weekday Bit)
+... (case day
+... (^or {#Saturday} {#Sunday})
+... #1
+
+... _
+... #0))])
(documentation: /.let
(format "Creates local bindings."
@@ -633,40 +633,40 @@
(let [updater (revised [#foo #bar #baz])]
(updater func my_record))])
-(documentation: /.^template
- "It's similar to template, but meant to be used during pattern-matching."
- [(def: (reduced env type)
- (-> (List Type) Type Type)
- (case type
- {.#Primitive name params}
- {.#Primitive name (list#each (reduced env) params)}
-
- (^template [<tag>]
- [{<tag> left right}
- {<tag> (reduced env left) (reduced env right)}])
- ([.#Sum] [.#Product])
-
- (^template [<tag>]
- [{<tag> left right}
- {<tag> (reduced env left) (reduced env right)}])
- ([.#Function] [.#Apply])
-
- (^template [<tag>]
- [{<tag> old_env def}
- (case old_env
- {.#End}
- {<tag> env def}
-
- _
- type)])
- ([.#UnivQ] [.#ExQ])
-
- {.#Parameter idx}
- (else type (list.item idx env))
-
- _
- type
- ))])
+... (documentation: /.^template
+... "It's similar to template, but meant to be used during pattern-matching."
+... [(def: (reduced env type)
+... (-> (List Type) Type Type)
+... (case type
+... {.#Primitive name params}
+... {.#Primitive name (list#each (reduced env) params)}
+
+... (^template [<tag>]
+... [{<tag> left right}
+... {<tag> (reduced env left) (reduced env right)}])
+... ([.#Sum] [.#Product])
+
+... (^template [<tag>]
+... [{<tag> left right}
+... {<tag> (reduced env left) (reduced env right)}])
+... ([.#Function] [.#Apply])
+
+... (^template [<tag>]
+... [{<tag> old_env def}
+... (case old_env
+... {.#End}
+... {<tag> env def}
+
+... _
+... type)])
+... ([.#UnivQ] [.#ExQ])
+
+... {.#Parameter idx}
+... (else type (list.item idx env))
+
+... _
+... type
+... ))])
(.template [<name> <doc>]
[(documentation: <name>
@@ -738,25 +738,25 @@
_
false))])
-(documentation: /.^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)
- (^multi {#Some [chunk uri']}
- [(text#= static chunk) #1])
- (match_uri endpoint? parts' uri')
-
- _
- {#Left (format "Static part " (%t static) " does not match URI: " uri)})]
- ["Short-cuts can be taken when using bit tests."
- "The example above can be rewritten as..."
- (case (split (size static) uri)
- (^multi {#Some [chunk uri']}
- (text#= static chunk))
- (match_uri endpoint? parts' uri')
-
- _
- {#Left (format "Static part " (%t static) " does not match URI: " uri)})])
+... (documentation: /.^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)
+... (^multi {#Some [chunk uri']}
+... [(text#= static chunk) #1])
+... (match_uri endpoint? parts' uri')
+
+... _
+... {#Left (format "Static part " (%t static) " does not match URI: " uri)})]
+... ["Short-cuts can be taken when using bit tests."
+... "The example above can be rewritten as..."
+... (case (split (size static) uri)
+... (^multi {#Some [chunk uri']}
+... (text#= static chunk))
+... (match_uri endpoint? parts' uri')
+
+... _
+... {#Left (format "Static part " (%t static) " does not match URI: " uri)})])
(documentation: /.symbol
"Gives back a 2 tuple with the module and name parts, both as Text."
@@ -785,20 +785,20 @@
(same? +5
(+ +2 +3))])
-(documentation: /.^let
- "Allows you to simultaneously bind and de-structure a value."
- [(def: (hash (^let set [member_hash _]))
- (list#mix (function (_ elem acc)
- (+ acc
- (# member_hash hash elem)))
- 0
- (set.list set)))])
-
-(documentation: /.^|>
- "Pipes the value being pattern-matched against prior to binding it to a variable."
- [(case input
- (^|> value [++ (% 10) (max 1)])
- (foo value))])
+... (documentation: /.^let
+... "Allows you to simultaneously bind and de-structure a value."
+... [(def: (hash (^let set [member_hash _]))
+... (list#mix (function (_ elem acc)
+... (+ acc
+... (# member_hash hash elem)))
+... 0
+... (set.list set)))])
+
+... (documentation: /.^|>
+... "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
"Coerces the given expression to the type of whatever is expected."
@@ -862,15 +862,15 @@
[(`` (some expression
(~~ (some macro which may yield 0 or more results))))])
-(documentation: /.^code
- "Generates pattern-matching code for Code values in a way that looks like code-templating."
- [(is (Maybe Nat)
- (case (` (#0 123 +456.789))
- (^code (#0 (~ [_ {.#Nat number}]) +456.789))
- {.#Some number}
+... (documentation: /.^code
+... "Generates pattern-matching code for Code values in a way that looks like code-templating."
+... [(is (Maybe Nat)
+... (case (` (#0 123 +456.789))
+... (^code (#0 (~ [_ {.#Nat number}]) +456.789))
+... {.#Some number}
- _
- {.#None}))])
+... _
+... {.#None}))])
(documentation: /.false
"The boolean FALSE value.")
@@ -954,7 +954,7 @@
..exec
..case
..pattern
- ..^or
+ ... ..^or
..let
..function
..def:
@@ -983,18 +983,18 @@
..#
..has
..revised
- ..^template
+ ... ..^template
..++
..--
..loop
..with_expansions
..static
- ..^multi
+ ... ..^multi
..symbol
..parameter
..same?
- ..^let
- ..^|>
+ ... ..^let
+ ... ..^|>
..as_expected
..undefined
..type_of
@@ -1003,7 +1003,7 @@
..char
..for
..``
- ..^code
+ ... ..^code
..false
..true
..try