diff options
Diffstat (limited to 'stdlib/source/documentation')
40 files changed, 1527 insertions, 2173 deletions
diff --git a/stdlib/source/documentation/lux/data/binary.lux b/stdlib/source/documentation/lux/data/binary.lux index 475d07a00..80e05d511 100644 --- a/stdlib/source/documentation/lux/data/binary.lux +++ b/stdlib/source/documentation/lux/data/binary.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except) - ["$" documentation (.only documentation:)] + ["$" documentation] [data [text (.only \n) ["%" \\format (.only format)]]] @@ -10,82 +10,68 @@ [\\library ["[0]" /]]) -(documentation: /.Binary - "A binary BLOB of data.") +(.def .public documentation + (.List $.Module) + ($.module /._ + "" + [($.default /.index_out_of_bounds) + ($.default /.slice_out_of_bounds) + ($.default /.size) + ($.default /.equivalence) + ($.default /.monoid) -(documentation: /.empty - "A fresh/empty binary BLOB of the specified size." - [(empty size)]) + ($.documentation /.Binary + "A binary BLOB of data.") -(documentation: /.mix - "" - [(mix f init binary)]) + ($.documentation /.empty + "A fresh/empty binary BLOB of the specified size." + [(empty size)]) -(documentation: /.bits_8 - "Read 1 byte (8 bits) at the given index." - [(bits_8 index binary)]) + ($.documentation /.mix + "" + [(mix f init binary)]) -(documentation: /.bits_16 - "Read 2 bytes (16 bits) at the given index." - [(bits_16 index binary)]) + ($.documentation /.bits_8 + "Read 1 byte (8 bits) at the given index." + [(bits_8 index binary)]) -(documentation: /.bits_32 - "Read 4 bytes (32 bits) at the given index." - [(bits_32 index binary)]) + ($.documentation /.bits_16 + "Read 2 bytes (16 bits) at the given index." + [(bits_16 index binary)]) -(documentation: /.bits_64 - "Read 8 bytes (64 bits) at the given index." - [(bits_64 index binary)]) + ($.documentation /.bits_32 + "Read 4 bytes (32 bits) at the given index." + [(bits_32 index binary)]) -(documentation: /.has_8! - "Write 1 byte (8 bits) at the given index." - [(has_8! index value binary)]) + ($.documentation /.bits_64 + "Read 8 bytes (64 bits) at the given index." + [(bits_64 index binary)]) -(documentation: /.has_16! - "Write 2 bytes (16 bits) at the given index." - [(has_16! index value binary)]) + ($.documentation /.has_8! + "Write 1 byte (8 bits) at the given index." + [(has_8! index value binary)]) -(documentation: /.has_32! - "Write 4 bytes (32 bits) at the given index." - [(has_32! index value binary)]) + ($.documentation /.has_16! + "Write 2 bytes (16 bits) at the given index." + [(has_16! index value binary)]) -(documentation: /.has_64! - "Write 8 bytes (64 bits) at the given index." - [(has_64! index value binary)]) + ($.documentation /.has_32! + "Write 4 bytes (32 bits) at the given index." + [(has_32! index value binary)]) -(documentation: /.copy! - "Mutates the target binary BLOB by copying bytes from the source BLOB to it." - [(copy! bytes source_offset source target_offset target)]) + ($.documentation /.has_64! + "Write 8 bytes (64 bits) at the given index." + [(has_64! index value binary)]) -(documentation: /.slice - "Yields a subset of the binary BLOB, so long as the specified range is valid." - [(slice offset length binary)]) + ($.documentation /.copy! + "Mutates the target binary BLOB by copying bytes from the source BLOB to it." + [(copy! bytes source_offset source target_offset target)]) -(documentation: /.after - "Yields a binary BLOB with at most the specified number of bytes removed." - [(after bytes binary)]) + ($.documentation /.slice + "Yields a subset of the binary BLOB, so long as the specified range is valid." + [(slice offset length binary)]) -(.def .public documentation - (.List $.Module) - ($.module /._ - "" - [..Binary - ..empty - ..mix - ..bits_8 - ..bits_16 - ..bits_32 - ..bits_64 - ..has_8! - ..has_16! - ..has_32! - ..has_64! - ..copy! - ..slice - ..after - ($.default /.index_out_of_bounds) - ($.default /.slice_out_of_bounds) - ($.default /.size) - ($.default /.equivalence) - ($.default /.monoid)] + ($.documentation /.after + "Yields a binary BLOB with at most the specified number of bytes removed." + [(after bytes binary)])] [])) diff --git a/stdlib/source/documentation/lux/data/bit.lux b/stdlib/source/documentation/lux/data/bit.lux index 8895a4803..43d64ae46 100644 --- a/stdlib/source/documentation/lux/data/bit.lux +++ b/stdlib/source/documentation/lux/data/bit.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except) - ["$" documentation (.only documentation:)] + ["$" documentation] [data [text (.only \n) ["%" \\format (.only format)]]] @@ -10,16 +10,11 @@ [\\library ["[0]" /]]) -(documentation: /.complement - (format "Generates the complement of a predicate." - \n "That is a predicate that returns the oposite of the original predicate.")) - (.def .public documentation (.List $.Module) ($.module /._ "" - [..complement - ($.default /.no) + [($.default /.no) ($.default /.yes) ($.default /.off) ($.default /.on) @@ -27,5 +22,9 @@ ($.default /.hash) ($.default /.disjunction) ($.default /.conjunction) - ($.default /.codec)] + ($.default /.codec) + + ($.documentation /.complement + (format "Generates the complement of a predicate." + \n "That is a predicate that returns the oposite of the original predicate."))] [])) diff --git a/stdlib/source/documentation/lux/data/collection.lux b/stdlib/source/documentation/lux/data/collection.lux index b4ae1f294..5712aa398 100644 --- a/stdlib/source/documentation/lux/data/collection.lux +++ b/stdlib/source/documentation/lux/data/collection.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except) - ["$" documentation (.only documentation:)] + ["$" documentation] [data [text (.only \n) ["%" \\format (.only format)]] diff --git a/stdlib/source/documentation/lux/data/collection/array.lux b/stdlib/source/documentation/lux/data/collection/array.lux index 8697a4686..b6bc74a63 100644 --- a/stdlib/source/documentation/lux/data/collection/array.lux +++ b/stdlib/source/documentation/lux/data/collection/array.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except list) - ["$" documentation (.only documentation:)] + ["$" documentation] [data ["[0]" text (.only \n) ["%" \\format (.only format)]]] @@ -11,107 +11,89 @@ [\\library ["[0]" /]]) -(documentation: (/.Array it) - "Mutable arrays.") +(.def .public documentation + (.List $.Module) + ($.module /._ + "" + [($.default /.type_name) + ($.default /.equivalence) + ($.default /.monoid) + ($.default /.functor) + ($.default /.mix) + ($.default /.every?) + ($.default /.any?) -(documentation: /.empty - "An empty array of the specified size." - [(empty size)]) + ($.documentation (/.Array it) + "Mutable arrays.") -(documentation: /.size - "" - [(size array)]) + ($.documentation /.empty + "An empty array of the specified size." + [(empty size)]) -(documentation: /.item - "" - [(item index array)]) + ($.documentation /.size + "" + [(size array)]) -(documentation: /.has! - "Mutate the array by writing a value to the specified index." - [(has! index value array)]) + ($.documentation /.item + "" + [(item index array)]) -(documentation: /.lacks! - "Mutate the array by deleting the value at the specified index." - [(lacks! index array)]) + ($.documentation /.has! + "Mutate the array by writing a value to the specified index." + [(has! index value array)]) -(documentation: /.has? - "" - [(has? index array)]) + ($.documentation /.lacks! + "Mutate the array by deleting the value at the specified index." + [(lacks! index array)]) -(documentation: /.revised! - "Mutate the array by updating the value at the specified index." - [(revised! index transform array)]) + ($.documentation /.has? + "" + [(has? index array)]) -(documentation: /.upsert! - (format "Mutate the array by updating the value at the specified index." - \n "If there is no value, update and write the default value given.") - [(upsert! index default transform array)]) + ($.documentation /.revised! + "Mutate the array by updating the value at the specified index." + [(revised! index transform array)]) -(documentation: /.copy! - "Writes the contents of one array into the other." - [(copy! length src_start src_array dest_start dest_array)]) + ($.documentation /.upsert! + (format "Mutate the array by updating the value at the specified index." + \n "If there is no value, update and write the default value given.") + [(upsert! index default transform array)]) -(documentation: /.occupancy - "Finds out how many cells in an array are occupied." - [(occupancy array)]) + ($.documentation /.copy! + "Writes the contents of one array into the other." + [(copy! length src_start src_array dest_start dest_array)]) -(documentation: /.vacancy - "Finds out how many cells in an array are vacant." - [(vacancy array)]) + ($.documentation /.occupancy + "Finds out how many cells in an array are occupied." + [(occupancy array)]) -(documentation: /.only! - "Delete every item of the array that fails to satisfy the predicate." - [(only! p xs)]) + ($.documentation /.vacancy + "Finds out how many cells in an array are vacant." + [(vacancy array)]) -(documentation: /.example - "Yields the first item in the array that satisfies the predicate." - [(example p xs)]) + ($.documentation /.only! + "Delete every item of the array that fails to satisfy the predicate." + [(only! p xs)]) -(documentation: /.example' - "Just like 'example', but with access to the index of each value." - [(example' p xs)]) + ($.documentation /.example + "Yields the first item in the array that satisfies the predicate." + [(example p xs)]) -(documentation: /.clone - "Yields a shallow clone of the array." - [(clone xs)]) + ($.documentation /.example' + "Just like 'example', but with access to the index of each value." + [(example' p xs)]) -(documentation: /.of_list - "" - [(of_list xs)]) + ($.documentation /.clone + "Yields a shallow clone of the array." + [(clone xs)]) -(documentation: /.list - (format "Yields a list with every non-empty item in the array." - \n "Can use the optional default value when encountering an empty cell in the array.") - [(list {.#None} array) - (list {.#Some default} array)]) + ($.documentation /.of_list + "" + [(of_list xs)]) -(.def .public documentation - (.List $.Module) - ($.module /._ - "" - [..Array - ..empty - ..size - ..item - ..has! - ..lacks! - ..has? - ..revised! - ..upsert! - ..copy! - ..occupancy - ..vacancy - ..only! - ..example - ..example' - ..clone - ..of_list - ..list - ($.default /.type_name) - ($.default /.equivalence) - ($.default /.monoid) - ($.default /.functor) - ($.default /.mix) - ($.default /.every?) - ($.default /.any?)] + ($.documentation /.list + (format "Yields a list with every non-empty item in the array." + \n "Can use the optional default value when encountering an empty cell in the array.") + [(list {.#None} array) + (list {.#Some default} array)])] [])) diff --git a/stdlib/source/documentation/lux/data/collection/bits.lux b/stdlib/source/documentation/lux/data/collection/bits.lux index 075c71091..55d0354b0 100644 --- a/stdlib/source/documentation/lux/data/collection/bits.lux +++ b/stdlib/source/documentation/lux/data/collection/bits.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except or and not) - ["$" documentation (.only documentation:)] + ["$" documentation] [data ["[0]" text (.only \n) ["%" \\format (.only format)]]] @@ -11,42 +11,11 @@ [\\library ["[0]" /]]) -(documentation: /.Bits - "A bit-map.") - -(documentation: /.size - "Measures the size of a bit-map by counting all the 1s in the bit-map." - [(size bits)]) - -(documentation: /.capacity - "" - [(capacity bits)]) - -(documentation: /.bit - "" - [(bit index bits)]) - -(documentation: /.intersects? - "" - [(intersects? reference sample)]) - -(documentation: /.not - "" - [(not input)]) - (.def .public documentation (.List $.Module) ($.module /._ "" - [..Bits - ..size - ..capacity - ..bit - - ..intersects? - ..not - - ($.default /.Chunk) + [($.default /.Chunk) ($.default /.chunk_size) ($.default /.empty) ($.default /.empty?) @@ -56,5 +25,28 @@ ($.default /.flipped) ($.default /.and) ($.default /.or) - ($.default /.xor)] + ($.default /.xor) + + ($.documentation /.Bits + "A bit-map.") + + ($.documentation /.size + "Measures the size of a bit-map by counting all the 1s in the bit-map." + [(size bits)]) + + ($.documentation /.capacity + "" + [(capacity bits)]) + + ($.documentation /.bit + "" + [(bit index bits)]) + + ($.documentation /.intersects? + "" + [(intersects? reference sample)]) + + ($.documentation /.not + "" + [(not input)])] [])) diff --git a/stdlib/source/documentation/lux/data/collection/dictionary.lux b/stdlib/source/documentation/lux/data/collection/dictionary.lux index 72ed210aa..114050284 100644 --- a/stdlib/source/documentation/lux/data/collection/dictionary.lux +++ b/stdlib/source/documentation/lux/data/collection/dictionary.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except has revised) - ["$" documentation (.only documentation:)] + ["$" documentation] [data ["[0]" text (.only \n) ["%" \\format (.only format)]]] @@ -14,90 +14,76 @@ ["[1][0]" ordered] ["[1][0]" plist]]) -(documentation: (/.Dictionary key value) - "A dictionary implemented as a Hash-Array Mapped Trie (HAMT).") +(.def .public documentation + (.List $.Module) + ($.module /._ + "" + [($.default /.key_hash) + ($.default /.key_already_exists) + ($.default /.size) + ($.default /.empty?) + ($.default /.entries) + ($.default /.keys) + ($.default /.values) + ($.default /.equivalence) + ($.default /.functor) -(documentation: /.empty - "An empty dictionary." - [(empty key_hash)]) + ($.documentation (/.Dictionary key value) + "A dictionary implemented as a Hash-Array Mapped Trie (HAMT).") -(documentation: /.has - "" - [(has key val dict)]) + ($.documentation /.empty + "An empty dictionary." + [(empty key_hash)]) -(documentation: /.lacks - "" - [(lacks key dict)]) + ($.documentation /.has + "" + [(has key val dict)]) -(documentation: /.value - "" - [(value key dict)]) + ($.documentation /.lacks + "" + [(lacks key dict)]) -(documentation: /.key? - "" - [(key? dict key)]) + ($.documentation /.value + "" + [(value key dict)]) -(documentation: /.has' - "Only puts the KV-pair if the key is not already present." - [(has' key val dict)]) + ($.documentation /.key? + "" + [(key? dict key)]) -(documentation: /.revised - "Transforms the value located at key (if available), using the given function." - [(revised key f dict)]) + ($.documentation /.has' + "Only puts the KV-pair if the key is not already present." + [(has' key val dict)]) -(documentation: /.revised' - (format "Updates the value at the key; if it exists." - \n "Otherwise, puts a value by applying the function to a default.") - [(revised' key default f dict)]) + ($.documentation /.revised + "Transforms the value located at key (if available), using the given function." + [(revised key f dict)]) -(documentation: /.of_list - "" - [(of_list key_hash kvs)]) + ($.documentation /.revised' + (format "Updates the value at the key; if it exists." + \n "Otherwise, puts a value by applying the function to a default.") + [(revised' key default f dict)]) -(documentation: /.composite - (format "Merges 2 dictionaries." - \n "If any collisions with keys occur, the values of dict2 will overwrite those of dict1.") - [(composite dict2 dict1)]) + ($.documentation /.of_list + "" + [(of_list key_hash kvs)]) -(documentation: /.composite_with - (format "Merges 2 dictionaries." - \n "If any collisions with keys occur, a new value will be computed by applying 'f' to the values of dict2 and dict1.") - [(composite_with f dict2 dict1)]) + ($.documentation /.composite + (format "Merges 2 dictionaries." + \n "If any collisions with keys occur, the values of dict2 will overwrite those of dict1.") + [(composite dict2 dict1)]) -(documentation: /.re_bound - "If there is a value under 'from_key', remove 'from_key' and store the value under 'to_key'." - [(re_bound from_key to_key dict)]) + ($.documentation /.composite_with + (format "Merges 2 dictionaries." + \n "If any collisions with keys occur, a new value will be computed by applying 'f' to the values of dict2 and dict1.") + [(composite_with f dict2 dict1)]) -(documentation: /.sub - "A sub-dictionary, with only the specified keys." - [(sub keys dict)]) + ($.documentation /.re_bound + "If there is a value under 'from_key', remove 'from_key' and store the value under 'to_key'." + [(re_bound from_key to_key dict)]) -(.def .public documentation - (.List $.Module) - ($.module /._ - "" - [..Dictionary - ..empty - ..has - ..lacks - ..value - ..key? - ..has' - ..revised - ..revised' - ..of_list - ..composite - ..composite_with - ..re_bound - ..sub - ($.default /.key_hash) - ($.default /.key_already_exists) - ($.default /.size) - ($.default /.empty?) - ($.default /.entries) - ($.default /.keys) - ($.default /.values) - ($.default /.equivalence) - ($.default /.functor)] + ($.documentation /.sub + "A sub-dictionary, with only the specified keys." + [(sub keys dict)])] [/ordered.documentation /plist.documentation])) diff --git a/stdlib/source/documentation/lux/data/collection/dictionary/ordered.lux b/stdlib/source/documentation/lux/data/collection/dictionary/ordered.lux index d5f857c5c..a946434d6 100644 --- a/stdlib/source/documentation/lux/data/collection/dictionary/ordered.lux +++ b/stdlib/source/documentation/lux/data/collection/dictionary/ordered.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except has revised) - ["$" documentation (.only documentation:)] + ["$" documentation] [data ["[0]" text (.only \n) ["%" \\format (.only format)]]] @@ -11,69 +11,56 @@ [\\library ["[0]" /]]) -(documentation: (/.Dictionary key value) - "A dictionary data-structure with ordered entries.") +(`` (.def .public documentation + (.List $.Module) + ($.module /._ + "" + [($.default /.empty?) + ($.default /.entries) + ($.default /.keys) + ($.default /.values) + ($.default /.equivalence) -(documentation: /.empty - "An empty dictionary, employing the given order." - [(empty order)]) + ($.documentation (/.Dictionary key value) + "A dictionary data-structure with ordered entries.") -(documentation: /.value - "" - [(value key dict)]) + ($.documentation /.empty + "An empty dictionary, employing the given order." + [(empty order)]) -(documentation: /.key? - "" - [(key? dict key)]) + ($.documentation /.value + "" + [(value key dict)]) -(with_template [<name>] - [(`` (documentation: <name> - (format "Yields value under the " (~~ (template.text [<name>])) "imum key.")))] + ($.documentation /.key? + "" + [(key? dict key)]) - [/.min] - [/.max] - ) + (~~ (with_template [<name>] + [(`` ($.documentation <name> + (format "Yields value under the " (~~ (template.text [<name>])) "imum key.")))] -(documentation: /.size - "" - [(size dict)]) + [/.min] + [/.max] + )) -(documentation: /.has - "" - [(has key value dict)]) + ($.documentation /.size + "" + [(size dict)]) -(documentation: /.lacks - "" - [(lacks key dict)]) + ($.documentation /.has + "" + [(has key value dict)]) -(documentation: /.revised - "" - [(revised key transform dict)]) + ($.documentation /.lacks + "" + [(lacks key dict)]) -(documentation: /.of_list - "" - [(of_list order list)]) + ($.documentation /.revised + "" + [(revised key transform dict)]) -(.def .public documentation - (.List $.Module) - ($.module /._ - "" - [..Dictionary - ..empty - ..value - ..key? - - ..min - ..max - - ..size - ..has - ..lacks - ..revised - ..of_list - ($.default /.empty?) - ($.default /.entries) - ($.default /.keys) - ($.default /.values) - ($.default /.equivalence)] - [])) + ($.documentation /.of_list + "" + [(of_list order list)])] + []))) diff --git a/stdlib/source/documentation/lux/data/collection/dictionary/plist.lux b/stdlib/source/documentation/lux/data/collection/dictionary/plist.lux index 0dafc6340..2e478812e 100644 --- a/stdlib/source/documentation/lux/data/collection/dictionary/plist.lux +++ b/stdlib/source/documentation/lux/data/collection/dictionary/plist.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except has revised) - ["$" documentation (.only documentation:)] + ["$" documentation] [data ["[0]" text (.only \n) ["%" \\format (.only format)]]] @@ -11,44 +11,38 @@ [\\library ["[0]" /]]) -(documentation: (/.PList it) - (format "A property list." - \n "It's a simple dictionary-like structure with Text keys.")) - -(documentation: /.value - "" - [(value key properties)]) - -(documentation: /.contains? - "" - [(contains? key properties)]) - -(documentation: /.has - "" - [(has key val properties)]) - -(documentation: /.revised - "" - [(revised key f properties)]) - -(documentation: /.lacks - "" - [(lacks key properties)]) - (.def .public documentation (.List $.Module) ($.module /._ "" - [..PList - ..value - ..contains? - ..has - ..revised - ..lacks - ($.default /.empty) + [($.default /.empty) ($.default /.size) ($.default /.empty?) ($.default /.keys) ($.default /.values) - ($.default /.equivalence)] + ($.default /.equivalence) + + ($.documentation (/.PList it) + (format "A property list." + \n "It's a simple dictionary-like structure with Text keys.")) + + ($.documentation /.value + "" + [(value key properties)]) + + ($.documentation /.contains? + "" + [(contains? key properties)]) + + ($.documentation /.has + "" + [(has key val properties)]) + + ($.documentation /.revised + "" + [(revised key f properties)]) + + ($.documentation /.lacks + "" + [(lacks key properties)])] [])) diff --git a/stdlib/source/documentation/lux/data/collection/list.lux b/stdlib/source/documentation/lux/data/collection/list.lux index 8d8a47651..e0699154e 100644 --- a/stdlib/source/documentation/lux/data/collection/list.lux +++ b/stdlib/source/documentation/lux/data/collection/list.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except all) - ["$" documentation (.only documentation:)] + ["$" documentation] [data ["[0]" text (.only \n) ["%" \\format (.only format)]]] @@ -11,193 +11,158 @@ [\\library ["[0]" /]]) -(documentation: /.mixes - "" - [(mixes f init inputs)]) - -(documentation: /.reversed - "" - [(reversed xs)]) - -(documentation: /.only - "A list with only values that satisfy the predicate." - [(only keep? xs)]) - -(documentation: /.partition - "Divide the list into all elements that satisfy a predicate, and all elements that do not." - [(partition satisfies? list)]) - -(documentation: /.pairs - "Cut the list into pairs of 2." - [(pairs list)]) - -(documentation: /.split_at - "" - [(split_at n xs)]) - -(documentation: /.split_when - "Segment the list by using a predicate to tell when to cut." - [(split_when predicate xs)]) - -(documentation: /.sub - "Segment the list into sub-lists of (at most) the given size." - [(sub size list)]) - -(documentation: /.repeated - "A list of the value x, repeated n times." - [(repeated n x)]) - -(documentation: /.iterations - "Generates a list element by element until the function returns .#None." - [(iterations f x)]) - -(documentation: /.one - "" - [(one check xs)]) - -(documentation: /.all - "" - [(all check xs)]) - -(documentation: /.example - "Yields the first value in the list that satisfies the predicate." - [(example predicate xs)]) - -(documentation: /.interposed - "Puts a value between every two elements in the list." - [(interposed sep xs)]) - -(documentation: /.size - "" - [(size list)]) - -(documentation: /.item - "Fetches the element at the specified index." - [(item i xs)]) - -(documentation: /.sorted - "A list ordered by a comparison function." - [(sorted < xs)]) - -(documentation: /.empty? - "" - [(empty? xs)]) - -(documentation: /.member? - "" - [(member? eq xs x)]) - -(with_template [<name> <doc>] - [(documentation: <name> - <doc>)] - - [/.head "Yields the first element of a list."] - [/.tail "For a list of size N, yields the N-1 elements after the first one."] - ) - -(documentation: /.indices - "Produces all the valid indices for a given size." - [(indices size)]) - -(documentation: /.zipped - "Create list zippers with the specified number of input lists." - [(def zipped_2 (zipped 2)) - (def zipped_3 (zipped 3)) - (zipped_3 xs ys zs) - ((zipped 3) xs ys zs)]) - -(documentation: /.zipped_with - "Create list zippers with the specified number of input lists." - [(def zipped_with_2 (zipped_with 2)) - (def zipped_with_3 (zipped_with 3)) - (zipped_with_2 + xs ys) - ((zipped_with 2) + xs ys)]) - -(documentation: /.last - "" - [(last xs)]) - -(documentation: /.inits - (format "For a list of size N, yields the first N-1 elements." - \n "Will yield a .#None for empty lists.") - [(inits xs)]) - -(documentation: /.together - "The sequential combination of all the lists.") - -(documentation: /.with - "Enhances a monad with List functionality." - [(with monad)]) - -(documentation: /.lifted - "Wraps a monadic value with List machinery." - [(lifted monad)]) - -(documentation: /.enumeration - "Pairs every element in the list with its index, starting at 0." - [(enumeration xs)]) - -(documentation: /.when - "Can be used as a guard in (co)monadic be/do expressions." - [(do monad - [value (do_something 1 2 3) - .when (passes_test? value)] - (do_something_else 4 5 6))]) - -(.def .public documentation - (.List $.Module) - ($.module /._ - "" - [..mixes - ..reversed - ..only - ..partition - ..pairs - - ..split_at - ..split_when - ..sub - ..repeated - ..iterations - ..one - ..all - ..example - ..interposed - ..size - - ..item - ..sorted - ..empty? - ..member? - - ..head - ..tail - - ..indices - ..zipped - ..zipped_with - ..last - ..inits - ..together - ..with - ..lifted - ..enumeration - ..when - ($.default /.mix) - ($.default /.equivalence) - ($.default /.hash) - ($.default /.monoid) - ($.default /.functor) - ($.default /.apply) - ($.default /.monad) - ($.default /.zipped_2) - ($.default /.zipped_3) - ($.default /.zipped_with_2) - ($.default /.zipped_with_3) - ($.default /.first) - ($.default /.after) - ($.default /.while) - ($.default /.until) - ($.default /.every?) - ($.default /.any?)] - [])) +(`` (.def .public documentation + (.List $.Module) + ($.module /._ + "" + [($.default /.mix) + ($.default /.equivalence) + ($.default /.hash) + ($.default /.monoid) + ($.default /.functor) + ($.default /.apply) + ($.default /.monad) + ($.default /.zipped_2) + ($.default /.zipped_3) + ($.default /.zipped_with_2) + ($.default /.zipped_with_3) + ($.default /.first) + ($.default /.after) + ($.default /.while) + ($.default /.until) + ($.default /.every?) + ($.default /.any?) + + ($.documentation /.mixes + "" + [(mixes f init inputs)]) + + ($.documentation /.reversed + "" + [(reversed xs)]) + + ($.documentation /.only + "A list with only values that satisfy the predicate." + [(only keep? xs)]) + + ($.documentation /.partition + "Divide the list into all elements that satisfy a predicate, and all elements that do not." + [(partition satisfies? list)]) + + ($.documentation /.pairs + "Cut the list into pairs of 2." + [(pairs list)]) + + ($.documentation /.split_at + "" + [(split_at n xs)]) + + ($.documentation /.split_when + "Segment the list by using a predicate to tell when to cut." + [(split_when predicate xs)]) + + ($.documentation /.sub + "Segment the list into sub-lists of (at most) the given size." + [(sub size list)]) + + ($.documentation /.repeated + "A list of the value x, repeated n times." + [(repeated n x)]) + + ($.documentation /.iterations + "Generates a list element by element until the function returns .#None." + [(iterations f x)]) + + ($.documentation /.one + "" + [(one check xs)]) + + ($.documentation /.all + "" + [(all check xs)]) + + ($.documentation /.example + "Yields the first value in the list that satisfies the predicate." + [(example predicate xs)]) + + ($.documentation /.interposed + "Puts a value between every two elements in the list." + [(interposed sep xs)]) + + ($.documentation /.size + "" + [(size list)]) + + ($.documentation /.item + "Fetches the element at the specified index." + [(item i xs)]) + + ($.documentation /.sorted + "A list ordered by a comparison function." + [(sorted < xs)]) + + ($.documentation /.empty? + "" + [(empty? xs)]) + + ($.documentation /.member? + "" + [(member? eq xs x)]) + + (~~ (with_template [<name> <doc>] + [($.documentation <name> + <doc>)] + + [/.head "Yields the first element of a list."] + [/.tail "For a list of size N, yields the N-1 elements after the first one."] + )) + + ($.documentation /.indices + "Produces all the valid indices for a given size." + [(indices size)]) + + ($.documentation /.zipped + "Create list zippers with the specified number of input lists." + [(def zipped_2 (zipped 2)) + (def zipped_3 (zipped 3)) + (zipped_3 xs ys zs) + ((zipped 3) xs ys zs)]) + + ($.documentation /.zipped_with + "Create list zippers with the specified number of input lists." + [(def zipped_with_2 (zipped_with 2)) + (def zipped_with_3 (zipped_with 3)) + (zipped_with_2 + xs ys) + ((zipped_with 2) + xs ys)]) + + ($.documentation /.last + "" + [(last xs)]) + + ($.documentation /.inits + (format "For a list of size N, yields the first N-1 elements." + \n "Will yield a .#None for empty lists.") + [(inits xs)]) + + ($.documentation /.together + "The sequential combination of all the lists.") + + ($.documentation /.with + "Enhances a monad with List functionality." + [(with monad)]) + + ($.documentation /.lifted + "Wraps a monadic value with List machinery." + [(lifted monad)]) + + ($.documentation /.enumeration + "Pairs every element in the list with its index, starting at 0." + [(enumeration xs)]) + + ($.documentation /.when + "Can be used as a guard in (co)monadic be/do expressions." + [(do monad + [value (do_something 1 2 3) + .when (passes_test? value)] + (do_something_else 4 5 6))])] + []))) diff --git a/stdlib/source/documentation/lux/data/collection/queue.lux b/stdlib/source/documentation/lux/data/collection/queue.lux index 19fee78c9..963776aa5 100644 --- a/stdlib/source/documentation/lux/data/collection/queue.lux +++ b/stdlib/source/documentation/lux/data/collection/queue.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except list) - ["$" documentation (.only documentation:)] + ["$" documentation] [data ["[0]" text (.only \n) ["%" \\format (.only format)]]] @@ -13,46 +13,39 @@ ["[0]" / ["[1][0]" priority]]) -(documentation: (/.Queue it) - "A first-in, first-out sequential data-structure.") - -(documentation: /.of_list - "" - [(of_list entries)]) - -(documentation: /.list - "" - [(list queue)]) - -(documentation: /.front - "Yields the first value in the queue, if any.") - -(documentation: /.member? - "" - [(member? equivalence queue member)]) - -(documentation: /.next - "" - [(next queue)]) - -(documentation: /.end - "" - [(end val queue)]) - (.def .public documentation (.List $.Module) ($.module /._ "" - [..Queue - ..of_list - ..list - ..front - ..member? - ..next - ..end - ($.default /.empty) + [($.default /.empty) ($.default /.size) ($.default /.empty?) ($.default /.equivalence) - ($.default /.functor)] + ($.default /.functor) + + ($.documentation (/.Queue it) + "A first-in, first-out sequential data-structure.") + + ($.documentation /.of_list + "" + [(of_list entries)]) + + ($.documentation /.list + "" + [(list queue)]) + + ($.documentation /.front + "Yields the first value in the queue, if any.") + + ($.documentation /.member? + "" + [(member? equivalence queue member)]) + + ($.documentation /.next + "" + [(next queue)]) + + ($.documentation /.end + "" + [(end val queue)])] [/priority.documentation])) diff --git a/stdlib/source/documentation/lux/data/collection/queue/priority.lux b/stdlib/source/documentation/lux/data/collection/queue/priority.lux index 47ccd89bb..4952a6954 100644 --- a/stdlib/source/documentation/lux/data/collection/queue/priority.lux +++ b/stdlib/source/documentation/lux/data/collection/queue/priority.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except list) - ["$" documentation (.only documentation:)] + ["$" documentation] [data ["[0]" text (.only \n) ["%" \\format (.only format)]]] @@ -11,21 +11,11 @@ [\\library ["[0]" /]]) -(documentation: /.member? - "" - [(member? equivalence queue member)]) - -(documentation: /.end - "" - [(end priority value queue)]) - (.def .public documentation (.List $.Module) ($.module /._ "" - [..member? - ..end - ($.default /.Priority) + [($.default /.Priority) ($.default /.max) ($.default /.min) ($.default (/.Queue it)) @@ -33,5 +23,13 @@ ($.default /.front) ($.default /.size) ($.default /.next) - ($.default /.empty?)] + ($.default /.empty?) + + ($.documentation /.member? + "" + [(member? equivalence queue member)]) + + ($.documentation /.end + "" + [(end priority value queue)])] [])) diff --git a/stdlib/source/documentation/lux/data/collection/sequence.lux b/stdlib/source/documentation/lux/data/collection/sequence.lux index 7c286aa0a..283eca310 100644 --- a/stdlib/source/documentation/lux/data/collection/sequence.lux +++ b/stdlib/source/documentation/lux/data/collection/sequence.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except list has revised) - ["$" documentation (.only documentation:)] + ["$" documentation] [data ["[0]" text (.only \n) ["%" \\format (.only format)]]] @@ -11,61 +11,11 @@ [\\library ["[0]" /]]) -(documentation: (/.Sequence it) - "A sequential data-structure with fast random access.") - -(documentation: /.suffix - "" - [(suffix val sequence)]) - -(documentation: /.within_bounds? - "Determines whether the index is within the bounds of the sequence." - [(within_bounds? sequence idx)]) - -(documentation: /.item - "" - [(item idx sequence)]) - -(documentation: /.has - "" - [(has idx val sequence)]) - -(documentation: /.revised - "" - [(revised idx f sequence)]) - -(documentation: /.prefix - "" - [(prefix sequence)]) - -(documentation: /.list - "" - [(list sequence)]) - -(documentation: /.member? - "" - [(member? equivalence sequence val)]) - -(documentation: /.sequence - "Sequence literals." - [(is (Sequence Nat) - (sequence 12 34 56 78 90))]) - (.def .public documentation (.List $.Module) ($.module /._ "" - [..Sequence - ..suffix - ..within_bounds? - ..item - ..has - ..revised - ..prefix - ..list - ..member? - ..sequence - ($.default /.empty) + [($.default /.empty) ($.default /.size) ($.default /.index_out_of_bounds) ($.default /.of_list) @@ -78,5 +28,45 @@ ($.default /.monad) ($.default /.reversed) ($.default /.every?) - ($.default /.any?)] + ($.default /.any?) + + ($.documentation (/.Sequence it) + "A sequential data-structure with fast random access.") + + ($.documentation /.suffix + "" + [(suffix val sequence)]) + + ($.documentation /.within_bounds? + "Determines whether the index is within the bounds of the sequence." + [(within_bounds? sequence idx)]) + + ($.documentation /.item + "" + [(item idx sequence)]) + + ($.documentation /.has + "" + [(has idx val sequence)]) + + ($.documentation /.revised + "" + [(revised idx f sequence)]) + + ($.documentation /.prefix + "" + [(prefix sequence)]) + + ($.documentation /.list + "" + [(list sequence)]) + + ($.documentation /.member? + "" + [(member? equivalence sequence val)]) + + ($.documentation /.sequence + "Sequence literals." + [(is (Sequence Nat) + (sequence 12 34 56 78 90))])] [])) diff --git a/stdlib/source/documentation/lux/data/collection/set.lux b/stdlib/source/documentation/lux/data/collection/set.lux index 2eb5f11c9..b3a16c70c 100644 --- a/stdlib/source/documentation/lux/data/collection/set.lux +++ b/stdlib/source/documentation/lux/data/collection/set.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except list has) - ["$" documentation (.only documentation:)] + ["$" documentation] [data ["[0]" text (.only \n) ["%" \\format (.only format)]]] @@ -13,36 +13,11 @@ ["[1][0]" multi] ["[1][0]" ordered]]) -(documentation: /.has - "" - [(has elem set)]) - -(documentation: /.difference - "" - [(difference sub base)]) - -(documentation: /.intersection - "" - [(intersection filter base)]) - -(documentation: /.sub? - "" - [(sub? super sub)]) - -(documentation: /.super? - "" - [(super? sub super)]) - (.def .public documentation (.List $.Module) ($.module /._ "" - [..has - ..difference - ..intersection - ..sub? - ..super? - ($.default (/.Set it)) + [($.default (/.Set it)) ($.default /.member_hash) ($.default /.empty) ($.default /.size) @@ -55,6 +30,26 @@ ($.default /.monoid) ($.default /.empty?) ($.default /.of_list) - ($.default /.predicate)] + ($.default /.predicate) + + ($.documentation /.has + "" + [(has elem set)]) + + ($.documentation /.difference + "" + [(difference sub base)]) + + ($.documentation /.intersection + "" + [(intersection filter base)]) + + ($.documentation /.sub? + "" + [(sub? super sub)]) + + ($.documentation /.super? + "" + [(super? sub super)])] [/multi.documentation /ordered.documentation])) diff --git a/stdlib/source/documentation/lux/data/collection/set/multi.lux b/stdlib/source/documentation/lux/data/collection/set/multi.lux index 5f48a9e9e..8c494a583 100644 --- a/stdlib/source/documentation/lux/data/collection/set/multi.lux +++ b/stdlib/source/documentation/lux/data/collection/set/multi.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except list has) - ["$" documentation (.only documentation:)] + ["$" documentation] [data ["[0]" text (.only \n) ["%" \\format (.only format)]]] @@ -10,50 +10,11 @@ [\\library ["[0]" /]]) -(documentation: (/.Set it) - "A set that keeps track of repetition in its entries.") - -(documentation: /.has - "" - [(has multiplicity elem set)]) - -(documentation: /.lacks - "" - [(lacks multiplicity elem set)]) - -(documentation: /.multiplicity - "" - [(multiplicity set elem)]) - -(documentation: /.sub? - "Is 'subject' a sub-set of 'reference'?" - [(sub? reference subject)]) - -(documentation: /.support - "A set of the unique (non repeated) members." - [(support set)]) - -(documentation: /.member? - "" - [(member? set elem)]) - -(documentation: /.super? - "Is 'subject' a super-set of 'reference'?") - (.def .public documentation (.List $.Module) ($.module /._ "" - [..Set - ..has - ..lacks - ..multiplicity - - ..sub? - ..support - ..member? - ..super? - ($.default /.empty) + [($.default /.empty) ($.default /.size) ($.default /.list) ($.default /.equivalence) @@ -64,5 +25,35 @@ ($.default /.union) ($.default /.sum) ($.default /.intersection) - ($.default /.difference)] + ($.default /.difference) + + ($.documentation (/.Set it) + "A set that keeps track of repetition in its entries.") + + ($.documentation /.has + "" + [(has multiplicity elem set)]) + + ($.documentation /.lacks + "" + [(lacks multiplicity elem set)]) + + ($.documentation /.multiplicity + "" + [(multiplicity set elem)]) + + ($.documentation /.sub? + "Is 'subject' a sub-set of 'reference'?" + [(sub? reference subject)]) + + ($.documentation /.support + "A set of the unique (non repeated) members." + [(support set)]) + + ($.documentation /.member? + "" + [(member? set elem)]) + + ($.documentation /.super? + "Is 'subject' a super-set of 'reference'?")] [])) diff --git a/stdlib/source/documentation/lux/data/collection/set/ordered.lux b/stdlib/source/documentation/lux/data/collection/set/ordered.lux index 88ae58dc6..ac34d2f5d 100644 --- a/stdlib/source/documentation/lux/data/collection/set/ordered.lux +++ b/stdlib/source/documentation/lux/data/collection/set/ordered.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except list has) - ["$" documentation (.only documentation:)] + ["$" documentation] [data ["[0]" text (.only \n) ["%" \\format (.only format)]]] @@ -10,45 +10,11 @@ [\\library ["[0]" /]]) -(documentation: (/.Set it) - "A set with ordered entries.") - -(documentation: /.member? - "" - [(member? set elem)]) - -(documentation: /.has - "" - [(has elem set)]) - -(documentation: /.lacks - "" - [(lacks elem set)]) - -(documentation: /.difference - "" - [(difference param subject)]) - -(documentation: /.sub? - "Is 'sub' a sub-set of 'super'?" - [(sub? super sub)]) - -(documentation: /.super? - "Is 'super' a super-set of 'sub'?" - [(super? sub super)]) - (.def .public documentation (.List $.Module) ($.module /._ "" - [..Set - ..member? - ..has - ..lacks - ..difference - ..sub? - ..super? - ($.default /.empty) + [($.default /.empty) ($.default /.min) ($.default /.max) ($.default /.size) @@ -57,5 +23,32 @@ ($.default /.of_list) ($.default /.union) ($.default /.intersection) - ($.default /.equivalence)] + ($.default /.equivalence) + + ($.documentation (/.Set it) + "A set with ordered entries.") + + ($.documentation /.member? + "" + [(member? set elem)]) + + ($.documentation /.has + "" + [(has elem set)]) + + ($.documentation /.lacks + "" + [(lacks elem set)]) + + ($.documentation /.difference + "" + [(difference param subject)]) + + ($.documentation /.sub? + "Is 'sub' a sub-set of 'super'?" + [(sub? super sub)]) + + ($.documentation /.super? + "Is 'super' a super-set of 'sub'?" + [(super? sub super)])] [])) diff --git a/stdlib/source/documentation/lux/data/collection/stack.lux b/stdlib/source/documentation/lux/data/collection/stack.lux index da805da8a..e05e774c2 100644 --- a/stdlib/source/documentation/lux/data/collection/stack.lux +++ b/stdlib/source/documentation/lux/data/collection/stack.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except list) - ["$" documentation (.only documentation:)] + ["$" documentation] [data ["[0]" text (.only \n) ["%" \\format (.only format)]]] @@ -10,32 +10,28 @@ [\\library ["[0]" /]]) -(documentation: (/.Stack it) - "A first-in, last-out sequential data-structure.") - -(documentation: /.value - "Yields the top value in the stack, if any." - [(value stack)]) - -(documentation: /.next - "" - [(next stack)]) - -(documentation: /.top - "" - [(top value stack)]) - (.def .public documentation (.List $.Module) ($.module /._ "" - [..Stack - ..value - ..next - ..top - ($.default /.empty) + [($.default /.empty) ($.default /.size) ($.default /.empty?) ($.default /.equivalence) - ($.default /.functor)] + ($.default /.functor) + + ($.documentation (/.Stack it) + "A first-in, last-out sequential data-structure.") + + ($.documentation /.value + "Yields the top value in the stack, if any." + [(value stack)]) + + ($.documentation /.next + "" + [(next stack)]) + + ($.documentation /.top + "" + [(top value stack)])] [])) diff --git a/stdlib/source/documentation/lux/data/collection/stream.lux b/stdlib/source/documentation/lux/data/collection/stream.lux index f77decc5e..5a5021150 100644 --- a/stdlib/source/documentation/lux/data/collection/stream.lux +++ b/stdlib/source/documentation/lux/data/collection/stream.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except list pattern) - ["$" documentation (.only documentation:)] + ["$" documentation] [data ["[0]" text (.only \n) ["%" \\format (.only format)]]] @@ -11,55 +11,11 @@ [\\library ["[0]" /]]) -(documentation: (/.Stream it) - "An infinite sequence of values.") - -(documentation: /.iterations - "A stateful way of infinitely calculating the values of a stream." - [(iterations step init)]) - -(documentation: /.repeated - "Repeat a value forever." - [(repeated x)]) - -(documentation: /.cycle - "Go over the elements of a list forever." - [(cycle [start next])]) - -(documentation: /.item - "" - [(item idx stream)]) - -(documentation: /.only - "A new stream only with items that satisfy the predicate." - [(only predicate stream)]) - -(documentation: /.partition - (format "Split a stream in two based on a predicate." - \n "The left side contains all entries for which the predicate is #1." - \n "The right side contains all entries for which the predicate is #0.") - [(partition left? xs)]) - -(documentation: /.pattern - (format "Allows destructuring of streams in pattern-matching expressions." - \n "Caveat emptor: Only use it for destructuring, and not for testing values within the streams.") - [(let [(pattern x y z _tail) (some_stream_func +1 +2 +3)] - (func x y z))]) - (.def .public documentation (.List $.Module) ($.module /._ "" - [..Stream - ..iterations - ..repeated - ..cycle - ..item - - ..only - ..partition - ..pattern - ($.default /.head) + [($.default /.head) ($.default /.tail) ($.default /.functor) ($.default /.comonad) @@ -68,5 +24,40 @@ ($.default /.first) ($.default /.after) ($.default /.split_when) - ($.default /.split_at)] + ($.default /.split_at) + + ($.documentation (/.Stream it) + "An infinite sequence of values.") + + ($.documentation /.iterations + "A stateful way of infinitely calculating the values of a stream." + [(iterations step init)]) + + ($.documentation /.repeated + "Repeat a value forever." + [(repeated x)]) + + ($.documentation /.cycle + "Go over the elements of a list forever." + [(cycle [start next])]) + + ($.documentation /.item + "" + [(item idx stream)]) + + ($.documentation /.only + "A new stream only with items that satisfy the predicate." + [(only predicate stream)]) + + ($.documentation /.partition + (format "Split a stream in two based on a predicate." + \n "The left side contains all entries for which the predicate is #1." + \n "The right side contains all entries for which the predicate is #0.") + [(partition left? xs)]) + + ($.documentation /.pattern + (format "Allows destructuring of streams in pattern-matching expressions." + \n "Caveat emptor: Only use it for destructuring, and not for testing values within the streams.") + [(let [(pattern x y z _tail) (some_stream_func +1 +2 +3)] + (func x y z))])] [])) diff --git a/stdlib/source/documentation/lux/data/collection/tree.lux b/stdlib/source/documentation/lux/data/collection/tree.lux index 9c9fe9ad5..91324bbcf 100644 --- a/stdlib/source/documentation/lux/data/collection/tree.lux +++ b/stdlib/source/documentation/lux/data/collection/tree.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except list) - ["$" documentation (.only documentation:)] + ["$" documentation] [data ["[0]" text (.only \n) ["%" \\format (.only format)]]] @@ -13,40 +13,35 @@ ["[1][0]" finger] ["[1][0]" zipper]]) -(documentation: (/.Tree it) - "A generic tree data-structure.") - -(documentation: /.flat - "All the leaf values of the tree, in order." - [(flat tree)]) - -(documentation: /.leaf - "" - [(leaf value)]) - -(documentation: /.branch - "" - [(branch value children)]) - -(documentation: /.tree - "Tree literals." - [(is (Tree Nat) - (tree 12 - {34 {} - 56 {} - 78 {90 {}}}))]) - (.def .public documentation (.List $.Module) ($.module /._ "" - [..Tree - ..flat - ..leaf - ..branch - ..tree - ($.default /.equivalence) + [($.default /.equivalence) ($.default /.functor) - ($.default /.mix)] + ($.default /.mix) + + ($.documentation (/.Tree it) + "A generic tree data-structure.") + + ($.documentation /.flat + "All the leaf values of the tree, in order." + [(flat tree)]) + + ($.documentation /.leaf + "" + [(leaf value)]) + + ($.documentation /.branch + "" + [(branch value children)]) + + ($.documentation /.tree + "Tree literals." + [(is (Tree Nat) + (tree 12 + {34 {} + 56 {} + 78 {90 {}}}))])] [/finger.documentation /zipper.documentation])) diff --git a/stdlib/source/documentation/lux/data/collection/tree/finger.lux b/stdlib/source/documentation/lux/data/collection/tree/finger.lux index 31f2dac1f..7386f313e 100644 --- a/stdlib/source/documentation/lux/data/collection/tree/finger.lux +++ b/stdlib/source/documentation/lux/data/collection/tree/finger.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except list) - ["$" documentation (.only documentation:)] + ["$" documentation] [data ["[0]" text (.only \n) ["%" \\format (.only format)]]] @@ -10,48 +10,40 @@ [\\library ["[0]" /]]) -(documentation: (/.Tree @ tag value) - "A finger tree.") +(.def .public documentation + (.List $.Module) + ($.module /._ + "" + [($.default /.tag) + ($.default /.root) -(documentation: (/.Builder @ tag) - "A builder for finter tree structures.") + ($.documentation (/.Tree @ tag value) + "A finger tree.") -(documentation: /.builder - "A new builder using the given monoid." - [(builder monoid)]) + ($.documentation (/.Builder @ tag) + "A builder for finter tree structures.") -(documentation: /.value - "" - [(value tree)]) + ($.documentation /.builder + "A new builder using the given monoid." + [(builder monoid)]) -(documentation: /.tags - "" - [(tags tree)]) + ($.documentation /.value + "" + [(value tree)]) -(documentation: /.values - "" - [(values tree)]) + ($.documentation /.tags + "" + [(tags tree)]) -(documentation: /.one - "Finds one value that meets the predicate." - [(one predicate tree)]) + ($.documentation /.values + "" + [(values tree)]) -(documentation: /.exists? - "Verifies that a value exists which meets the predicate." - [(exists? predicate tree)]) + ($.documentation /.one + "Finds one value that meets the predicate." + [(one predicate tree)]) -(.def .public documentation - (.List $.Module) - ($.module /._ - "" - [..Tree - ..Builder - ..builder - ..value - ..tags - ..values - ..one - ..exists? - ($.default /.tag) - ($.default /.root)] + ($.documentation /.exists? + "Verifies that a value exists which meets the predicate." + [(exists? predicate tree)])] [])) diff --git a/stdlib/source/documentation/lux/data/collection/tree/zipper.lux b/stdlib/source/documentation/lux/data/collection/tree/zipper.lux index 4ad5aae46..76fb1602c 100644 --- a/stdlib/source/documentation/lux/data/collection/tree/zipper.lux +++ b/stdlib/source/documentation/lux/data/collection/tree/zipper.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except list) - ["$" documentation (.only documentation:)] + ["$" documentation] [data ["[0]" text (.only \n) ["%" \\format (.only format)]]] @@ -10,35 +10,11 @@ [\\library ["[0]" /]]) -(documentation: (/.Zipper it) - "Tree zippers, for easy navigation and editing of trees.") - -(documentation: /.set - "" - [(set value zipper)]) - -(documentation: /.update - "" - [(update transform zipper)]) - -(documentation: /.interpose - "" - [(interpose value zipper)]) - -(documentation: /.adopt - "" - [(adopt value zipper)]) - (.def .public documentation (.List $.Module) ($.module /._ "" - [..Zipper - ..set - ..update - ..interpose - ..adopt - ($.default /.equivalence) + [($.default /.equivalence) ($.default /.zipper) ($.default /.tree) ($.default /.value) @@ -60,5 +36,24 @@ ($.default /.insert_left) ($.default /.insert_right) ($.default /.functor) - ($.default /.comonad)] + ($.default /.comonad) + + ($.documentation (/.Zipper it) + "Tree zippers, for easy navigation and editing of trees.") + + ($.documentation /.set + "" + [(set value zipper)]) + + ($.documentation /.update + "" + [(update transform zipper)]) + + ($.documentation /.interpose + "" + [(interpose value zipper)]) + + ($.documentation /.adopt + "" + [(adopt value zipper)])] [])) diff --git a/stdlib/source/documentation/lux/data/color.lux b/stdlib/source/documentation/lux/data/color.lux index 603ccb07b..fade67993 100644 --- a/stdlib/source/documentation/lux/data/color.lux +++ b/stdlib/source/documentation/lux/data/color.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except) - ["$" documentation (.only documentation:)] + ["$" documentation] [data ["[0]" text (.only \n) ["%" \\format (.only format)]]] @@ -15,114 +15,92 @@ ["[0]" / ["[1][0]" named]]) -(documentation: /.RGB - "Red-Green-Blue color format.") - -(documentation: /.HSL - "Hue-Saturation-Lightness color format.") - -(documentation: /.CMYK - "Cyan-Magenta-Yellow-Key color format.") - -(documentation: /.HSB - "Hue-Saturation-Brightness color format.") - -(documentation: /.Color - "A color value, independent of color format.") - -(documentation: /.complement - "The opposite color." - [(complement color)]) - -(documentation: /.interpolated - "" - [(interpolated ratio end start)]) - (def palette_documentation (syntax (_ [[_ name] <code>.symbol]) (in (list (code.text (format "A " (text.replaced "_" "-" name) " palette.")))))) -(documentation: /.analogous - (palette_documentation /.analogous) - [(analogous spread variations color)]) - -(documentation: /.monochromatic - (palette_documentation /.monochromatic) - [(monochromatic spread variations color)]) - -(documentation: /.Alpha - "The degree of transparency of a pigment.") - -(documentation: /.transparent - "The maximum degree of transparency.") - -(documentation: /.translucent - "The average degree of transparency.") - -(documentation: /.opaque - "The minimum degree of transparency.") - -(documentation: /.Pigment - "A color with some degree of transparency.") - -(with_template [<name>] - [(`` (documentation: <name> - (format "A " - (text.replaced "_" "-" (~~ (template.text [<name>]))) - " color scheme.")))] - - [/.triad] - [/.clash] - [/.split_complement] - [/.square] - [/.tetradic] - ) - -(.def .public documentation - (.List $.Module) - ($.module /._ - "" - [..RGB - ..HSL - ..CMYK - ..HSB - ..Color - ..complement - ..interpolated - - ..analogous - ..monochromatic - ..Alpha - ..transparent - ..translucent - ..opaque - ..Pigment - - ..triad - ..clash - ..split_complement - ..square - ..tetradic - - ($.default /.of_rgb) - ($.default /.rgb) - ($.default /.equivalence) - ($.default /.hash) - ($.default /.black) - ($.default /.white) - ($.default /.addition) - ($.default /.subtraction) - ($.default /.hsl) - ($.default /.of_hsl) - ($.default /.hsb) - ($.default /.of_hsb) - ($.default /.cmyk) - ($.default /.of_cmyk) - ($.default /.gray_scale) - ($.default /.Spread) - ($.default /.Palette) - ($.default /.darker) - ($.default /.brighter) - ($.default /.saturated) - ($.default /.un_saturated)] - [/named.documentation])) +(`` (.def .public documentation + (.List $.Module) + ($.module /._ + "" + [($.default /.of_rgb) + ($.default /.rgb) + ($.default /.equivalence) + ($.default /.hash) + ($.default /.black) + ($.default /.white) + ($.default /.addition) + ($.default /.subtraction) + ($.default /.hsl) + ($.default /.of_hsl) + ($.default /.hsb) + ($.default /.of_hsb) + ($.default /.cmyk) + ($.default /.of_cmyk) + ($.default /.gray_scale) + ($.default /.Spread) + ($.default /.Palette) + ($.default /.darker) + ($.default /.brighter) + ($.default /.saturated) + ($.default /.un_saturated) + + ($.documentation /.RGB + "Red-Green-Blue color format.") + + ($.documentation /.HSL + "Hue-Saturation-Lightness color format.") + + ($.documentation /.CMYK + "Cyan-Magenta-Yellow-Key color format.") + + ($.documentation /.HSB + "Hue-Saturation-Brightness color format.") + + ($.documentation /.Color + "A color value, independent of color format.") + + ($.documentation /.complement + "The opposite color." + [(complement color)]) + + ($.documentation /.interpolated + "" + [(interpolated ratio end start)]) + + ($.documentation /.analogous + (palette_documentation /.analogous) + [(analogous spread variations color)]) + + ($.documentation /.monochromatic + (palette_documentation /.monochromatic) + [(monochromatic spread variations color)]) + + ($.documentation /.Alpha + "The degree of transparency of a pigment.") + + ($.documentation /.transparent + "The maximum degree of transparency.") + + ($.documentation /.translucent + "The average degree of transparency.") + + ($.documentation /.opaque + "The minimum degree of transparency.") + + ($.documentation /.Pigment + "A color with some degree of transparency.") + + (~~ (with_template [<name>] + [(`` ($.documentation <name> + (format "A " + (text.replaced "_" "-" (~~ (template.text [<name>]))) + " color scheme.")))] + + [/.triad] + [/.clash] + [/.split_complement] + [/.square] + [/.tetradic] + ))] + [/named.documentation]))) diff --git a/stdlib/source/documentation/lux/data/color/named.lux b/stdlib/source/documentation/lux/data/color/named.lux index d905485f0..94f5df07b 100644 --- a/stdlib/source/documentation/lux/data/color/named.lux +++ b/stdlib/source/documentation/lux/data/color/named.lux @@ -1,315 +1,173 @@ (.require [library [lux (.except) - ["$" documentation (.only documentation:)] + ["$" documentation] [data - ["[0]" text + ["[0]" text (.only) ["%" \\format (.only format)]]] [macro ["[0]" code] ["[0]" template]] [math [number - ["[0]" nat ("hex#[0]" hex)]]]]] + ["[0]" nat (.use "hex#[0]" hex)]]]]] [\\library - ["[0]" / + ["[0]" / (.only) ["/[1]" //]]]) -(with_template [<name>] - [(documentation: <name> - (let [[red green blue] (//.rgb <name>) - [_ name] (symbol <name>)] - (format "R:" (hex#encoded red) - " G:" (hex#encoded green) - " B:" (hex#encoded blue) - " | " (text.replaced "_" " " name))))] +(`` (.def .public documentation + (.List $.Module) + ($.module /._ + "" + [(~~ (with_template [<name>] + [($.documentation <name> + (let [[red green blue] (//.rgb <name>) + [_ name] (symbol <name>)] + (format "R:" (hex#encoded red) + " G:" (hex#encoded green) + " B:" (hex#encoded blue) + " | " (text.replaced "_" " " name))))] - [/.alice_blue] - [/.antique_white] - [/.aqua] - [/.aquamarine] - [/.azure] - [/.beige] - [/.bisque] - [/.black] - [/.blanched_almond] - [/.blue] - [/.blue_violet] - [/.brown] - [/.burly_wood] - [/.cadet_blue] - [/.chartreuse] - [/.chocolate] - [/.coral] - [/.cornflower_blue] - [/.cornsilk] - [/.crimson] - [/.cyan] - [/.dark_blue] - [/.dark_cyan] - [/.dark_goldenrod] - [/.dark_gray] - [/.dark_green] - [/.dark_khaki] - [/.dark_magenta] - [/.dark_olive_green] - [/.dark_orange] - [/.dark_orchid] - [/.dark_red] - [/.dark_salmon] - [/.dark_sea_green] - [/.dark_slate_blue] - [/.dark_slate_gray] - [/.dark_turquoise] - [/.dark_violet] - [/.deep_pink] - [/.deep_sky_blue] - [/.dim_gray] - [/.dodger_blue] - [/.fire_brick] - [/.floral_white] - [/.forest_green] - [/.fuchsia] - [/.gainsboro] - [/.ghost_white] - [/.gold] - [/.goldenrod] - [/.gray] - [/.green] - [/.green_yellow] - [/.honey_dew] - [/.hot_pink] - [/.indian_red] - [/.indigo] - [/.ivory] - [/.khaki] - [/.lavender] - [/.lavender_blush] - [/.lawn_green] - [/.lemon_chiffon] - [/.light_blue] - [/.light_coral] - [/.light_cyan] - [/.light_goldenrod_yellow] - [/.light_gray] - [/.light_green] - [/.light_pink] - [/.light_salmon] - [/.light_sea_green] - [/.light_sky_blue] - [/.light_slate_gray] - [/.light_steel_blue] - [/.light_yellow] - [/.lime] - [/.lime_green] - [/.linen] - [/.magenta] - [/.maroon] - [/.medium_aquamarine] - [/.medium_blue] - [/.medium_orchid] - [/.medium_purple] - [/.medium_sea_green] - [/.medium_slate_blue] - [/.medium_spring_green] - [/.medium_turquoise] - [/.medium_violet_red] - [/.midnight_blue] - [/.mint_cream] - [/.misty_rose] - [/.moccasin] - [/.navajo_white] - [/.navy] - [/.old_lace] - [/.olive] - [/.olive_drab] - [/.orange] - [/.orange_red] - [/.orchid] - [/.pale_goldenrod] - [/.pale_green] - [/.pale_turquoise] - [/.pale_violet_red] - [/.papaya_whip] - [/.peach_puff] - [/.peru] - [/.pink] - [/.plum] - [/.powder_blue] - [/.purple] - [/.rebecca_purple] - [/.red] - [/.rosy_brown] - [/.royal_blue] - [/.saddle_brown] - [/.salmon] - [/.sandy_brown] - [/.sea_green] - [/.sea_shell] - [/.sienna] - [/.silver] - [/.sky_blue] - [/.slate_blue] - [/.slate_gray] - [/.snow] - [/.spring_green] - [/.steel_blue] - [/.tan] - [/.teal] - [/.thistle] - [/.tomato] - [/.turquoise] - [/.violet] - [/.wheat] - [/.white] - [/.white_smoke] - [/.yellow] - [/.yellow_green] - ) - -(.def .public documentation - (.List $.Module) - ($.module /._ - "" - [..alice_blue - ..antique_white - ..aqua - ..aquamarine - ..azure - ..beige - ..bisque - ..black - ..blanched_almond - ..blue - ..blue_violet - ..brown - ..burly_wood - ..cadet_blue - ..chartreuse - ..chocolate - ..coral - ..cornflower_blue - ..cornsilk - ..crimson - ..cyan - ..dark_blue - ..dark_cyan - ..dark_goldenrod - ..dark_gray - ..dark_green - ..dark_khaki - ..dark_magenta - ..dark_olive_green - ..dark_orange - ..dark_orchid - ..dark_red - ..dark_salmon - ..dark_sea_green - ..dark_slate_blue - ..dark_slate_gray - ..dark_turquoise - ..dark_violet - ..deep_pink - ..deep_sky_blue - ..dim_gray - ..dodger_blue - ..fire_brick - ..floral_white - ..forest_green - ..fuchsia - ..gainsboro - ..ghost_white - ..gold - ..goldenrod - ..gray - ..green - ..green_yellow - ..honey_dew - ..hot_pink - ..indian_red - ..indigo - ..ivory - ..khaki - ..lavender - ..lavender_blush - ..lawn_green - ..lemon_chiffon - ..light_blue - ..light_coral - ..light_cyan - ..light_goldenrod_yellow - ..light_gray - ..light_green - ..light_pink - ..light_salmon - ..light_sea_green - ..light_sky_blue - ..light_slate_gray - ..light_steel_blue - ..light_yellow - ..lime - ..lime_green - ..linen - ..magenta - ..maroon - ..medium_aquamarine - ..medium_blue - ..medium_orchid - ..medium_purple - ..medium_sea_green - ..medium_slate_blue - ..medium_spring_green - ..medium_turquoise - ..medium_violet_red - ..midnight_blue - ..mint_cream - ..misty_rose - ..moccasin - ..navajo_white - ..navy - ..old_lace - ..olive - ..olive_drab - ..orange - ..orange_red - ..orchid - ..pale_goldenrod - ..pale_green - ..pale_turquoise - ..pale_violet_red - ..papaya_whip - ..peach_puff - ..peru - ..pink - ..plum - ..powder_blue - ..purple - ..rebecca_purple - ..red - ..rosy_brown - ..royal_blue - ..saddle_brown - ..salmon - ..sandy_brown - ..sea_green - ..sea_shell - ..sienna - ..silver - ..sky_blue - ..slate_blue - ..slate_gray - ..snow - ..spring_green - ..steel_blue - ..tan - ..teal - ..thistle - ..tomato - ..turquoise - ..violet - ..wheat - ..white - ..white_smoke - ..yellow - ..yellow_green] - [])) + [/.alice_blue] + [/.antique_white] + [/.aqua] + [/.aquamarine] + [/.azure] + [/.beige] + [/.bisque] + [/.black] + [/.blanched_almond] + [/.blue] + [/.blue_violet] + [/.brown] + [/.burly_wood] + [/.cadet_blue] + [/.chartreuse] + [/.chocolate] + [/.coral] + [/.cornflower_blue] + [/.cornsilk] + [/.crimson] + [/.cyan] + [/.dark_blue] + [/.dark_cyan] + [/.dark_goldenrod] + [/.dark_gray] + [/.dark_green] + [/.dark_khaki] + [/.dark_magenta] + [/.dark_olive_green] + [/.dark_orange] + [/.dark_orchid] + [/.dark_red] + [/.dark_salmon] + [/.dark_sea_green] + [/.dark_slate_blue] + [/.dark_slate_gray] + [/.dark_turquoise] + [/.dark_violet] + [/.deep_pink] + [/.deep_sky_blue] + [/.dim_gray] + [/.dodger_blue] + [/.fire_brick] + [/.floral_white] + [/.forest_green] + [/.fuchsia] + [/.gainsboro] + [/.ghost_white] + [/.gold] + [/.goldenrod] + [/.gray] + [/.green] + [/.green_yellow] + [/.honey_dew] + [/.hot_pink] + [/.indian_red] + [/.indigo] + [/.ivory] + [/.khaki] + [/.lavender] + [/.lavender_blush] + [/.lawn_green] + [/.lemon_chiffon] + [/.light_blue] + [/.light_coral] + [/.light_cyan] + [/.light_goldenrod_yellow] + [/.light_gray] + [/.light_green] + [/.light_pink] + [/.light_salmon] + [/.light_sea_green] + [/.light_sky_blue] + [/.light_slate_gray] + [/.light_steel_blue] + [/.light_yellow] + [/.lime] + [/.lime_green] + [/.linen] + [/.magenta] + [/.maroon] + [/.medium_aquamarine] + [/.medium_blue] + [/.medium_orchid] + [/.medium_purple] + [/.medium_sea_green] + [/.medium_slate_blue] + [/.medium_spring_green] + [/.medium_turquoise] + [/.medium_violet_red] + [/.midnight_blue] + [/.mint_cream] + [/.misty_rose] + [/.moccasin] + [/.navajo_white] + [/.navy] + [/.old_lace] + [/.olive] + [/.olive_drab] + [/.orange] + [/.orange_red] + [/.orchid] + [/.pale_goldenrod] + [/.pale_green] + [/.pale_turquoise] + [/.pale_violet_red] + [/.papaya_whip] + [/.peach_puff] + [/.peru] + [/.pink] + [/.plum] + [/.powder_blue] + [/.purple] + [/.rebecca_purple] + [/.red] + [/.rosy_brown] + [/.royal_blue] + [/.saddle_brown] + [/.salmon] + [/.sandy_brown] + [/.sea_green] + [/.sea_shell] + [/.sienna] + [/.silver] + [/.sky_blue] + [/.slate_blue] + [/.slate_gray] + [/.snow] + [/.spring_green] + [/.steel_blue] + [/.tan] + [/.teal] + [/.thistle] + [/.tomato] + [/.turquoise] + [/.violet] + [/.wheat] + [/.white] + [/.white_smoke] + [/.yellow] + [/.yellow_green] + ))] + []))) diff --git a/stdlib/source/documentation/lux/data/format.lux b/stdlib/source/documentation/lux/data/format.lux index d3e29fdc1..794ebe065 100644 --- a/stdlib/source/documentation/lux/data/format.lux +++ b/stdlib/source/documentation/lux/data/format.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except) - ["$" documentation (.only documentation:)] + ["$" documentation] [data [text (.only \n) ["%" \\format (.only format)]] diff --git a/stdlib/source/documentation/lux/data/identity.lux b/stdlib/source/documentation/lux/data/identity.lux index f5a0d9589..efb6520f5 100644 --- a/stdlib/source/documentation/lux/data/identity.lux +++ b/stdlib/source/documentation/lux/data/identity.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except nat int rev list or and) - ["$" documentation (.only documentation:)] + ["$" documentation] [data [text (.only \n) ["%" \\format (.only format)]]] @@ -10,16 +10,15 @@ [\\library ["[0]" /]]) -(documentation: (/.Identity it) - "A value, as is, without any extra structure super-imposed on it.") - (.def .public documentation (.List $.Module) ($.module /._ "" - [..Identity - ($.default /.functor) + [($.default /.functor) ($.default /.apply) ($.default /.monad) - ($.default /.comonad)] + ($.default /.comonad) + + ($.documentation (/.Identity it) + "A value, as is, without any extra structure super-imposed on it.")] [])) diff --git a/stdlib/source/documentation/lux/data/product.lux b/stdlib/source/documentation/lux/data/product.lux index 05cb3fc80..6a2921eab 100644 --- a/stdlib/source/documentation/lux/data/product.lux +++ b/stdlib/source/documentation/lux/data/product.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except left right) - ["$" documentation (.only documentation:)] + ["$" documentation] [data [text ["%" \\format (.only format)]]] @@ -10,43 +10,36 @@ [\\library ["[0]" /]]) -(documentation: /.left - "The left side of a pair.") +(.def .public documentation + (.List $.Module) + ($.module /._ + "Functionality for working with tuples (particularly 2-tuples/pairs)." + [($.default /.equivalence) + ($.default /.hash) -(documentation: /.right - "The right side of a pair.") + ($.documentation /.left + "The left side of a pair.") -(documentation: /.curried - "Converts a 2-argument function into nested single-argument functions." - [(curried f)]) + ($.documentation /.right + "The right side of a pair.") -(documentation: /.uncurried - "Converts nested single-argument functions into a 2-argument function." - [(uncurried f)]) + ($.documentation /.curried + "Converts a 2-argument function into nested single-argument functions." + [(curried f)]) -(documentation: /.swapped - "" - [(swapped [left right])]) + ($.documentation /.uncurried + "Converts nested single-argument functions into a 2-argument function." + [(uncurried f)]) -(documentation: /.then - "Apply functions to both sides of a pair." - [(then f g)]) + ($.documentation /.swapped + "" + [(swapped [left right])]) -(documentation: /.forked - "Yields a pair by applying both functions to a single value." - [(forked f g)]) + ($.documentation /.then + "Apply functions to both sides of a pair." + [(then f g)]) -(.def .public documentation - (.List $.Module) - ($.module /._ - "Functionality for working with tuples (particularly 2-tuples/pairs)." - [..left - ..right - ..curried - ..uncurried - ..swapped - ..then - ..forked - ($.default /.equivalence) - ($.default /.hash)] + ($.documentation /.forked + "Yields a pair by applying both functions to a single value." + [(forked f g)])] [])) diff --git a/stdlib/source/documentation/lux/data/sum.lux b/stdlib/source/documentation/lux/data/sum.lux index f937487f2..cf4df8be5 100644 --- a/stdlib/source/documentation/lux/data/sum.lux +++ b/stdlib/source/documentation/lux/data/sum.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except left right) - ["$" documentation (.only documentation:)] + ["$" documentation] [data [text (.only \n) ["%" \\format (.only format)]]] @@ -10,31 +10,27 @@ [\\library ["[0]" /]]) -(documentation: /.left - "Lifts value to the left side of a 2-variant.") - -(documentation: /.right - "Lifts value to the right side of a 2-variant.") - -(documentation: /.either - "Applies a function to either side of a 2-variant." - [(either on_left on_right)]) - -(documentation: /.then - "Applies functions to both sides of a 2-variant." - [(then on_left on_right)]) - (.def .public documentation (.List $.Module) ($.module /._ "Functionality for working with variants (particularly 2-variants)." - [..left - ..right - ..either - ..then - ($.default /.lefts) + [($.default /.lefts) ($.default /.rights) ($.default /.partition) ($.default /.equivalence) - ($.default /.hash)] + ($.default /.hash) + + ($.documentation /.left + "Lifts value to the left side of a 2-variant.") + + ($.documentation /.right + "Lifts value to the right side of a 2-variant.") + + ($.documentation /.either + "Applies a function to either side of a 2-variant." + [(either on_left on_right)]) + + ($.documentation /.then + "Applies functions to both sides of a 2-variant." + [(then on_left on_right)])] [])) diff --git a/stdlib/source/documentation/lux/data/text.lux b/stdlib/source/documentation/lux/data/text.lux index d8954f75d..d0ca26967 100644 --- a/stdlib/source/documentation/lux/data/text.lux +++ b/stdlib/source/documentation/lux/data/text.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except char) - ["$" documentation (.only documentation:)] + ["$" documentation] [data [text ["%" \\format (.only format)]] @@ -17,124 +17,11 @@ [\\library ["[0]" /]]) -(documentation: /.Char - "A character code number.") - -(documentation: /.line_feed - "Same as 'new_line'.") - -(documentation: /.char - "Yields the character at the specified index." - [(char index input)]) - -(documentation: /.index_since - "" - [(index_since from pattern input)]) - -(documentation: /.index - "" - [(index pattern input)]) - -(documentation: /.last_index - "" - [(last_index part text)]) - -(documentation: /.starts_with? - "" - [(starts_with? prefix x)]) - -(documentation: /.ends_with? - "" - [(ends_with? postfix x)]) - -(documentation: /.enclosed_by? - "" - [(enclosed_by? boundary value)]) - -(documentation: /.contains? - "" - [(contains? sub text)]) - -(documentation: /.prefix - "" - [(prefix param subject)]) - -(documentation: /.suffix - "" - [(suffix param subject)]) - -(documentation: /.enclosed - "Surrounds the given content text with left and right side additions." - [(enclosed [left right] content)]) - -(documentation: /.enclosed' - "Surrounds the given content text with the same boundary text." - [(enclosed' boundary content)]) - -(documentation: /.clip - "Clips a chunk of text from the input at the specified offset and of the specified size." - [(clip offset size input)]) - -(documentation: /.clip_since - "Clips the remaining text from the input at the specified offset." - [(clip_since offset input)]) - -(documentation: /.split_at - "" - [(split_at at x)]) - -(documentation: /.split_by - "" - [(split_by token sample)]) - -(documentation: /.all_split_by - "" - [(all_split_by token sample)]) - -(documentation: /.replaced_once - "" - [(replaced_once pattern replacement template)]) - -(documentation: /.replaced - "" - [(replaced pattern replacement template)]) - -(documentation: /.interposed - "" - [(interposed separator texts)]) - -(documentation: /.space? - "Checks whether the character is white-space." - [(space? char)]) - (.def .public documentation (.List $.Module) ($.module /._ "" - [..Char - ..line_feed - ..char - ..index_since - ..index - ..last_index - ..starts_with? - ..ends_with? - ..enclosed_by? - ..contains? - ..prefix - ..suffix - ..enclosed - ..enclosed' - ..clip - ..clip_since - ..split_at - ..split_by - ..all_split_by - ..replaced_once - ..replaced - ..interposed - ..space? - ($.default /.of_char) + [($.default /.of_char) ($.default /.\0) ($.default /.null) @@ -165,7 +52,97 @@ ($.default /.empty?) ($.default /.space) ($.default /.lower_cased) - ($.default /.upper_cased)] + ($.default /.upper_cased) + + ($.documentation /.Char + "A character code number.") + + ($.documentation /.line_feed + "Same as 'new_line'.") + + ($.documentation /.char + "Yields the character at the specified index." + [(char index input)]) + + ($.documentation /.index_since + "" + [(index_since from pattern input)]) + + ($.documentation /.index + "" + [(index pattern input)]) + + ($.documentation /.last_index + "" + [(last_index part text)]) + + ($.documentation /.starts_with? + "" + [(starts_with? prefix x)]) + + ($.documentation /.ends_with? + "" + [(ends_with? postfix x)]) + + ($.documentation /.enclosed_by? + "" + [(enclosed_by? boundary value)]) + + ($.documentation /.contains? + "" + [(contains? sub text)]) + + ($.documentation /.prefix + "" + [(prefix param subject)]) + + ($.documentation /.suffix + "" + [(suffix param subject)]) + + ($.documentation /.enclosed + "Surrounds the given content text with left and right side additions." + [(enclosed [left right] content)]) + + ($.documentation /.enclosed' + "Surrounds the given content text with the same boundary text." + [(enclosed' boundary content)]) + + ($.documentation /.clip + "Clips a chunk of text from the input at the specified offset and of the specified size." + [(clip offset size input)]) + + ($.documentation /.clip_since + "Clips the remaining text from the input at the specified offset." + [(clip_since offset input)]) + + ($.documentation /.split_at + "" + [(split_at at x)]) + + ($.documentation /.split_by + "" + [(split_by token sample)]) + + ($.documentation /.all_split_by + "" + [(all_split_by token sample)]) + + ($.documentation /.replaced_once + "" + [(replaced_once pattern replacement template)]) + + ($.documentation /.replaced + "" + [(replaced pattern replacement template)]) + + ($.documentation /.interposed + "" + [(interposed separator texts)]) + + ($.documentation /.space? + "Checks whether the character is white-space." + [(space? char)])] [/buffer.documentation /encoding.documentation /escape.documentation diff --git a/stdlib/source/documentation/lux/data/text/buffer.lux b/stdlib/source/documentation/lux/data/text/buffer.lux index 91c41be9f..a510bebab 100644 --- a/stdlib/source/documentation/lux/data/text/buffer.lux +++ b/stdlib/source/documentation/lux/data/text/buffer.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except) - ["$" documentation (.only documentation:)] + ["$" documentation] [data [text (.only \n) ["%" \\format (.only format)]]] @@ -10,16 +10,15 @@ [\\library ["[0]" /]]) -(documentation: /.Buffer - "Immutable text buffer for efficient text concatenation.") - (.def .public documentation (.List $.Module) ($.module /._ "" - [..Buffer - ($.default /.empty) + [($.default /.empty) ($.default /.then) ($.default /.size) - ($.default /.text)] + ($.default /.text) + + ($.documentation /.Buffer + "Immutable text buffer for efficient text concatenation.")] [])) diff --git a/stdlib/source/documentation/lux/data/text/encoding.lux b/stdlib/source/documentation/lux/data/text/encoding.lux index 4fd845ff3..fbc82281a 100644 --- a/stdlib/source/documentation/lux/data/text/encoding.lux +++ b/stdlib/source/documentation/lux/data/text/encoding.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except) - ["$" documentation (.only documentation:)] + ["$" documentation] [data [text (.only \n) ["%" \\format (.only format)]]] @@ -12,307 +12,161 @@ ["[0]" / ["[1][0]" utf8]]) -(documentation: /.Encoding - "Encoding formats for text.") +(`` (.def .public documentation + (.List $.Module) + ($.module /._ + "" + [($.default /.name) -(with_template [<name>] - [(documentation: <name> - (format "'" (/.name <name>) "' text encoding. "))] + (documentation: /.Encoding + "Encoding formats for text.") - [/.ascii] + (~~ (with_template [<name>] + [(documentation: <name> + (format "'" (/.name <name>) "' text encoding. "))] - [/.ibm_037] - [/.ibm_273] - [/.ibm_277] - [/.ibm_278] - [/.ibm_280] - [/.ibm_284] - [/.ibm_285] - [/.ibm_290] - [/.ibm_297] - [/.ibm_300] - [/.ibm_420] - [/.ibm_424] - [/.ibm_437] - [/.ibm_500] - [/.ibm_737] - [/.ibm_775] - [/.ibm_833] - [/.ibm_834] - [/.ibm_838] - [/.ibm_850] - [/.ibm_852] - [/.ibm_855] - [/.ibm_856] - [/.ibm_857] - [/.ibm_858] - [/.ibm_860] - [/.ibm_861] - [/.ibm_862] - [/.ibm_863] - [/.ibm_864] - [/.ibm_865] - [/.ibm_866] - [/.ibm_868] - [/.ibm_869] - [/.ibm_870] - [/.ibm_871] - [/.ibm_874] - [/.ibm_875] - [/.ibm_918] - [/.ibm_921] - [/.ibm_922] - [/.ibm_930] - [/.ibm_933] - [/.ibm_935] - [/.ibm_937] - [/.ibm_939] - [/.ibm_942] - [/.ibm_942c] - [/.ibm_943] - [/.ibm_943c] - [/.ibm_948] - [/.ibm_949] - [/.ibm_949c] - [/.ibm_950] - [/.ibm_964] - [/.ibm_970] - [/.ibm_1006] - [/.ibm_1025] - [/.ibm_1026] - [/.ibm_1046] - [/.ibm_1047] - [/.ibm_1097] - [/.ibm_1098] - [/.ibm_1112] - [/.ibm_1122] - [/.ibm_1123] - [/.ibm_1124] - [/.ibm_1140] - [/.ibm_1141] - [/.ibm_1142] - [/.ibm_1143] - [/.ibm_1144] - [/.ibm_1145] - [/.ibm_1146] - [/.ibm_1147] - [/.ibm_1148] - [/.ibm_1149] - [/.ibm_1166] - [/.ibm_1364] - [/.ibm_1381] - [/.ibm_1383] - [/.ibm_33722] - - [/.iso_2022_cn] - [/.iso2022_cn_cns] - [/.iso2022_cn_gb] - [/.iso_2022_jp] - [/.iso_2022_jp_2] - [/.iso_2022_kr] - [/.iso_8859_1] - [/.iso_8859_2] - [/.iso_8859_3] - [/.iso_8859_4] - [/.iso_8859_5] - [/.iso_8859_6] - [/.iso_8859_7] - [/.iso_8859_8] - [/.iso_8859_9] - [/.iso_8859_11] - [/.iso_8859_13] - [/.iso_8859_15] + [/.ascii] - [/.mac_arabic] - [/.mac_central_europe] - [/.mac_croatian] - [/.mac_cyrillic] - [/.mac_dingbat] - [/.mac_greek] - [/.mac_hebrew] - [/.mac_iceland] - [/.mac_roman] - [/.mac_romania] - [/.mac_symbol] - [/.mac_thai] - [/.mac_turkish] - [/.mac_ukraine] - - [/.utf_8] - [/.utf_16] - [/.utf_32] + [/.ibm_037] + [/.ibm_273] + [/.ibm_277] + [/.ibm_278] + [/.ibm_280] + [/.ibm_284] + [/.ibm_285] + [/.ibm_290] + [/.ibm_297] + [/.ibm_300] + [/.ibm_420] + [/.ibm_424] + [/.ibm_437] + [/.ibm_500] + [/.ibm_737] + [/.ibm_775] + [/.ibm_833] + [/.ibm_834] + [/.ibm_838] + [/.ibm_850] + [/.ibm_852] + [/.ibm_855] + [/.ibm_856] + [/.ibm_857] + [/.ibm_858] + [/.ibm_860] + [/.ibm_861] + [/.ibm_862] + [/.ibm_863] + [/.ibm_864] + [/.ibm_865] + [/.ibm_866] + [/.ibm_868] + [/.ibm_869] + [/.ibm_870] + [/.ibm_871] + [/.ibm_874] + [/.ibm_875] + [/.ibm_918] + [/.ibm_921] + [/.ibm_922] + [/.ibm_930] + [/.ibm_933] + [/.ibm_935] + [/.ibm_937] + [/.ibm_939] + [/.ibm_942] + [/.ibm_942c] + [/.ibm_943] + [/.ibm_943c] + [/.ibm_948] + [/.ibm_949] + [/.ibm_949c] + [/.ibm_950] + [/.ibm_964] + [/.ibm_970] + [/.ibm_1006] + [/.ibm_1025] + [/.ibm_1026] + [/.ibm_1046] + [/.ibm_1047] + [/.ibm_1097] + [/.ibm_1098] + [/.ibm_1112] + [/.ibm_1122] + [/.ibm_1123] + [/.ibm_1124] + [/.ibm_1140] + [/.ibm_1141] + [/.ibm_1142] + [/.ibm_1143] + [/.ibm_1144] + [/.ibm_1145] + [/.ibm_1146] + [/.ibm_1147] + [/.ibm_1148] + [/.ibm_1149] + [/.ibm_1166] + [/.ibm_1364] + [/.ibm_1381] + [/.ibm_1383] + [/.ibm_33722] + + [/.iso_2022_cn] + [/.iso2022_cn_cns] + [/.iso2022_cn_gb] + [/.iso_2022_jp] + [/.iso_2022_jp_2] + [/.iso_2022_kr] + [/.iso_8859_1] + [/.iso_8859_2] + [/.iso_8859_3] + [/.iso_8859_4] + [/.iso_8859_5] + [/.iso_8859_6] + [/.iso_8859_7] + [/.iso_8859_8] + [/.iso_8859_9] + [/.iso_8859_11] + [/.iso_8859_13] + [/.iso_8859_15] - [/.windows_31j] - [/.windows_874] - [/.windows_949] - [/.windows_950] - [/.windows_1250] - [/.windows_1252] - [/.windows_1251] - [/.windows_1253] - [/.windows_1254] - [/.windows_1255] - [/.windows_1256] - [/.windows_1257] - [/.windows_1258] - [/.windows_iso2022jp] - [/.windows_50220] - [/.windows_50221] - - [/.cesu_8] - [/.koi8_r] - [/.koi8_u] - ) + [/.mac_arabic] + [/.mac_central_europe] + [/.mac_croatian] + [/.mac_cyrillic] + [/.mac_dingbat] + [/.mac_greek] + [/.mac_hebrew] + [/.mac_iceland] + [/.mac_roman] + [/.mac_romania] + [/.mac_symbol] + [/.mac_thai] + [/.mac_turkish] + [/.mac_ukraine] + + [/.utf_8] + [/.utf_16] + [/.utf_32] -(.def .public documentation - (.List $.Module) - ($.module /._ - "" - [..Encoding - - ..ascii - - ..ibm_037 - ..ibm_273 - ..ibm_277 - ..ibm_278 - ..ibm_280 - ..ibm_284 - ..ibm_285 - ..ibm_290 - ..ibm_297 - ..ibm_300 - ..ibm_420 - ..ibm_424 - ..ibm_437 - ..ibm_500 - ..ibm_737 - ..ibm_775 - ..ibm_833 - ..ibm_834 - ..ibm_838 - ..ibm_850 - ..ibm_852 - ..ibm_855 - ..ibm_856 - ..ibm_857 - ..ibm_858 - ..ibm_860 - ..ibm_861 - ..ibm_862 - ..ibm_863 - ..ibm_864 - ..ibm_865 - ..ibm_866 - ..ibm_868 - ..ibm_869 - ..ibm_870 - ..ibm_871 - ..ibm_874 - ..ibm_875 - ..ibm_918 - ..ibm_921 - ..ibm_922 - ..ibm_930 - ..ibm_933 - ..ibm_935 - ..ibm_937 - ..ibm_939 - ..ibm_942 - ..ibm_942c - ..ibm_943 - ..ibm_943c - ..ibm_948 - ..ibm_949 - ..ibm_949c - ..ibm_950 - ..ibm_964 - ..ibm_970 - ..ibm_1006 - ..ibm_1025 - ..ibm_1026 - ..ibm_1046 - ..ibm_1047 - ..ibm_1097 - ..ibm_1098 - ..ibm_1112 - ..ibm_1122 - ..ibm_1123 - ..ibm_1124 - ..ibm_1140 - ..ibm_1141 - ..ibm_1142 - ..ibm_1143 - ..ibm_1144 - ..ibm_1145 - ..ibm_1146 - ..ibm_1147 - ..ibm_1148 - ..ibm_1149 - ..ibm_1166 - ..ibm_1364 - ..ibm_1381 - ..ibm_1383 - ..ibm_33722 - - ..iso_2022_cn - ..iso2022_cn_cns - ..iso2022_cn_gb - ..iso_2022_jp - ..iso_2022_jp_2 - ..iso_2022_kr - ..iso_8859_1 - ..iso_8859_2 - ..iso_8859_3 - ..iso_8859_4 - ..iso_8859_5 - ..iso_8859_6 - ..iso_8859_7 - ..iso_8859_8 - ..iso_8859_9 - ..iso_8859_11 - ..iso_8859_13 - ..iso_8859_15 - - ..mac_arabic - ..mac_central_europe - ..mac_croatian - ..mac_cyrillic - ..mac_dingbat - ..mac_greek - ..mac_hebrew - ..mac_iceland - ..mac_roman - ..mac_romania - ..mac_symbol - ..mac_thai - ..mac_turkish - ..mac_ukraine - - ..utf_8 - ..utf_16 - ..utf_32 - - ..windows_31j - ..windows_874 - ..windows_949 - ..windows_950 - ..windows_1250 - ..windows_1252 - ..windows_1251 - ..windows_1253 - ..windows_1254 - ..windows_1255 - ..windows_1256 - ..windows_1257 - ..windows_1258 - ..windows_iso2022jp - ..windows_50220 - ..windows_50221 - - ..cesu_8 - ..koi8_r - ..koi8_u - - ($.default /.name)] - [/utf8.documentation])) + [/.windows_31j] + [/.windows_874] + [/.windows_949] + [/.windows_950] + [/.windows_1250] + [/.windows_1252] + [/.windows_1251] + [/.windows_1253] + [/.windows_1254] + [/.windows_1255] + [/.windows_1256] + [/.windows_1257] + [/.windows_1258] + [/.windows_iso2022jp] + [/.windows_50220] + [/.windows_50221] + + [/.cesu_8] + [/.koi8_r] + [/.koi8_u] + ))] + [/utf8.documentation]))) diff --git a/stdlib/source/documentation/lux/data/text/encoding/utf8.lux b/stdlib/source/documentation/lux/data/text/encoding/utf8.lux index 6334c936e..0ad760263 100644 --- a/stdlib/source/documentation/lux/data/text/encoding/utf8.lux +++ b/stdlib/source/documentation/lux/data/text/encoding/utf8.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except) - ["$" documentation (.only documentation:)] + ["$" documentation] [data [text (.only \n) ["%" \\format (.only format)]]] @@ -10,12 +10,10 @@ [\\library ["[0]" /]]) -(documentation: /.codec - "A codec for binary encoding of text as UTF-8.") - (.def .public documentation (.List $.Module) ($.module /._ "" - [..codec] + [($.documentation /.codec + "A codec for binary encoding of text as UTF-8.")] [])) diff --git a/stdlib/source/documentation/lux/data/text/escape.lux b/stdlib/source/documentation/lux/data/text/escape.lux index 6c39e7373..3a62c1349 100644 --- a/stdlib/source/documentation/lux/data/text/escape.lux +++ b/stdlib/source/documentation/lux/data/text/escape.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except) - ["$" documentation (.only documentation:)] + ["$" documentation] [data [text (.only \n) ["%" \\format (.only format)]]] @@ -10,31 +10,28 @@ [\\library ["[0]" /]]) -(documentation: /.escaped - "Yields a escaped version of the text." - [(escaped text)]) - -(documentation: /.un_escaped - (format "Yields an un-escaped text." - \n "Fails if it was improperly escaped.") - [(un_escaped text)]) - -(documentation: /.literal - "If given a escaped text literal, expands to an un-escaped version." - [(/.literal "Line 1\nLine 2") - "=>" - (format "Line 1" \n - "Line 2")]) - (.def .public documentation (.List $.Module) ($.module /._ "" - [..escaped - ..un_escaped - ..literal - ($.default /.escapable?) + [($.default /.escapable?) ($.default /.dangling_escape) ($.default /.invalid_escape) - ($.default /.invalid_unicode_escape)] + ($.default /.invalid_unicode_escape) + + ($.documentation /.escaped + "Yields a escaped version of the text." + [(escaped text)]) + + ($.documentation /.un_escaped + (format "Yields an un-escaped text." + \n "Fails if it was improperly escaped.") + [(un_escaped text)]) + + ($.documentation /.literal + "If given a escaped text literal, expands to an un-escaped version." + [(/.literal "Line 1\nLine 2") + "=>" + (format "Line 1" \n + "Line 2")])] [])) diff --git a/stdlib/source/documentation/lux/data/text/regex.lux b/stdlib/source/documentation/lux/data/text/regex.lux index 7d8ecfe97..540acb1fe 100644 --- a/stdlib/source/documentation/lux/data/text/regex.lux +++ b/stdlib/source/documentation/lux/data/text/regex.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except pattern) - ["$" documentation (.only documentation:)] + ["$" documentation] [data [text (.only \n) ["%" \\format (.only format)]]] @@ -10,70 +10,68 @@ [\\library ["[0]" /]]) -(documentation: /.regex - "Create lexers using regular-expression syntax." - ["Literals" - (regex "a")] - ["Wildcards" - (regex ".")] - ["Escaping" - (regex "\.")] - ["Character classes" - (regex "\d") - (regex "\p{Lower}") - (regex "[abc]") - (regex "[a-z]") - (regex "[a-zA-Z]") - (regex "[a-z&&[def]]")] - ["Negation" - (regex "[^abc]") - (regex "[^a-z]") - (regex "[^a-zA-Z]") - (regex "[a-z&&[^bc]]") - (regex "[a-z&&[^m-p]]")] - ["Combinations" - (regex "aa") - (regex "a?") - (regex "a*") - (regex "a+")] - ["Specific amounts" - (regex "a{2}")] - ["At least" - (regex "a{1,}")] - ["At most" - (regex "a{,1}")] - ["Between" - (regex "a{1,2}")] - ["Groups" - (regex "a(.)c") - (regex "a(b+)c") - (regex "(\d{3})-(\d{3})-(\d{4})") - (regex "(\d{3})-(?:\d{3})-(\d{4})") - (regex "(?<code>\d{3})-\k<code>-(\d{4})") - (regex "(?<code>\d{3})-\k<code>-(\d{4})-\0") - (regex "(\d{3})-((\d{3})-(\d{4}))")] - ["Alternation" - (regex "a|b") - (regex "a(.)(.)|b(.)(.)")]) - -(documentation: /.pattern - "Allows you to test text against regular expressions." - [(case some_text - (pattern "(\d{3})-(\d{3})-(\d{4})" - [_ country_code area_code place_code]) - do_some_thing_when_number - - (pattern "\w+") - do_some_thing_when_word - - _ - do_something_else)]) - (.def .public documentation (.List $.Module) ($.module /._ "" - [..regex - ..pattern - ($.default /.incorrect_quantification)] + [($.default /.incorrect_quantification) + + ($.documentation /.regex + "Create lexers using regular-expression syntax." + ["Literals" + (regex "a")] + ["Wildcards" + (regex ".")] + ["Escaping" + (regex "\.")] + ["Character classes" + (regex "\d") + (regex "\p{Lower}") + (regex "[abc]") + (regex "[a-z]") + (regex "[a-zA-Z]") + (regex "[a-z&&[def]]")] + ["Negation" + (regex "[^abc]") + (regex "[^a-z]") + (regex "[^a-zA-Z]") + (regex "[a-z&&[^bc]]") + (regex "[a-z&&[^m-p]]")] + ["Combinations" + (regex "aa") + (regex "a?") + (regex "a*") + (regex "a+")] + ["Specific amounts" + (regex "a{2}")] + ["At least" + (regex "a{1,}")] + ["At most" + (regex "a{,1}")] + ["Between" + (regex "a{1,2}")] + ["Groups" + (regex "a(.)c") + (regex "a(b+)c") + (regex "(\d{3})-(\d{3})-(\d{4})") + (regex "(\d{3})-(?:\d{3})-(\d{4})") + (regex "(?<code>\d{3})-\k<code>-(\d{4})") + (regex "(?<code>\d{3})-\k<code>-(\d{4})-\0") + (regex "(\d{3})-((\d{3})-(\d{4}))")] + ["Alternation" + (regex "a|b") + (regex "a(.)(.)|b(.)(.)")]) + + ($.documentation /.pattern + "Allows you to test text against regular expressions." + [(case some_text + (pattern "(\d{3})-(\d{3})-(\d{4})" + [_ country_code area_code place_code]) + do_some_thing_when_number + + (pattern "\w+") + do_some_thing_when_word + + _ + do_something_else)])] [])) diff --git a/stdlib/source/documentation/lux/data/text/unicode.lux b/stdlib/source/documentation/lux/data/text/unicode.lux index 0888ceaf6..6248d9bb9 100644 --- a/stdlib/source/documentation/lux/data/text/unicode.lux +++ b/stdlib/source/documentation/lux/data/text/unicode.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except) - ["$" documentation (.only documentation:)] + ["$" documentation] [data [text ["%" \\format (.only format)]] diff --git a/stdlib/source/documentation/lux/data/text/unicode/block.lux b/stdlib/source/documentation/lux/data/text/unicode/block.lux index cf745fd9f..95868365e 100644 --- a/stdlib/source/documentation/lux/data/text/unicode/block.lux +++ b/stdlib/source/documentation/lux/data/text/unicode/block.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except) - ["$" documentation (.only documentation:)] + ["$" documentation] [data ["[0]" text ["%" \\format (.only format)]]] @@ -13,253 +13,142 @@ [\\library ["[0]" /]]) -(documentation: /.Block - "A block of valid unicode characters.") +(`` (.def .public documentation + (.List $.Module) + ($.module /._ + "" + [($.default /.monoid) + ($.default /.start) + ($.default /.end) + ($.default /.size) + ($.default /.equivalence) + ($.default /.hash) -(documentation: /.block - "" - [(block start additional)]) + ($.documentation /.Block + "A block of valid unicode characters.") -(documentation: /.within? - "" - [(within? block char)]) + ($.documentation /.block + "" + [(block start additional)]) -(with_template [<name>] - [(documentation: <name> - (let [[_ name] (symbol <name>)] - (format (hex#encoded (/.start <name>)) - "-" (hex#encoded (/.end <name>)) - " | " (text.replaced "_" " " name))))] + ($.documentation /.within? + "" + [(within? block char)]) - [/.basic_latin] - [/.latin_1_supplement] - [/.latin_extended_a] - [/.latin_extended_b] - [/.ipa_extensions] - [/.spacing_modifier_letters] - [/.combining_diacritical_marks] - [/.greek_and_coptic] - [/.cyrillic] - [/.cyrillic_supplementary] - [/.armenian] - [/.hebrew] - [/.arabic] - [/.syriac] - [/.thaana] - [/.devanagari] - [/.bengali] - [/.gurmukhi] - [/.gujarati] - [/.oriya] - [/.tamil] - [/.telugu] - [/.kannada] - [/.malayalam] - [/.sinhala] - [/.thai] - [/.lao] - [/.tibetan] - [/.myanmar] - [/.georgian] - [/.hangul_jamo] - [/.ethiopic] - [/.cherokee] - [/.unified_canadian_aboriginal_syllabics] - [/.ogham] - [/.runic] - [/.tagalog] - [/.hanunoo] - [/.buhid] - [/.tagbanwa] - [/.khmer] - [/.mongolian] - [/.limbu] - [/.tai_le] - [/.khmer_symbols] - [/.phonetic_extensions] - [/.latin_extended_additional] - [/.greek_extended] - [/.general_punctuation] - [/.superscripts_and_subscripts] - [/.currency_symbols] - [/.combining_diacritical_marks_for_symbols] - [/.letterlike_symbols] - [/.number_forms] - [/.arrows] - [/.mathematical_operators] - [/.miscellaneous_technical] - [/.control_pictures] - [/.optical_character_recognition] - [/.enclosed_alphanumerics] - [/.box_drawing] - [/.block_elements] - [/.geometric_shapes] - [/.miscellaneous_symbols] - [/.dingbats] - [/.miscellaneous_mathematical_symbols_a] - [/.supplemental_arrows_a] - [/.braille_patterns] - [/.supplemental_arrows_b] - [/.miscellaneous_mathematical_symbols_b] - [/.supplemental_mathematical_operators] - [/.miscellaneous_symbols_and_arrows] - [/.cjk_radicals_supplement] - [/.kangxi_radicals] - [/.ideographic_description_characters] - [/.cjk_symbols_and_punctuation] - [/.hiragana] - [/.katakana] - [/.bopomofo] - [/.hangul_compatibility_jamo] - [/.kanbun] - [/.bopomofo_extended] - [/.katakana_phonetic_extensions] - [/.enclosed_cjk_letters_and_months] - [/.cjk_compatibility] - [/.cjk_unified_ideographs_extension_a] - [/.yijing_hexagram_symbols] - [/.cjk_unified_ideographs] - [/.yi_syllables] - [/.yi_radicals] - [/.hangul_syllables] - [/.high_surrogates] - [/.high_private_use_surrogates] - [/.low_surrogates] - [/.private_use_area] - [/.cjk_compatibility_ideographs] - [/.alphabetic_presentation_forms] - [/.arabic_presentation_forms_a] - [/.variation_selectors] - [/.combining_half_marks] - [/.cjk_compatibility_forms] - [/.small_form_variants] - [/.arabic_presentation_forms_b] - [/.halfwidth_and_fullwidth_forms] - [/.specials] - [/.numeric] - [/.upper_case] - [/.lower_case] - ) + (~~ (with_template [<name>] + [($.documentation <name> + (let [[_ name] (symbol <name>)] + (format (hex#encoded (/.start <name>)) + "-" (hex#encoded (/.end <name>)) + " | " (text.replaced "_" " " name))))] -(.def .public documentation - (.List $.Module) - ($.module /._ - "" - [..Block - ..block - ..within? - ..basic_latin - ..latin_1_supplement - ..latin_extended_a - ..latin_extended_b - ..ipa_extensions - ..spacing_modifier_letters - ..combining_diacritical_marks - ..greek_and_coptic - ..cyrillic - ..cyrillic_supplementary - ..armenian - ..hebrew - ..arabic - ..syriac - ..thaana - ..devanagari - ..bengali - ..gurmukhi - ..gujarati - ..oriya - ..tamil - ..telugu - ..kannada - ..malayalam - ..sinhala - ..thai - ..lao - ..tibetan - ..myanmar - ..georgian - ..hangul_jamo - ..ethiopic - ..cherokee - ..unified_canadian_aboriginal_syllabics - ..ogham - ..runic - ..tagalog - ..hanunoo - ..buhid - ..tagbanwa - ..khmer - ..mongolian - ..limbu - ..tai_le - ..khmer_symbols - ..phonetic_extensions - ..latin_extended_additional - ..greek_extended - ..general_punctuation - ..superscripts_and_subscripts - ..currency_symbols - ..combining_diacritical_marks_for_symbols - ..letterlike_symbols - ..number_forms - ..arrows - ..mathematical_operators - ..miscellaneous_technical - ..control_pictures - ..optical_character_recognition - ..enclosed_alphanumerics - ..box_drawing - ..block_elements - ..geometric_shapes - ..miscellaneous_symbols - ..dingbats - ..miscellaneous_mathematical_symbols_a - ..supplemental_arrows_a - ..braille_patterns - ..supplemental_arrows_b - ..miscellaneous_mathematical_symbols_b - ..supplemental_mathematical_operators - ..miscellaneous_symbols_and_arrows - ..cjk_radicals_supplement - ..kangxi_radicals - ..ideographic_description_characters - ..cjk_symbols_and_punctuation - ..hiragana - ..katakana - ..bopomofo - ..hangul_compatibility_jamo - ..kanbun - ..bopomofo_extended - ..katakana_phonetic_extensions - ..enclosed_cjk_letters_and_months - ..cjk_compatibility - ..cjk_unified_ideographs_extension_a - ..yijing_hexagram_symbols - ..cjk_unified_ideographs - ..yi_syllables - ..yi_radicals - ..hangul_syllables - ..high_surrogates - ..high_private_use_surrogates - ..low_surrogates - ..private_use_area - ..cjk_compatibility_ideographs - ..alphabetic_presentation_forms - ..arabic_presentation_forms_a - ..variation_selectors - ..combining_half_marks - ..cjk_compatibility_forms - ..small_form_variants - ..arabic_presentation_forms_b - ..halfwidth_and_fullwidth_forms - ..specials - ..numeric - ..upper_case - ..lower_case - ($.default /.monoid) - ($.default /.start) - ($.default /.end) - ($.default /.size) - ($.default /.equivalence) - ($.default /.hash)] - [])) + [/.basic_latin] + [/.latin_1_supplement] + [/.latin_extended_a] + [/.latin_extended_b] + [/.ipa_extensions] + [/.spacing_modifier_letters] + [/.combining_diacritical_marks] + [/.greek_and_coptic] + [/.cyrillic] + [/.cyrillic_supplementary] + [/.armenian] + [/.hebrew] + [/.arabic] + [/.syriac] + [/.thaana] + [/.devanagari] + [/.bengali] + [/.gurmukhi] + [/.gujarati] + [/.oriya] + [/.tamil] + [/.telugu] + [/.kannada] + [/.malayalam] + [/.sinhala] + [/.thai] + [/.lao] + [/.tibetan] + [/.myanmar] + [/.georgian] + [/.hangul_jamo] + [/.ethiopic] + [/.cherokee] + [/.unified_canadian_aboriginal_syllabics] + [/.ogham] + [/.runic] + [/.tagalog] + [/.hanunoo] + [/.buhid] + [/.tagbanwa] + [/.khmer] + [/.mongolian] + [/.limbu] + [/.tai_le] + [/.khmer_symbols] + [/.phonetic_extensions] + [/.latin_extended_additional] + [/.greek_extended] + [/.general_punctuation] + [/.superscripts_and_subscripts] + [/.currency_symbols] + [/.combining_diacritical_marks_for_symbols] + [/.letterlike_symbols] + [/.number_forms] + [/.arrows] + [/.mathematical_operators] + [/.miscellaneous_technical] + [/.control_pictures] + [/.optical_character_recognition] + [/.enclosed_alphanumerics] + [/.box_drawing] + [/.block_elements] + [/.geometric_shapes] + [/.miscellaneous_symbols] + [/.dingbats] + [/.miscellaneous_mathematical_symbols_a] + [/.supplemental_arrows_a] + [/.braille_patterns] + [/.supplemental_arrows_b] + [/.miscellaneous_mathematical_symbols_b] + [/.supplemental_mathematical_operators] + [/.miscellaneous_symbols_and_arrows] + [/.cjk_radicals_supplement] + [/.kangxi_radicals] + [/.ideographic_description_characters] + [/.cjk_symbols_and_punctuation] + [/.hiragana] + [/.katakana] + [/.bopomofo] + [/.hangul_compatibility_jamo] + [/.kanbun] + [/.bopomofo_extended] + [/.katakana_phonetic_extensions] + [/.enclosed_cjk_letters_and_months] + [/.cjk_compatibility] + [/.cjk_unified_ideographs_extension_a] + [/.yijing_hexagram_symbols] + [/.cjk_unified_ideographs] + [/.yi_syllables] + [/.yi_radicals] + [/.hangul_syllables] + [/.high_surrogates] + [/.high_private_use_surrogates] + [/.low_surrogates] + [/.private_use_area] + [/.cjk_compatibility_ideographs] + [/.alphabetic_presentation_forms] + [/.arabic_presentation_forms_a] + [/.variation_selectors] + [/.combining_half_marks] + [/.cjk_compatibility_forms] + [/.small_form_variants] + [/.arabic_presentation_forms_b] + [/.halfwidth_and_fullwidth_forms] + [/.specials] + [/.numeric] + [/.upper_case] + [/.lower_case] + ))] + []))) diff --git a/stdlib/source/documentation/lux/data/text/unicode/set.lux b/stdlib/source/documentation/lux/data/text/unicode/set.lux index e5b0a3bf8..80f96be50 100644 --- a/stdlib/source/documentation/lux/data/text/unicode/set.lux +++ b/stdlib/source/documentation/lux/data/text/unicode/set.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except) - ["$" documentation (.only documentation:)] + ["$" documentation] [data [text ["%" \\format (.only format)]]] @@ -10,21 +10,11 @@ [\\library ["[0]" /]]) -(documentation: /.set - "" - [(set [head tail])]) - -(documentation: /.member? - "" - [(member? set character)]) - (.def .public documentation (.List $.Module) ($.module /._ "" - [..set - ..member? - ($.default /.Set) + [($.default /.Set) ($.default /.composite) ($.default /.character) ($.default /.non_character) @@ -38,5 +28,13 @@ ($.default /.alpha_numeric) ($.default /.numeric) ($.default /.upper_case) - ($.default /.lower_case)] + ($.default /.lower_case) + + ($.documentation /.set + "" + [(set [head tail])]) + + ($.documentation /.member? + "" + [(member? set character)])] [])) diff --git a/stdlib/source/documentation/lux/extension.lux b/stdlib/source/documentation/lux/extension.lux index 1379b60a3..5dd79df31 100644 --- a/stdlib/source/documentation/lux/extension.lux +++ b/stdlib/source/documentation/lux/extension.lux @@ -20,7 +20,7 @@ [language [lux [phase - ["[0]" directive]]]]]]]] + ["[0]" declaration]]]]]]]] [\\library ["[0]" /]]) @@ -43,12 +43,12 @@ (phase archive pass_through)) (phase archive pass_through)))]) -(documentation: /.directive +(documentation: /.declaration "" - [(directive ("my directive" self phase archive [parameters (<>.some <code>.any)]) - (do phase.monad - [.let [_ (debug.log! (format "Successfully installed directive " (%.text self) "!"))]] - (in directive.no_requirements)))]) + [(declaration ("my declaration" self phase archive [parameters (<>.some <code>.any)]) + (do phase.monad + [.let [_ (debug.log! (format "Successfully installed declaration " (%.text self) "!"))]] + (in declaration.no_requirements)))]) (.def .public documentation (.List $.Module) @@ -57,5 +57,5 @@ [..analysis ..synthesis ..generation - ..directive] + ..declaration] [])) diff --git a/stdlib/source/documentation/lux/macro/local.lux b/stdlib/source/documentation/lux/macro/local.lux index bb4a4099f..a6256aa92 100644 --- a/stdlib/source/documentation/lux/macro/local.lux +++ b/stdlib/source/documentation/lux/macro/local.lux @@ -12,7 +12,7 @@ (documentation: /.push (format "Installs macros in the compiler-state, with the given names." - \n "Yields code that can be placed either as expression or as directives." + \n "Yields code that can be placed either as expression or as declarations." \n "This code un-installs the macros." \n "NOTE: Always use this code once to clean-up..") [(push macros)]) diff --git a/stdlib/source/documentation/lux/tool.lux b/stdlib/source/documentation/lux/tool.lux index 4983fe8ea..77877d5d1 100644 --- a/stdlib/source/documentation/lux/tool.lux +++ b/stdlib/source/documentation/lux/tool.lux @@ -13,7 +13,7 @@ [language [lux ["[1][0]" analysis] - ["[1][0]" directive] + ["[1][0]" declaration] ["[1][0]" generation] ["[1][0]" synthesis]]]]]) @@ -22,7 +22,7 @@ (list.together (list /phase.documentation /analysis.documentation - /directive.documentation + /declaration.documentation /generation.documentation /synthesis.documentation ))) diff --git a/stdlib/source/documentation/lux/tool/compiler/language/lux/directive.lux b/stdlib/source/documentation/lux/tool/compiler/language/lux/declaration.lux index ff1036122..ff1036122 100644 --- a/stdlib/source/documentation/lux/tool/compiler/language/lux/directive.lux +++ b/stdlib/source/documentation/lux/tool/compiler/language/lux/declaration.lux diff --git a/stdlib/source/documentation/lux/tool/compiler/language/lux/generation.lux b/stdlib/source/documentation/lux/tool/compiler/language/lux/generation.lux index c0cb068f2..4b29c8ad0 100644 --- a/stdlib/source/documentation/lux/tool/compiler/language/lux/generation.lux +++ b/stdlib/source/documentation/lux/tool/compiler/language/lux/generation.lux @@ -51,7 +51,7 @@ ($.default /.learn_analyser) ($.default /.learn_synthesizer) ($.default /.learn_generator) - ($.default /.learn_directive) + ($.default /.learn_declaration) ($.default /.unknown_definition) ($.default /.remember) ($.default /.no_context) |