aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/documentation/lux/control
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/documentation/lux/control/concatenative.lux50
-rw-r--r--stdlib/source/documentation/lux/control/concurrency/actor.lux26
-rw-r--r--stdlib/source/documentation/lux/control/concurrency/async.lux30
-rw-r--r--stdlib/source/documentation/lux/control/concurrency/atom.lux8
-rw-r--r--stdlib/source/documentation/lux/control/concurrency/frp.lux16
-rw-r--r--stdlib/source/documentation/lux/control/concurrency/semaphore.lux22
-rw-r--r--stdlib/source/documentation/lux/control/concurrency/stm.lux12
-rw-r--r--stdlib/source/documentation/lux/control/concurrency/thread.lux4
-rw-r--r--stdlib/source/documentation/lux/control/continuation.lux10
-rw-r--r--stdlib/source/documentation/lux/control/exception.lux20
-rw-r--r--stdlib/source/documentation/lux/control/function.lux10
-rw-r--r--stdlib/source/documentation/lux/control/function/contract.lux4
-rw-r--r--stdlib/source/documentation/lux/control/function/memo.lux6
-rw-r--r--stdlib/source/documentation/lux/control/function/mixin.lux18
-rw-r--r--stdlib/source/documentation/lux/control/function/mutual.lux4
-rw-r--r--stdlib/source/documentation/lux/control/function/predicate.lux16
-rw-r--r--stdlib/source/documentation/lux/control/io.lux6
-rw-r--r--stdlib/source/documentation/lux/control/lazy.lux4
-rw-r--r--stdlib/source/documentation/lux/control/maybe.lux8
-rw-r--r--stdlib/source/documentation/lux/control/parser.lux54
-rw-r--r--stdlib/source/documentation/lux/control/pipe.lux20
-rw-r--r--stdlib/source/documentation/lux/control/reader.lux12
-rw-r--r--stdlib/source/documentation/lux/control/region.lux12
-rw-r--r--stdlib/source/documentation/lux/control/remember.lux6
-rw-r--r--stdlib/source/documentation/lux/control/security/capability.lux8
-rw-r--r--stdlib/source/documentation/lux/control/security/policy.lux20
-rw-r--r--stdlib/source/documentation/lux/control/state.lux26
-rw-r--r--stdlib/source/documentation/lux/control/thread.lux16
-rw-r--r--stdlib/source/documentation/lux/control/try.lux14
-rw-r--r--stdlib/source/documentation/lux/control/writer.lux8
30 files changed, 235 insertions, 235 deletions
diff --git a/stdlib/source/documentation/lux/control/concatenative.lux b/stdlib/source/documentation/lux/control/concatenative.lux
index 0d5a85f5a..c80dd42e9 100644
--- a/stdlib/source/documentation/lux/control/concatenative.lux
+++ b/stdlib/source/documentation/lux/control/concatenative.lux
@@ -23,7 +23,7 @@
""
[($.default /.value)
- ($.documentation /.=>
+ ($.definition /.=>
"Concatenative function types."
[(=> [Nat] [Nat])]
[(All (_ a)
@@ -37,7 +37,7 @@
else (=> ,,,0 ,,,1)]
,,,0 [Bit then else] ,,,1))])
- ($.documentation /.apply
+ ($.definition /.apply
"A generator for functions that turn arity N functions into arity N concatenative functions."
[(is (=> [Nat] [Nat])
((apply 1) ++))])
@@ -46,45 +46,45 @@
[(with_expansions [<name> (template.symbol [/._] ["apply_" <arity>])
<doc> (template.text ["Lift a function of arity " <arity>
" into a concatenative function of arity " <arity> "."])]
- ($.documentation <name>
+ ($.definition <name>
<doc>))]
[1] [2] [3] [4]
[5] [6] [7] [8]
))
- ($.documentation /.push
+ ($.definition /.push
"Push a value onto the stack.")
- ($.documentation /.drop
+ ($.definition /.drop
"Drop/pop a value from the top of the stack.")
- ($.documentation /.nip
+ ($.definition /.nip
"Drop the second-to-last value from the top of the stack.")
- ($.documentation /.dup
+ ($.definition /.dup
"Duplicate the top of the stack.")
- ($.documentation /.swap
+ ($.definition /.swap
"Swaps the 2 topmost stack values.")
- ($.documentation /.left_rotation
+ ($.definition /.left_rotation
"Rotes the 3 topmost stack values to the left.")
- ($.documentation /.right_rotation
+ ($.definition /.right_rotation
"Rotes the 3 topmost stack values to the right.")
- ($.documentation /.&&
+ ($.definition /.&&
"Groups the 2 topmost stack values as a 2-tuple.")
- ($.documentation /.left
+ ($.definition /.left
"Left-injects the top into sum.")
- ($.documentation /.right
+ ($.definition /.right
"Right-injects the top into sum.")
(,, (with_template [<input> <word> <func>]
- [(`` ($.documentation (,, (template.symbol [/._] [<word>]))
+ [(`` ($.definition (,, (template.symbol [/._] [<word>]))
(,, (template.text [<func> " for " <input> " arithmetic."]))))]
[Nat n/+ n.+]
@@ -132,7 +132,7 @@
[Frac f/>= f.>=]
))
- ($.documentation /.if
+ ($.definition /.if
"If expression."
[(same? "then"
(/.value (|>> (push true)
@@ -140,19 +140,19 @@
(push "else")
if)))])
- ($.documentation /.call
+ ($.definition /.call
"Executes an anonymous block on the stack.")
- ($.documentation /.loop
+ ($.definition /.loop
"Executes a block as a loop until it yields #0 to stop.")
- ($.documentation /.dip
+ ($.definition /.dip
"Executes a block on the stack, save for the topmost value.")
- ($.documentation /.dip_2
+ ($.definition /.dip_2
"Executes a block on the stack, save for the 2 topmost values.")
- ($.documentation /.do
+ ($.definition /.do
"Do-while loop expression."
[(n.= (++ sample)
(/.value (|>> (push sample)
@@ -160,7 +160,7 @@
(push (|>> (push 1) n/+))
do while)))])
- ($.documentation /.while
+ ($.definition /.while
"While loop expression."
[(n.= (n.+ distance start)
(/.value (|>> (push start)
@@ -170,7 +170,7 @@
(push (|>> (push 1) n/+))
while)))])
- ($.documentation /.compose
+ ($.definition /.compose
"Function composition."
[(n.= (n.+ 2 sample)
(/.value (|>> (push sample)
@@ -179,7 +179,7 @@
compose
call)))])
- ($.documentation /.partial
+ ($.definition /.partial
"Partial application."
[(n.= (n.+ sample sample)
(/.value (|>> (push sample)
@@ -188,9 +188,9 @@
partial
call)))])
- ($.documentation /.when
+ ($.definition /.when
"Only execute the block when #1.")
- ($.documentation /.?
+ ($.definition /.?
"Choose the top value when #0 and the second-to-top when #1.")]
[])))
diff --git a/stdlib/source/documentation/lux/control/concurrency/actor.lux b/stdlib/source/documentation/lux/control/concurrency/actor.lux
index 16e529ca9..c9df4c40d 100644
--- a/stdlib/source/documentation/lux/control/concurrency/actor.lux
+++ b/stdlib/source/documentation/lux/control/concurrency/actor.lux
@@ -17,44 +17,44 @@
($.default /.alive?)
($.default /.obituary')
- ($.documentation (/.Actor state)
+ ($.definition (/.Actor state)
"An entity that can react to messages (mail) sent to it concurrently.")
- ($.documentation (/.Mail state)
+ ($.definition (/.Mail state)
"A one-way message sent to an actor, without expecting a reply.")
- ($.documentation (/.Obituary state)
+ ($.definition (/.Obituary state)
"Details on the death of an actor.")
- ($.documentation (/.Behavior state)
+ ($.definition (/.Behavior state)
"An actor's behavior when mail is received.")
- ($.documentation /.spawn!
+ ($.definition /.spawn!
"Given a behavior and initial state, spawns an actor and returns it.")
- ($.documentation /.obituary
+ ($.definition /.obituary
"Await for an actor to stop working.")
- ($.documentation /.mail!
+ ($.definition /.mail!
"Send mail to an actor.")
- ($.documentation (/.Message state output)
+ ($.definition (/.Message state output)
"A two-way message sent to an actor, expecting a reply.")
- ($.documentation /.tell!
+ ($.definition /.tell!
"Communicate with an actor through message-passing.")
- ($.documentation /.default
+ ($.definition /.default
"Default actor behavior.")
- ($.documentation /.poison!
+ ($.definition /.poison!
(format "Kills the actor by sending mail that will kill it upon processing,"
\n "but allows the actor to handle previous mail."))
- ($.documentation /.Stop
+ ($.definition /.Stop
"A signal to stop an actor from observing a channel.")
- ($.documentation /.observe!
+ ($.definition /.observe!
(format "Use an actor to observe a channel by transforming each datum"
\n "flowing through the channel into mail the actor can process."
\n "Can stop observing the channel by executing the Stop value."))]
diff --git a/stdlib/source/documentation/lux/control/concurrency/async.lux b/stdlib/source/documentation/lux/control/concurrency/async.lux
index 655307522..4899894ef 100644
--- a/stdlib/source/documentation/lux/control/concurrency/async.lux
+++ b/stdlib/source/documentation/lux/control/concurrency/async.lux
@@ -16,64 +16,64 @@
($.default /.apply)
($.default /.monad)
- ($.documentation (/.Async it)
+ ($.definition (/.Async it)
"Represents values produced by asynchronous computations (unlike IO, which is synchronous).")
- ($.documentation (/.Resolver it)
+ ($.definition (/.Resolver it)
(format "The function used to give a value to an async."
\n "Will signal 'true' if the async has been resolved for the 1st time, 'false' otherwise."))
- ($.documentation /.resolved
+ ($.definition /.resolved
"Produces an async that has already been resolved to the given value."
[(resolved value)])
- ($.documentation /.async
+ ($.definition /.async
"Creates a fresh async that has not been resolved yet."
[(async _)])
- ($.documentation /.value
+ ($.definition /.value
"Polls an async for its value.")
- ($.documentation /.upon!
+ ($.definition /.upon!
"Executes the given function as soon as the async has been resolved."
[(upon! function async)])
- ($.documentation /.resolved?
+ ($.definition /.resolved?
"Checks whether an async's value has already been resolved.")
- ($.documentation /.and
+ ($.definition /.and
"Combines the results of both asyncs, in-order."
[(and left right)])
- ($.documentation /.or
+ ($.definition /.or
(format "Yields the results of whichever async gets resolved first."
\n "You can tell which one was resolved first through pattern-matching.")
[(or left right)])
- ($.documentation /.either
+ ($.definition /.either
(format "Yields the results of whichever async gets resolved first."
\n "You cannot tell which one was resolved first.")
[(either left right)])
- ($.documentation /.schedule!
+ ($.definition /.schedule!
(format "Runs an I/O computation on its own thread (after a specified delay)."
\n "Returns an async that will eventually host its result.")
[(schedule! milli_seconds computation)])
- ($.documentation /.future
+ ($.definition /.future
(format "Runs an I/O computation on its own thread."
\n "Returns an async that will eventually host its result.")
[(future computation)])
- ($.documentation /.after
+ ($.definition /.after
"Delivers a value after a certain period has passed."
[(after milli_seconds value)])
- ($.documentation /.delay
+ ($.definition /.delay
"An async that will be resolved after the specified amount of milli-seconds."
[(delay milli_seconds)])
- ($.documentation /.within
+ ($.definition /.within
"Wait for an async to be resolved within the specified amount of milli-seconds."
[(within milli_seconds async)])]
[]))
diff --git a/stdlib/source/documentation/lux/control/concurrency/atom.lux b/stdlib/source/documentation/lux/control/concurrency/atom.lux
index 77dcba913..b02aaff9a 100644
--- a/stdlib/source/documentation/lux/control/concurrency/atom.lux
+++ b/stdlib/source/documentation/lux/control/concurrency/atom.lux
@@ -15,19 +15,19 @@
[($.default /.atom)
($.default /.read!)
- ($.documentation (/.Atom it)
+ ($.definition (/.Atom it)
"Atomic references that are safe to mutate concurrently.")
- ($.documentation /.compare_and_swap!
+ ($.definition /.compare_and_swap!
(format "Only mutates an atom if you can present its current value."
\n "That guarantees that atom was not updated since you last read from it."))
- ($.documentation /.update!
+ ($.definition /.update!
(format "Updates an atom by applying a function to its current value."
\n "If it fails to update it (because some other process wrote to it first), it will retry until it succeeds."
\n "The retries will be done with the new values of the atom, as they show up."))
- ($.documentation /.write!
+ ($.definition /.write!
(format "Writes the given value to an atom."
\n "If it fails to write it (because some other process wrote to it first), it will retry until it succeeds."))]
[]))
diff --git a/stdlib/source/documentation/lux/control/concurrency/frp.lux b/stdlib/source/documentation/lux/control/concurrency/frp.lux
index 2f89cf7bd..ed095f73c 100644
--- a/stdlib/source/documentation/lux/control/concurrency/frp.lux
+++ b/stdlib/source/documentation/lux/control/concurrency/frp.lux
@@ -24,33 +24,33 @@
($.default /.distinct)
($.default /.list)
- ($.documentation (/.Channel it)
+ ($.definition (/.Channel it)
"An asynchronous channel to distribute values.")
- ($.documentation (/.Sink it)
+ ($.definition (/.Sink it)
"The tail-end of a channel, which can be written-to to fee the channel.")
- ($.documentation /.channel
+ ($.definition /.channel
"Creates a brand-new channel and hands it over, along with the sink to write to it."
[(channel _)])
- ($.documentation (/.Subscriber it)
+ ($.definition (/.Subscriber it)
"A function that can receive every value fed into a channel.")
- ($.documentation /.only
+ ($.definition /.only
(format "Produces a new channel based on the old one, only with values"
\n "that pass the test.")
[(only pass? channel)])
- ($.documentation /.of_async
+ ($.definition /.of_async
"A one-element channel containing the output from an async."
[(of_async async)])
- ($.documentation /.mix
+ ($.definition /.mix
"Asynchronous mix over channels."
[(mix f init channel)])
- ($.documentation /.sequential
+ ($.definition /.sequential
"Transforms the given list into a channel with the same elements."
[(sequential milli_seconds values)])]
[]))
diff --git a/stdlib/source/documentation/lux/control/concurrency/semaphore.lux b/stdlib/source/documentation/lux/control/concurrency/semaphore.lux
index 77d05a40b..34207f7e5 100644
--- a/stdlib/source/documentation/lux/control/concurrency/semaphore.lux
+++ b/stdlib/source/documentation/lux/control/concurrency/semaphore.lux
@@ -15,42 +15,42 @@
[($.default /.semaphore_is_maxed_out)
($.default /.barrier)
- ($.documentation /.Semaphore
+ ($.definition /.Semaphore
"A tool for controlling access to resources by multiple concurrent processes.")
- ($.documentation /.semaphore
+ ($.definition /.semaphore
""
[(semaphore initial_open_positions)])
- ($.documentation /.wait!
+ ($.definition /.wait!
(format "Wait on a semaphore until there are open positions."
\n "After finishing your work, you must 'signal' to the semaphore that you're done.")
[(wait! semaphore)])
- ($.documentation /.signal!
+ ($.definition /.signal!
"Signal to a semaphore that you're done with your work, and that there is a new open position."
[(signal! semaphore)])
- ($.documentation /.Mutex
+ ($.definition /.Mutex
"A mutual-exclusion lock that can only be acquired by one process at a time.")
- ($.documentation /.mutex
+ ($.definition /.mutex
"Creates a brand-new mutex."
[(mutex _)])
- ($.documentation /.synchronize!
+ ($.definition /.synchronize!
"Runs the procedure with exclusive control of the mutex."
[(synchronize! mutex procedure)])
- ($.documentation /.limit
+ ($.definition /.limit
"Produce a limit for a barrier.")
- ($.documentation /.Limit
+ ($.definition /.Limit
"A limit for barriers.")
- ($.documentation /.Barrier
+ ($.definition /.Barrier
"A barrier that blocks all processes from proceeding until a given number of processes are parked at the barrier.")
- ($.documentation /.block!
+ ($.definition /.block!
"Wait on a barrier until all processes have arrived and met the barrier's limit.")]
[]))
diff --git a/stdlib/source/documentation/lux/control/concurrency/stm.lux b/stdlib/source/documentation/lux/control/concurrency/stm.lux
index bd702f964..00bf8fc2c 100644
--- a/stdlib/source/documentation/lux/control/concurrency/stm.lux
+++ b/stdlib/source/documentation/lux/control/concurrency/stm.lux
@@ -18,25 +18,25 @@
($.default /.apply)
($.default /.monad)
- ($.documentation (/.Var it)
+ ($.definition (/.Var it)
"A mutable cell containing a value, and observers that will be alerted of any change to it.")
- ($.documentation /.var
+ ($.definition /.var
"Creates a new STM var, with a default value."
[(var value)])
- ($.documentation /.changes
+ ($.definition /.changes
"Creates a channel that will receive all changes to the value of the given var."
[(changes target)])
- ($.documentation (/.STM it)
+ ($.definition (/.STM it)
"A computation which updates a transaction and produces a value.")
- ($.documentation /.update
+ ($.definition /.update
"Update a var's value, and return a tuple with the old and the new values."
[(update function var)])
- ($.documentation /.commit!
+ ($.definition /.commit!
(format "Commits a transaction and returns its result (asynchronously)."
\n "Note that a transaction may be re-run an indeterminate number of times if other transactions involving the same variables successfully commit first."
\n "For this reason, it's important to note that transactions must be free from side-effects, such as I/O.")
diff --git a/stdlib/source/documentation/lux/control/concurrency/thread.lux b/stdlib/source/documentation/lux/control/concurrency/thread.lux
index 89e899081..e4ed65586 100644
--- a/stdlib/source/documentation/lux/control/concurrency/thread.lux
+++ b/stdlib/source/documentation/lux/control/concurrency/thread.lux
@@ -12,10 +12,10 @@
(.List $.Module)
($.module /._
""
- [($.documentation /.parallelism
+ [($.definition /.parallelism
"How many processes can run in parallel.")
- ($.documentation /.schedule!
+ ($.definition /.schedule!
"Executes an I/O procedure after some milli-seconds."
[(schedule! milli_seconds action)])]
[]))
diff --git a/stdlib/source/documentation/lux/control/continuation.lux b/stdlib/source/documentation/lux/control/continuation.lux
index ee926dc02..b17553b3d 100644
--- a/stdlib/source/documentation/lux/control/continuation.lux
+++ b/stdlib/source/documentation/lux/control/continuation.lux
@@ -19,18 +19,18 @@
($.default /.monad)
($.default /.portal)
- ($.documentation (/.Cont input output)
+ ($.definition (/.Cont input output)
"Continuations.")
- ($.documentation /.continued
+ ($.definition /.continued
"Continues a continuation thunk."
[(continued next cont)])
- ($.documentation /.result
+ ($.definition /.result
"Forces a continuation thunk to be evaluated."
[(result cont)])
- ($.documentation /.with_current
+ ($.definition /.with_current
"Call with current continuation."
[(with_current
(function (_ go)
@@ -40,7 +40,7 @@
_ (go [nexus init])]
(in (undefined)))))])
- ($.documentation /.pending
+ ($.definition /.pending
"Turns any expression into a function that is pending a continuation."
[(pending (some_function some_input))])]
[]))
diff --git a/stdlib/source/documentation/lux/control/exception.lux b/stdlib/source/documentation/lux/control/exception.lux
index 14db6b941..0fb02aafe 100644
--- a/stdlib/source/documentation/lux/control/exception.lux
+++ b/stdlib/source/documentation/lux/control/exception.lux
@@ -14,31 +14,31 @@
"Pure-Lux exception-handling functionality."
[($.default /.assertion)
- ($.documentation (/.Exception it)
+ ($.definition (/.Exception it)
"An exception provides a way to decorate error messages.")
- ($.documentation /.match?
+ ($.definition /.match?
"Is this exception the cause of the error message?"
[(match? exception error)])
- ($.documentation /.when
+ ($.definition /.when
(format "If a particular exception is detected on a possibly-erroneous value, handle it."
\n "If no exception was detected, or a different one from the one being checked, then pass along the original value.")
[(when exception then try)])
- ($.documentation /.otherwise
+ ($.definition /.otherwise
"If no handler could be found to catch the exception, then run a function as a last-resort measure."
[(otherwise else try)])
- ($.documentation /.error
+ ($.definition /.error
"Constructs an error message from an exception."
[(error exception message)])
- ($.documentation /.except
+ ($.definition /.except
"Decorate an error message with an Exception and lift it into the error-handling context."
[(except exception message)])
- ($.documentation /.exception
+ ($.definition /.exception
(format "Define a new exception type."
\n "It mostly just serves as a way to tag error messages for later catching.")
["Simple case:"
@@ -48,7 +48,7 @@
arguments Int])
optional_body)])
- ($.documentation /.report
+ ($.definition /.report
"An error report."
[(is Text
(report (list ["Row 0" value/0]
@@ -56,12 +56,12 @@
,,,
["Row N" value/N])))])
- ($.documentation /.listing
+ ($.definition /.listing
(format "A numbered report of the entries on a list."
\n "NOTE: 0-based numbering.")
[(listing format entries)])
- ($.documentation /.with
+ ($.definition /.with
"If a computation fails, prepends the exception to the error."
[(with exception message computation)])]
[]))
diff --git a/stdlib/source/documentation/lux/control/function.lux b/stdlib/source/documentation/lux/control/function.lux
index 1447b66d1..d7f1ba970 100644
--- a/stdlib/source/documentation/lux/control/function.lux
+++ b/stdlib/source/documentation/lux/control/function.lux
@@ -20,28 +20,28 @@
""
[($.default /.monoid)
- ($.documentation /.identity
+ ($.definition /.identity
(format "Identity function."
\n "Does nothing to its argument and just returns it.")
[(same? (identity value)
value)])
- ($.documentation /.composite
+ ($.definition /.composite
"Function composition."
[(= ((composite f g) "foo")
(f (g "foo")))])
- ($.documentation /.constant
+ ($.definition /.constant
"Create constant functions."
[(= ((constant "foo") "bar")
"foo")])
- ($.documentation /.flipped
+ ($.definition /.flipped
"Flips the order of the arguments of a function."
[(= ((flipped f) "foo" "bar")
(f "bar" "foo"))])
- ($.documentation /.on
+ ($.definition /.on
"Simple 1-argument function application."
[(on input function)])]
[/contract.documentation
diff --git a/stdlib/source/documentation/lux/control/function/contract.lux b/stdlib/source/documentation/lux/control/function/contract.lux
index 90494e7f0..4dd4990ef 100644
--- a/stdlib/source/documentation/lux/control/function/contract.lux
+++ b/stdlib/source/documentation/lux/control/function/contract.lux
@@ -15,14 +15,14 @@
[($.default /.pre_condition_failed)
($.default /.post_condition_failed)
- ($.documentation /.pre
+ ($.definition /.pre
(format "Pre-conditions."
\n "Given a test and an expression to run, only runs the expression if the test passes."
\n "Otherwise, an error is raised.")
[(pre (i.= +4 (i.+ +2 +2))
(foo +123 +456 +789))])
- ($.documentation /.post
+ ($.definition /.post
(format "Post-conditions."
\n "Given a predicate and an expression to run, evaluates the expression and then tests the output with the predicate."
\n "If the predicate returns #1, returns the value of the expression."
diff --git a/stdlib/source/documentation/lux/control/function/memo.lux b/stdlib/source/documentation/lux/control/function/memo.lux
index 9fd53f36e..caa98f2b1 100644
--- a/stdlib/source/documentation/lux/control/function/memo.lux
+++ b/stdlib/source/documentation/lux/control/function/memo.lux
@@ -15,16 +15,16 @@
[($.default /.memoization)
($.default (/.Memo input output))
- ($.documentation /.open
+ ($.definition /.open
"Memoization where the memoized results can be re-used accross invocations."
[(open memo)])
- ($.documentation /.closed
+ ($.definition /.closed
(format "Memoization confined to a single invocation to the function (not counting any subsequent recursive invocations)."
\n "Memoized results will be re-used during recursive invocations, but cannot be accessed after the main invocation has ended.")
[(closed hash memo)])
- ($.documentation /.none
+ ($.definition /.none
(format "No memoization at all."
\n "This is useful as a test control when measuring the effect of using memoization.")
[(none hash memo)])]
diff --git a/stdlib/source/documentation/lux/control/function/mixin.lux b/stdlib/source/documentation/lux/control/function/mixin.lux
index 7f5399ee0..4e0415fb3 100644
--- a/stdlib/source/documentation/lux/control/function/mixin.lux
+++ b/stdlib/source/documentation/lux/control/function/mixin.lux
@@ -14,36 +14,36 @@
""
[($.default /.monoid)
- ($.documentation (/.Mixin input output)
+ ($.definition (/.Mixin input output)
"A partially-defined function which can be mixed with others to inherit their behavior.")
- ($.documentation /.fixed
+ ($.definition /.fixed
"Given a mixin, produces a normal function."
[(fixed f)])
- ($.documentation /.nothing
+ ($.definition /.nothing
"A mixin that does nothing and just delegates work to the next mixin.")
- ($.documentation /.mixed
+ ($.definition /.mixed
"Produces a new mixin, where the behavior of the child can make use of the behavior of the parent."
[(mixed parent child)])
- ($.documentation /.advice
+ ($.definition /.advice
"Only apply then mixin when the input meets some criterion."
[(advice when then)])
- ($.documentation /.before
+ ($.definition /.before
"Executes an action before doing the main work."
[(before monad action)])
- ($.documentation /.after
+ ($.definition /.after
"Executes an action after doing the main work."
[(after monad action)])
- ($.documentation (/.Recursive input output)
+ ($.definition (/.Recursive input output)
"An indirectly recursive function.")
- ($.documentation /.of_recursive
+ ($.definition /.of_recursive
"Transform an indirectly recursive function into a mixin."
[(of_recursive recursive)])]
[]))
diff --git a/stdlib/source/documentation/lux/control/function/mutual.lux b/stdlib/source/documentation/lux/control/function/mutual.lux
index e8ea1d7e2..05c89af6c 100644
--- a/stdlib/source/documentation/lux/control/function/mutual.lux
+++ b/stdlib/source/documentation/lux/control/function/mutual.lux
@@ -12,7 +12,7 @@
(.List $.Module)
($.module /._
""
- [($.documentation /.let
+ [($.definition /.let
"Locally-defined mutually-recursive functions."
[(let [(even? number)
(-> Nat Bit)
@@ -28,7 +28,7 @@
(and (even? 4)
(odd? 5)))])
- ($.documentation /.def
+ ($.definition /.def
"Globally-defined mutually-recursive functions."
[(def
[.public (even? number)
diff --git a/stdlib/source/documentation/lux/control/function/predicate.lux b/stdlib/source/documentation/lux/control/function/predicate.lux
index e8507ce02..efc4bea44 100644
--- a/stdlib/source/documentation/lux/control/function/predicate.lux
+++ b/stdlib/source/documentation/lux/control/function/predicate.lux
@@ -16,27 +16,27 @@
($.default /.intersection)
($.default /.functor)
- ($.documentation (/.Predicate it)
+ ($.definition (/.Predicate it)
"A question that can be asked of a value, yield either false (#0) or true (#1).")
- ($.documentation /.none
+ ($.definition /.none
"A predicate that always fails.")
- ($.documentation /.or
+ ($.definition /.or
"A predicate that meets either predecessor.")
- ($.documentation /.all
+ ($.definition /.all
"A predicate that always succeeds.")
- ($.documentation /.and
+ ($.definition /.and
"A predicate that meets both predecessors.")
- ($.documentation /.complement
+ ($.definition /.complement
"The opposite of a predicate.")
- ($.documentation /.difference
+ ($.definition /.difference
"A predicate that meeds 'base', but not 'sub'.")
- ($.documentation /.rec
+ ($.definition /.rec
"Ties the knot for a recursive predicate.")]
[]))
diff --git a/stdlib/source/documentation/lux/control/io.lux b/stdlib/source/documentation/lux/control/io.lux
index ceb754ed1..2ee2d112d 100644
--- a/stdlib/source/documentation/lux/control/io.lux
+++ b/stdlib/source/documentation/lux/control/io.lux
@@ -16,16 +16,16 @@
($.default /.apply)
($.default /.monad)
- ($.documentation (/.IO it)
+ ($.definition (/.IO it)
"A type that represents synchronous, effectful computations that may interact with the outside world.")
- ($.documentation /.io
+ ($.definition /.io
(format "Delays the evaluation of an expression, by wrapping it in an IO 'thunk'."
\n "Great for wrapping effectful computations (which will not be performed until the IO is 'run!').")
[(io (exec
(log! msg)
"Some value..."))])
- ($.documentation /.run!
+ ($.definition /.run!
"A way to execute IO computations and perform their side-effects.")]
[]))
diff --git a/stdlib/source/documentation/lux/control/lazy.lux b/stdlib/source/documentation/lux/control/lazy.lux
index df45b6cd5..aadba8ec1 100644
--- a/stdlib/source/documentation/lux/control/lazy.lux
+++ b/stdlib/source/documentation/lux/control/lazy.lux
@@ -18,11 +18,11 @@
($.default /.apply)
($.default /.monad)
- ($.documentation (/.Lazy it)
+ ($.definition (/.Lazy it)
(format "A value specified by an expression that is calculated only at the last moment possible."
\n "Afterwards, the value is cached for future reference."))
- ($.documentation /.lazy
+ ($.definition /.lazy
"Specifies a lazy value by providing the expression that computes it."
[(lazy eager_computation)])]
[]))
diff --git a/stdlib/source/documentation/lux/control/maybe.lux b/stdlib/source/documentation/lux/control/maybe.lux
index 2157e92ba..73e3affb1 100644
--- a/stdlib/source/documentation/lux/control/maybe.lux
+++ b/stdlib/source/documentation/lux/control/maybe.lux
@@ -21,11 +21,11 @@
($.default /.with)
($.default /.list)
- ($.documentation /.lifted
+ ($.definition /.lifted
"Wraps a monadic value with Maybe machinery."
[(lifted monad)])
- ($.documentation /.else
+ ($.definition /.else
(format "Allows you to provide a default value that will be used"
\n "if a (Maybe x) value turns out to be .#None."
\n "Note: the expression for the default value will not be computed if the base computation succeeds.")
@@ -36,13 +36,13 @@
"=>"
+20])
- ($.documentation /.trusted
+ ($.definition /.trusted
(format "Assumes that a Maybe value is a .#Some and yields its value."
\n "Raises/throws a runtime error otherwise."
\n "WARNING: Use with caution.")
[(trusted trusted_computation)])
- ($.documentation /.when
+ ($.definition /.when
"Can be used as a guard in (co)monadic be/do expressions."
[(do monad
[value (do_something 1 2 3)
diff --git a/stdlib/source/documentation/lux/control/parser.lux b/stdlib/source/documentation/lux/control/parser.lux
index 4d2389f71..b235625ce 100644
--- a/stdlib/source/documentation/lux/control/parser.lux
+++ b/stdlib/source/documentation/lux/control/parser.lux
@@ -16,112 +16,112 @@
($.default /.apply)
($.default /.monad)
- ($.documentation (/.Parser state it)
+ ($.definition (/.Parser state it)
"A generic parser.")
- ($.documentation /.assertion
+ ($.definition /.assertion
"Fails with the given message if the test is #0."
[(assertion message test)])
- ($.documentation /.maybe
+ ($.definition /.maybe
"Optionality combinator."
[(maybe parser)])
- ($.documentation /.result
+ ($.definition /.result
(format "Executes the parser on the input."
\n "Does not verify that all of the input has been consumed by the parser."
\n "Returns both the parser's output, and a value that represents the remaining input.")
[(result parser input)])
- ($.documentation /.and
+ ($.definition /.and
"Sequencing combinator."
[(and first second)])
- ($.documentation /.or
+ ($.definition /.or
"Heterogeneous alternative combinator."
[(or left right)])
- ($.documentation /.either
+ ($.definition /.either
"Homogeneous alternative combinator."
[(either this that)])
- ($.documentation /.some
+ ($.definition /.some
"0-or-more combinator."
[(some parser)])
- ($.documentation /.many
+ ($.definition /.many
"1-or-more combinator."
[(many parser)])
- ($.documentation /.exactly
+ ($.definition /.exactly
"Parse exactly N times."
[(exactly amount parser)])
- ($.documentation /.at_least
+ ($.definition /.at_least
"Parse at least N times."
[(at_least amount parser)])
- ($.documentation /.at_most
+ ($.definition /.at_most
"Parse at most N times."
[(at_most amount parser)])
- ($.documentation /.between
+ ($.definition /.between
""
[(between minimum additional parser)])
- ($.documentation /.separated_by
+ ($.definition /.separated_by
"Parses instances of 'parser' that are separated by instances of 'separator'."
[(separated_by separator parser)])
- ($.documentation /.not
+ ($.definition /.not
"Only succeeds when the underlying parser fails."
[(not parser)])
- ($.documentation /.failure
+ ($.definition /.failure
"Always fail with this 'message'."
[(failure message)])
- ($.documentation /.lifted
+ ($.definition /.lifted
"Lift a potentially failed computation into a parser."
[(lifted operation)])
- ($.documentation /.else
+ ($.definition /.else
"If the given parser fails, returns the default value."
[(else value parser)])
- ($.documentation /.remaining
+ ($.definition /.remaining
"Yield the remaining input (without consuming it).")
- ($.documentation /.rec
+ ($.definition /.rec
"Combinator for recursive parsers."
[(rec parser)])
- ($.documentation /.after
+ ($.definition /.after
"Run the parser after another one (whose output is ignored)."
[(after param subject)])
- ($.documentation /.before
+ ($.definition /.before
"Run the parser before another one (whose output is ignored)."
[(before param subject)])
- ($.documentation /.only
+ ($.definition /.only
"Only succeed when the parser's output passes a test."
[(only test parser)])
- ($.documentation /.parses?
+ ($.definition /.parses?
"Ignore a parser's output and just verify that it succeeds."
[(parses? parser)])
- ($.documentation /.parses
+ ($.definition /.parses
"Ignore a parser's output and just execute it."
[(parses parser)])
- ($.documentation /.speculative
+ ($.definition /.speculative
(format "Executes a parser, without actually consuming the input."
\n "That way, the same input can be consumed again by another parser.")
[(speculative parser)])
- ($.documentation /.codec
+ ($.definition /.codec
"Decode the output of a parser using a codec."
[(codec codec parser)])]
[]))
diff --git a/stdlib/source/documentation/lux/control/pipe.lux b/stdlib/source/documentation/lux/control/pipe.lux
index 0f2fd01ce..71d9faea5 100644
--- a/stdlib/source/documentation/lux/control/pipe.lux
+++ b/stdlib/source/documentation/lux/control/pipe.lux
@@ -12,7 +12,7 @@
(.List $.Module)
($.module /._
"Composable extensions to the piping macros (|> and <|) that enhance them with various abilities."
- [($.documentation /.new
+ [($.definition /.new
"Ignores the piped argument, and begins a new pipe."
[(n.= 1
(|> 20
@@ -20,13 +20,13 @@
(n.+ 4)
(new 0 [++])))])
- ($.documentation /.let
+ ($.definition /.let
"Gives a name to the piped-argument, within the given expression."
[(n.= 10
(|> 5
(let x (n.+ x x))))])
- ($.documentation /.cond
+ ($.definition /.cond
(format "Branching for pipes."
\n "Both the tests and the bodies are piped-code, and must be given inside a tuple.")
[(|> +5
@@ -34,7 +34,7 @@
[i.odd?] [(i.* +3)]
[(new -1 [])]))])
- ($.documentation /.if
+ ($.definition /.if
"If-branching."
[(same? (if (n.even? sample)
"even"
@@ -44,7 +44,7 @@
[(new "even" [])]
[(new "odd" [])])))])
- ($.documentation /.when
+ ($.definition /.when
"Only execute the body when the test passes."
[(same? (if (n.even? sample)
(n.* 2 sample)
@@ -53,14 +53,14 @@
(when [n.even?]
[(n.* 2)])))])
- ($.documentation /.while
+ ($.definition /.while
(format "While loops for pipes."
\n "Both the testing and calculating steps are pipes and must be given inside tuples.")
[(|> +1
(while [(i.< +10)]
[++]))])
- ($.documentation /.do
+ ($.definition /.do
(format "Monadic pipes."
\n "Each steps in the monadic computation is a pipe and must be given inside a tuple.")
[(|> +5
@@ -69,14 +69,14 @@
[(i.+ +4)]
[++]))])
- ($.documentation /.exec
+ ($.definition /.exec
(format "Non-updating pipes."
\n "Will generate piped computations, but their results will not be used in the larger scope.")
[(|> +5
(exec [.nat %n log!])
(i.* +10))])
- ($.documentation /.tuple
+ ($.definition /.tuple
(format "Parallel branching for pipes."
\n "Allows to run multiple pipelines for a value and gives you a tuple of the outputs.")
[(|> +5
@@ -86,7 +86,7 @@
"=>"
[+50 +2 "+5"]])
- ($.documentation /.case
+ ($.definition /.case
(format "Pattern-matching for pipes."
\n "The bodies of each branch are NOT pipes; just regular values.")
[(|> +5
diff --git a/stdlib/source/documentation/lux/control/reader.lux b/stdlib/source/documentation/lux/control/reader.lux
index eaac93dc5..94b74cbe7 100644
--- a/stdlib/source/documentation/lux/control/reader.lux
+++ b/stdlib/source/documentation/lux/control/reader.lux
@@ -16,24 +16,24 @@
($.default /.apply)
($.default /.monad)
- ($.documentation (/.Reader environment it)
+ ($.definition (/.Reader environment it)
"Computations that have access to some environmental value.")
- ($.documentation /.read
+ ($.definition /.read
"Get the environment.")
- ($.documentation /.local
+ ($.definition /.local
"Run computation with a locally-modified environment."
[(local change proc)])
- ($.documentation /.result
+ ($.definition /.result
"Executes the reader against the given environment."
[(result env proc)])
- ($.documentation /.with
+ ($.definition /.with
"Monad transformer for Reader."
[(with monad)])
- ($.documentation /.lifted
+ ($.definition /.lifted
"Lift monadic values to the Reader wrapper.")]
[]))
diff --git a/stdlib/source/documentation/lux/control/region.lux b/stdlib/source/documentation/lux/control/region.lux
index 5432ab07f..55d903d6c 100644
--- a/stdlib/source/documentation/lux/control/region.lux
+++ b/stdlib/source/documentation/lux/control/region.lux
@@ -17,27 +17,27 @@
($.default /.apply)
($.default /.monad)
- ($.documentation (/.Region r ! it)
+ ($.definition (/.Region r ! it)
(format "A region where resources may be be claimed and where a side-effecting computation may be performed."
\n "Every resource is paired with a function that knows how to clean/reclaim it, to make sure there are no leaks."))
- ($.documentation /.run!
+ ($.definition /.run!
"Executes a region-based computation, with a side-effect determined by the monad."
[(run! monad computation)])
- ($.documentation /.acquire!
+ ($.definition /.acquire!
"Acquire a resource while pairing it a function that knows how to reclaim it."
[(acquire! monad cleaner value)])
- ($.documentation /.failure
+ ($.definition /.failure
"Immediately fail with this 'message'."
[(failure monad error)])
- ($.documentation /.except
+ ($.definition /.except
"Fail by throwing/raising an exception."
[(except monad exception message)])
- ($.documentation /.lifted
+ ($.definition /.lifted
"Lift an effectful computation into a region-based computation."
[(lifted monad operation)])]
[]))
diff --git a/stdlib/source/documentation/lux/control/remember.lux b/stdlib/source/documentation/lux/control/remember.lux
index 5c6b1bc2a..9e8b08350 100644
--- a/stdlib/source/documentation/lux/control/remember.lux
+++ b/stdlib/source/documentation/lux/control/remember.lux
@@ -14,7 +14,7 @@
""
[($.default /.must_remember)
- ($.documentation /.remember
+ ($.definition /.remember
(format "A message with an expiration date."
\n "Can have an optional piece of code to focus on.")
[(remember "2022-04-01"
@@ -23,7 +23,7 @@
"Improve the performace."
(some (complicated (computation 123))))])
- ($.documentation /.to_do
+ ($.definition /.to_do
(format "A TODO message with an expiration date."
\n "Can have an optional piece of code to focus on.")
[(to_do "2022-04-01"
@@ -32,7 +32,7 @@
"Improve the performace."
(some (complicated (computation 123))))])
- ($.documentation /.fix_me
+ ($.definition /.fix_me
(format "A FIXME message with an expiration date."
\n "Can have an optional piece of code to focus on.")
[(fix_me "2022-04-01"
diff --git a/stdlib/source/documentation/lux/control/security/capability.lux b/stdlib/source/documentation/lux/control/security/capability.lux
index de8b33889..8d9c7f2ad 100644
--- a/stdlib/source/documentation/lux/control/security/capability.lux
+++ b/stdlib/source/documentation/lux/control/security/capability.lux
@@ -12,15 +12,15 @@
(.List $.Module)
($.module /._
""
- [($.documentation (/.Capability brand input output)
+ [($.definition (/.Capability brand input output)
(format "Represents the capability to perform an operation."
\n "This operation is assumed to have security implications."))
- ($.documentation /.use
+ ($.definition /.use
"Applies a capability against its required input."
[(use capability input)])
- ($.documentation /.capability:
+ ($.definition /.capability:
"Defines a capability as a unique type, and a constructor for instances."
[(capability: (Can_Duplicate a)
(can_duplicate a [a a]))
@@ -31,7 +31,7 @@
[left right] (..use capability 123)]
(same? left right))])
- ($.documentation /.async
+ ($.definition /.async
"Converts a synchronous I/O-based capability into an asynchronous capability."
[(async capability)])]
[]))
diff --git a/stdlib/source/documentation/lux/control/security/policy.lux b/stdlib/source/documentation/lux/control/security/policy.lux
index 07d0ebc8d..a93dcecf3 100644
--- a/stdlib/source/documentation/lux/control/security/policy.lux
+++ b/stdlib/source/documentation/lux/control/security/policy.lux
@@ -22,29 +22,29 @@
($.default /.Can_Trust)
($.default /.Can_Distrust)
- ($.documentation (/.Policy brand value %)
+ ($.definition (/.Policy brand value %)
"A security policy encoded as the means to 'upgrade' or 'downgrade' in a secure context.")
- ($.documentation (/.Can_Upgrade brand % value)
+ ($.definition (/.Can_Upgrade brand % value)
"Represents the capacity to 'upgrade' a value.")
- ($.documentation (/.Can_Downgrade brand % value)
+ ($.definition (/.Can_Downgrade brand % value)
"Represents the capacity to 'downgrade' a value.")
- ($.documentation (/.Privilege brand %)
+ ($.definition (/.Privilege brand %)
"Represents the privilege to both 'upgrade' and 'downgrade' a value.")
- ($.documentation (/.Delegation brand %from %to)
+ ($.definition (/.Delegation brand %from %to)
"Represents the act of delegating policy capacities.")
- ($.documentation /.delegation
+ ($.definition /.delegation
"Delegating policy capacities."
[(delegation downgrade upgrade)])
- ($.documentation (/.Context brand scope %)
+ ($.definition (/.Context brand scope %)
"A computational context with an associated policy privilege.")
- ($.documentation /.with_policy
+ ($.definition /.with_policy
"Activates a security context with the priviledge to enforce it's policy."
[(type Password
(Private Text))
@@ -68,11 +68,11 @@
(%::can_downgrade password)))))))]
[(with_policy context)])
- ($.documentation /.Privacy
+ ($.definition /.Privacy
(format "A security context for privacy."
\n "Private data is data which cannot be allowed to leak outside of the programmed."))
- ($.documentation /.Safety
+ ($.definition /.Safety
(format "A security context for safety."
\n "Safe data is data coming from outside the program which can be trusted to be properly formatted and lacking injections."))]
[]))
diff --git a/stdlib/source/documentation/lux/control/state.lux b/stdlib/source/documentation/lux/control/state.lux
index 9f975818e..69059d064 100644
--- a/stdlib/source/documentation/lux/control/state.lux
+++ b/stdlib/source/documentation/lux/control/state.lux
@@ -16,52 +16,52 @@
($.default /.apply)
($.default /.monad)
- ($.documentation (/.State state it)
+ ($.definition (/.State state it)
"Stateful computations.")
- ($.documentation /.get
+ ($.definition /.get
"Read the current state.")
- ($.documentation /.put
+ ($.definition /.put
"Set the new state."
[(put new_state)])
- ($.documentation /.update
+ ($.definition /.update
"Compute the new state."
[(update change)])
- ($.documentation /.use
+ ($.definition /.use
"Run a function on the current state."
[(use user)])
- ($.documentation /.local
+ ($.definition /.local
"Run the computation with a locally-modified state."
[(local change action)])
- ($.documentation /.result
+ ($.definition /.result
"Run a stateful computation."
[(result state action)])
- ($.documentation /.while
+ ($.definition /.while
"A stateful while loop."
[(while condition body)])
- ($.documentation /.do_while
+ ($.definition /.do_while
"A stateful do-while loop."
[(do_while condition body)])
- ($.documentation /.+State
+ ($.definition /.+State
"Stateful computations decorated by a monad.")
- ($.documentation /.result'
+ ($.definition /.result'
"Execute a stateful computation decorated by a monad."
[(result' state action)])
- ($.documentation /.with
+ ($.definition /.with
"A monad transformer to create composite stateful computations."
[(with monad)])
- ($.documentation /.lifted
+ ($.definition /.lifted
"Lift monadic values to the +State wrapper."
[(lifted monad ma)])]
[]))
diff --git a/stdlib/source/documentation/lux/control/thread.lux b/stdlib/source/documentation/lux/control/thread.lux
index 85945fb00..1b6c9431e 100644
--- a/stdlib/source/documentation/lux/control/thread.lux
+++ b/stdlib/source/documentation/lux/control/thread.lux
@@ -16,32 +16,32 @@
($.default /.apply)
($.default /.monad)
- ($.documentation (/.Thread ! it)
+ ($.definition (/.Thread ! it)
"An imperative process with access to mutable values.")
- ($.documentation (/.Box ! it)
+ ($.definition (/.Box ! it)
"A mutable box holding a value.")
- ($.documentation /.box
+ ($.definition /.box
"A brand-new box initialized to the given value."
[(box init)])
- ($.documentation /.read!
+ ($.definition /.read!
"Reads the current value in the box."
[(read! box)])
- ($.documentation /.write!
+ ($.definition /.write!
"Mutates the value in the box."
[(write! value box)])
- ($.documentation /.result
+ ($.definition /.result
"Executes the imperative thread in a self-contained way."
[(result thread)])
- ($.documentation /.io
+ ($.definition /.io
"Transforms the imperative thread into an I/O computation.")
- ($.documentation /.update!
+ ($.definition /.update!
"Update a box's value by applying a function to it."
[(update! f box)])]
[]))
diff --git a/stdlib/source/documentation/lux/control/try.lux b/stdlib/source/documentation/lux/control/try.lux
index 9ff894fa0..8cc030b09 100644
--- a/stdlib/source/documentation/lux/control/try.lux
+++ b/stdlib/source/documentation/lux/control/try.lux
@@ -17,32 +17,32 @@
($.default /.monad)
($.default /.equivalence)
- ($.documentation (/.Try it)
+ ($.definition (/.Try it)
"A computation that can fail with an error message.")
- ($.documentation /.with
+ ($.definition /.with
"Enhances a monad with error-handling functionality."
[(with monad)])
- ($.documentation /.lifted
+ ($.definition /.lifted
"Wraps a monadic value with error-handling machinery."
[(lifted monad)])
- ($.documentation /.trusted
+ ($.definition /.trusted
(format "Assumes a Try value succeeded, and yields its value."
\n "If it didn't, raises the error as a runtime error."
\n "WARNING: Use with caution.")
[(trusted try)])
- ($.documentation /.maybe
+ ($.definition /.maybe
""
[(maybe try)])
- ($.documentation /.of_maybe
+ ($.definition /.of_maybe
""
[(of_maybe maybe)])
- ($.documentation /.else
+ ($.definition /.else
(format "Allows you to provide a default value that will be used"
\n "if a (Try x) value turns out to be #Failure."
\n "Note: the expression for the default value will not be computed if the base computation succeeds.")
diff --git a/stdlib/source/documentation/lux/control/writer.lux b/stdlib/source/documentation/lux/control/writer.lux
index 58650b8f0..e74e6b47d 100644
--- a/stdlib/source/documentation/lux/control/writer.lux
+++ b/stdlib/source/documentation/lux/control/writer.lux
@@ -16,18 +16,18 @@
($.default /.apply)
($.default /.monad)
- ($.documentation (/.Writer log value)
+ ($.definition (/.Writer log value)
"Represents a value with an associated 'log' to record arbitrary information.")
- ($.documentation /.write
+ ($.definition /.write
"Write a value to the log."
[(write message)])
- ($.documentation /.with
+ ($.definition /.with
"Enhances a monad with Writer functionality."
[(with monoid monad)])
- ($.documentation /.lifted
+ ($.definition /.lifted
"Wraps a monadic value with Writer machinery."
[(lifted monoid monad)])]
[]))