diff options
Diffstat (limited to 'stdlib/source/documentation/lux/data')
-rw-r--r-- | stdlib/source/documentation/lux/data/binary.lux | 340 | ||||
-rw-r--r-- | stdlib/source/documentation/lux/data/collection.lux | 2 | ||||
-rw-r--r-- | stdlib/source/documentation/lux/data/collection/list.lux | 319 | ||||
-rw-r--r-- | stdlib/source/documentation/lux/data/color.lux | 183 | ||||
-rw-r--r-- | stdlib/source/documentation/lux/data/color/named.lux | 375 | ||||
-rw-r--r-- | stdlib/source/documentation/lux/data/format.lux | 2 | ||||
-rw-r--r-- | stdlib/source/documentation/lux/data/format/tar.lux | 139 | ||||
-rw-r--r-- | stdlib/source/documentation/lux/data/text.lux | 684 |
8 files changed, 1010 insertions, 1034 deletions
diff --git a/stdlib/source/documentation/lux/data/binary.lux b/stdlib/source/documentation/lux/data/binary.lux index 34b12a2b6..b5bb6660a 100644 --- a/stdlib/source/documentation/lux/data/binary.lux +++ b/stdlib/source/documentation/lux/data/binary.lux @@ -14,177 +14,181 @@ (`` (def \\parser (List $.Documentation) - (list ($.module \\parser._ - "") - - ($.definition \\parser.binary_was_not_fully_read) - ($.definition \\parser.size_8) - ($.definition \\parser.size_16) - ($.definition \\parser.size_32) - ($.definition \\parser.size_64) - ($.definition \\parser.bits_8) - ($.definition \\parser.bits_16) - ($.definition \\parser.bits_32) - ($.definition \\parser.bits_64) - ($.definition \\parser.nat) - ($.definition \\parser.int) - ($.definition \\parser.rev) - ($.definition \\parser.frac) - ($.definition \\parser.invalid_tag) - ($.definition \\parser.or) - ($.definition \\parser.not_a_bit) - ($.definition \\parser.bit) - ($.definition \\parser.text) - ($.definition \\parser.maybe) - ($.definition \\parser.set_elements_are_not_unique) - ($.definition \\parser.symbol) - ($.definition \\parser.type) - ($.definition \\parser.location) - ($.definition \\parser.code) - - ($.definition \\parser.Offset - "An offset for reading within binary data.") - - ($.definition (\\parser.Parser it) - "A parser for raw binary data.") - - ($.definition \\parser.result - "Runs a parser and checks that all the binary data was read by it." - [(result parser input)]) - - ($.definition \\parser.end? - "Checks whether there is no more data to read.") - - ($.definition \\parser.offset - "The current offset (i.e. how much data has been read).") - - ($.definition \\parser.remaining - "How much of the data remains to be read.") - - ($.definition \\parser.Size - "The size of a chunk of data within a binary array.") - - ($.definition \\parser.rec - "Tie the knot for a recursive parser.") - - ($.definition \\parser.any - "Does no parsing, and just returns a dummy value.") - - ($.definition \\parser.segment - "Parses a chunk of data of a given size." - [(segment size)]) - - (,, (with_template [<size> <name>] - [($.definition <name> - (format "Parses a block of data prefixed with a size that is " (%.nat <size>) " bytes long."))] - - [08 \\parser.binary_8] - [16 \\parser.binary_16] - [32 \\parser.binary_32] - [64 \\parser.binary_64] - )) - - (,, (with_template [<size> <name>] - [($.definition <name> - (format "Parses a block of (UTF-8 encoded) text prefixed with a size that is " (%.nat <size>) " bytes long."))] - - [08 \\parser.utf8_8] - [16 \\parser.utf8_16] - [32 \\parser.utf8_32] - [64 \\parser.utf8_64] - )) - - (,, (with_template [<size> <name>] - [($.definition <name> - (format "Parses a sequence of values prefixed with a size that is " (%.nat <size>) " bytes long."))] - - [08 \\parser.sequence_8] - [16 \\parser.sequence_16] - [32 \\parser.sequence_32] - [64 \\parser.sequence_64] - )) - - ($.definition \\parser.list - "Parses an arbitrarily long list of values." - [(list value)]) - - ($.definition \\parser.set - "" - [(set hash value)]) - ))) + (let [specific (list ($.definition \\parser.size_8) + ($.definition \\parser.size_16) + ($.definition \\parser.size_32) + ($.definition \\parser.size_64) + ($.definition \\parser.bits_8) + ($.definition \\parser.bits_16) + ($.definition \\parser.bits_32) + ($.definition \\parser.bits_64) + ($.definition \\parser.nat) + ($.definition \\parser.int) + ($.definition \\parser.rev) + ($.definition \\parser.frac) + ($.definition \\parser.invalid_tag) + ($.definition \\parser.or) + ($.definition \\parser.not_a_bit) + ($.definition \\parser.bit) + ($.definition \\parser.text) + ($.definition \\parser.maybe) + ($.definition \\parser.set_elements_are_not_unique) + ($.definition \\parser.symbol) + ($.definition \\parser.type) + ($.definition \\parser.location) + ($.definition \\parser.code) + + ($.definition \\parser.segment + "Parses a chunk of data of a given size." + [(segment size)]) + + (,, (with_template [<size> <name>] + [($.definition <name> + (format "Parses a block of data prefixed with a size that is " (%.nat <size>) " bytes long."))] + + [08 \\parser.binary_8] + [16 \\parser.binary_16] + [32 \\parser.binary_32] + [64 \\parser.binary_64] + )) + + (,, (with_template [<size> <name>] + [($.definition <name> + (format "Parses a block of (UTF-8 encoded) text prefixed with a size that is " (%.nat <size>) " bytes long."))] + + [08 \\parser.utf8_8] + [16 \\parser.utf8_16] + [32 \\parser.utf8_32] + [64 \\parser.utf8_64] + )) + + (,, (with_template [<size> <name>] + [($.definition <name> + (format "Parses a sequence of values prefixed with a size that is " (%.nat <size>) " bytes long."))] + + [08 \\parser.sequence_8] + [16 \\parser.sequence_16] + [32 \\parser.sequence_32] + [64 \\parser.sequence_64] + )) + + ($.definition \\parser.list + "Parses an arbitrarily long list of values." + [(list value)]) + + ($.definition \\parser.set + "" + [(set hash value)]))] + (list.partial ($.module \\parser._ + "") + + ($.definition \\parser.binary_was_not_fully_read) + + ($.definition \\parser.Offset + "An offset for reading within binary data.") + + ($.definition (\\parser.Parser it) + "A parser for raw binary data.") + + ($.definition \\parser.result + "Runs a parser and checks that all the binary data was read by it." + [(result parser input)]) + + ($.definition \\parser.end? + "Checks whether there is no more data to read.") + + ($.definition \\parser.offset + "The current offset (i.e. how much data has been read).") + + ($.definition \\parser.remaining + "How much of the data remains to be read.") + + ($.definition \\parser.Size + "The size of a chunk of data within a binary array.") + + ($.definition \\parser.rec + "Tie the knot for a recursive parser.") + + ($.definition \\parser.any + "Does no parsing, and just returns a dummy value.") + + specific + )))) (def \\format (List $.Documentation) - (list ($.module \\format._ - "") - - ($.definition \\format.monoid) - ($.definition \\format.bits_8) - ($.definition \\format.bits_16) - ($.definition \\format.bits_32) - ($.definition \\format.bits_64) - ($.definition \\format.any) - ($.definition \\format.bit) - ($.definition \\format.nat) - ($.definition \\format.int) - ($.definition \\format.rev) - ($.definition \\format.frac) - ($.definition \\format.binary_8) - ($.definition \\format.binary_16) - ($.definition \\format.binary_32) - ($.definition \\format.binary_64) - ($.definition \\format.utf8_8) - ($.definition \\format.utf8_16) - ($.definition \\format.utf8_32) - ($.definition \\format.utf8_64) - ($.definition \\format.text) - ($.definition \\format.sequence_8) - ($.definition \\format.sequence_16) - ($.definition \\format.sequence_32) - ($.definition \\format.sequence_64) - ($.definition \\format.maybe) - ($.definition \\format.list) - ($.definition \\format.set) - ($.definition \\format.symbol) - ($.definition \\format.type) - ($.definition \\format.location) - ($.definition \\format.code) - - ($.definition \\format.Mutation - "A mutation of binary data, tracking where in the data to transform.") - - ($.definition \\format.Specification - "A description of how to transform binary data.") - - ($.definition \\format.no_op - "A specification for empty binary data.") - - ($.definition \\format.instance - "Given a specification of how to construct binary data, yields a binary blob that matches it.") - - ($.definition (\\format.Format it) - "An operation that knows how to write information into a binary blob.") - - ($.definition \\format.result - "Yields a binary blob with all the information written to it." - [(result format value)]) - - ($.definition \\format.or - "" - [(or left right)]) - - ($.definition \\format.and - "" - [(and pre post)]) - - ($.definition \\format.rec - "A combinator for recursive formats." - [(rec body)]) - - ($.definition \\format.segment - "Writes at most 'size' bytes of an input binary blob." - [(segment size)]) - )) + (let [specific (list ($.definition \\format.bits_8) + ($.definition \\format.bits_16) + ($.definition \\format.bits_32) + ($.definition \\format.bits_64) + ($.definition \\format.any) + ($.definition \\format.bit) + ($.definition \\format.nat) + ($.definition \\format.int) + ($.definition \\format.rev) + ($.definition \\format.frac) + ($.definition \\format.binary_8) + ($.definition \\format.binary_16) + ($.definition \\format.binary_32) + ($.definition \\format.binary_64) + ($.definition \\format.utf8_8) + ($.definition \\format.utf8_16) + ($.definition \\format.utf8_32) + ($.definition \\format.utf8_64) + ($.definition \\format.text) + ($.definition \\format.sequence_8) + ($.definition \\format.sequence_16) + ($.definition \\format.sequence_32) + ($.definition \\format.sequence_64) + ($.definition \\format.maybe) + ($.definition \\format.list) + ($.definition \\format.set) + ($.definition \\format.symbol) + ($.definition \\format.type) + ($.definition \\format.location) + ($.definition \\format.code) + + ($.definition \\format.segment + "Writes at most 'size' bytes of an input binary blob." + [(segment size)]))] + (list.partial ($.module \\format._ + "") + + ($.definition \\format.monoid) + + ($.definition \\format.Mutation + "A mutation of binary data, tracking where in the data to transform.") + + ($.definition \\format.Specification + "A description of how to transform binary data.") + + ($.definition \\format.no_op + "A specification for empty binary data.") + + ($.definition \\format.instance + "Given a specification of how to construct binary data, yields a binary blob that matches it.") + + ($.definition (\\format.Format it) + "An operation that knows how to write information into a binary blob.") + + ($.definition \\format.result + "Yields a binary blob with all the information written to it." + [(result format value)]) + + ($.definition \\format.or + "" + [(or left right)]) + + ($.definition \\format.and + "" + [(and pre post)]) + + ($.definition \\format.rec + "A combinator for recursive formats." + [(rec body)]) + + specific + ))) (def .public documentation (List $.Documentation) diff --git a/stdlib/source/documentation/lux/data/collection.lux b/stdlib/source/documentation/lux/data/collection.lux index 8920b36e7..c735cde33 100644 --- a/stdlib/source/documentation/lux/data/collection.lux +++ b/stdlib/source/documentation/lux/data/collection.lux @@ -3,8 +3,6 @@ [lux (.except) ["$" documentation] [data - [text (.only \n) - ["%" \\format (.only format)]] [collection ["[0]" list]]]]] ["[0]" / diff --git a/stdlib/source/documentation/lux/data/collection/list.lux b/stdlib/source/documentation/lux/data/collection/list.lux index cf08192c2..9726f5d39 100644 --- a/stdlib/source/documentation/lux/data/collection/list.lux +++ b/stdlib/source/documentation/lux/data/collection/list.lux @@ -6,165 +6,170 @@ [text (.only \n) ["%" \\format (.only format)]]]]] [\\library - ["[0]" /]] + ["[0]" / (.use "[1]#[0]" monoid)]] ["[0]" / ["[1][0]" property]]) (`` (def .public documentation (List $.Documentation) - (/.partial ($.module /._ - "") - - ($.definition /.mix) - ($.definition /.equivalence) - ($.definition /.hash) - ($.definition /.monoid) - ($.definition /.functor) - ($.definition /.apply) - ($.definition /.monad) - ($.definition /.zipped_2) - ($.definition /.zipped_3) - ($.definition /.zipped_with_2) - ($.definition /.zipped_with_3) - ($.definition /.first) - ($.definition /.after) - ($.definition /.while) - ($.definition /.until) - ($.definition /.every?) - ($.definition /.any?) - - ($.definition /.mixes - "" - [(mixes f init inputs)]) - - ($.definition /.reversed - "" - [(reversed xs)]) - - ($.definition /.only - "A list with only values that satisfy the predicate." - [(only keep? xs)]) - - ($.definition /.partition - "Divide the list into all elements that satisfy a predicate, and all elements that do not." - [(partition satisfies? list)]) - - ($.definition /.pairs - "Cut the list into pairs of 2." - [(pairs list)]) - - ($.definition /.split_at - "" - [(split_at n xs)]) - - ($.definition /.split_when - "Segment the list by using a predicate to tell when to cut." - [(split_when predicate xs)]) - - ($.definition /.sub - "Segment the list into sub-lists of (at most) the given size." - [(sub size list)]) - - ($.definition /.repeated - "A list of the value x, repeated n times." - [(repeated n x)]) - - ($.definition /.iterations - "Generates a list element by element until the function returns .#None." - [(iterations f x)]) - - ($.definition /.one - "" - [(one check xs)]) - - ($.definition /.all - "" - [(all check xs)]) - - ($.definition /.example - "Yields the first value in the list that satisfies the predicate." - [(example predicate xs)]) - - ($.definition /.interposed - "Puts a value between every two elements in the list." - [(interposed sep xs)]) - - ($.definition /.size - "" - [(size list)]) - - ($.definition /.item - "Fetches the element at the specified index." - [(item i xs)]) - - ($.definition /.sorted - "A list ordered by a comparison function." - [(sorted < xs)]) - - ($.definition /.empty? - "" - [(empty? xs)]) - - ($.definition /.member? - "" - [(member? eq xs x)]) - - (,, (with_template [<name> <doc>] - [($.definition <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."] - )) - - ($.definition /.indices - "Produces all the valid indices for a given size." - [(indices size)]) - - ($.definition /.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)]) - - ($.definition /.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)]) - - ($.definition /.last - "" - [(last xs)]) - - ($.definition /.inits - (format "For a list of size N, yields the first N-1 elements." - \n "Will yield a .#None for empty lists.") - [(inits xs)]) - - ($.definition /.together - "The sequential combination of all the lists.") - - ($.definition /.with - "Enhances a monad with List functionality." - [(with monad)]) - - ($.definition /.lifted - "Wraps a monadic value with List machinery." - [(lifted monad)]) - - ($.definition /.enumeration - "Pairs every element in the list with its index, starting at 0." - [(enumeration xs)]) - - ($.definition /.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))]) - - /property.documentation - ))) + (let [zipped (list ($.definition /.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)]) + + ($.definition /.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)]) + + ($.definition /.zipped_2) + ($.definition /.zipped_3) + ($.definition /.zipped_with_2) + ($.definition /.zipped_with_3))] + (/.partial ($.module /._ + "") + + ($.definition /.mix) + ($.definition /.equivalence) + ($.definition /.hash) + ($.definition /.monoid) + ($.definition /.functor) + ($.definition /.apply) + ($.definition /.monad) + + ($.definition /.first) + ($.definition /.after) + ($.definition /.while) + ($.definition /.until) + ($.definition /.every?) + ($.definition /.any?) + + ($.definition /.mixes + "" + [(mixes f init inputs)]) + + ($.definition /.reversed + "" + [(reversed xs)]) + + ($.definition /.only + "A list with only values that satisfy the predicate." + [(only keep? xs)]) + + ($.definition /.partition + "Divide the list into all elements that satisfy a predicate, and all elements that do not." + [(partition satisfies? list)]) + + ($.definition /.pairs + "Cut the list into pairs of 2." + [(pairs list)]) + + ($.definition /.split_at + "" + [(split_at n xs)]) + + ($.definition /.split_when + "Segment the list by using a predicate to tell when to cut." + [(split_when predicate xs)]) + + ($.definition /.sub + "Segment the list into sub-lists of (at most) the given size." + [(sub size list)]) + + ($.definition /.repeated + "A list of the value x, repeated n times." + [(repeated n x)]) + + ($.definition /.iterations + "Generates a list element by element until the function returns .#None." + [(iterations f x)]) + + ($.definition /.one + "" + [(one check xs)]) + + ($.definition /.all + "" + [(all check xs)]) + + ($.definition /.example + "Yields the first value in the list that satisfies the predicate." + [(example predicate xs)]) + + ($.definition /.interposed + "Puts a value between every two elements in the list." + [(interposed sep xs)]) + + ($.definition /.size + "" + [(size list)]) + + ($.definition /.item + "Fetches the element at the specified index." + [(item i xs)]) + + ($.definition /.sorted + "A list ordered by a comparison function." + [(sorted < xs)]) + + ($.definition /.empty? + "" + [(empty? xs)]) + + ($.definition /.member? + "" + [(member? eq xs x)]) + + (,, (with_template [<name> <doc>] + [($.definition <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."] + )) + + ($.definition /.indices + "Produces all the valid indices for a given size." + [(indices size)]) + + ($.definition /.last + "" + [(last xs)]) + + ($.definition /.inits + (format "For a list of size N, yields the first N-1 elements." + \n "Will yield a .#None for empty lists.") + [(inits xs)]) + + ($.definition /.together + "The sequential combination of all the lists.") + + ($.definition /.with + "Enhances a monad with List functionality." + [(with monad)]) + + ($.definition /.lifted + "Wraps a monadic value with List machinery." + [(lifted monad)]) + + ($.definition /.enumeration + "Pairs every element in the list with its index, starting at 0." + [(enumeration xs)]) + + ($.definition /.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))]) + + (all /#composite + zipped + + /property.documentation + ) + )))) diff --git a/stdlib/source/documentation/lux/data/color.lux b/stdlib/source/documentation/lux/data/color.lux index b6ed59dab..a1ffc67fb 100644 --- a/stdlib/source/documentation/lux/data/color.lux +++ b/stdlib/source/documentation/lux/data/color.lux @@ -6,7 +6,7 @@ ["[0]" text (.only \n) ["%" \\format (.only format)]] [collection - ["[0]" list]]] + ["[0]" list (.use "[1]#[0]" monoid)]]] [meta ["[0]" code (.only) ["<[1]>" \\parser]] @@ -24,89 +24,98 @@ (`` (def .public documentation (List $.Documentation) - (list.partial ($.module /._ - "") - - ($.definition /.of_rgb) - ($.definition /.rgb) - ($.definition /.equivalence) - ($.definition /.hash) - ($.definition /.black) - ($.definition /.white) - ($.definition /.addition) - ($.definition /.subtraction) - ($.definition /.hsl) - ($.definition /.of_hsl) - ($.definition /.hsb) - ($.definition /.of_hsb) - ($.definition /.cmyk) - ($.definition /.of_cmyk) - ($.definition /.gray_scale) - ($.definition /.Spread) - ($.definition /.Palette) - ($.definition /.darker) - ($.definition /.brighter) - ($.definition /.saturated) - ($.definition /.un_saturated) - - ($.definition /.RGB - "Red-Green-Blue color format.") - - ($.definition /.HSL - "Hue-Saturation-Lightness color format.") - - ($.definition /.CMYK - "Cyan-Magenta-Yellow-Key color format.") - - ($.definition /.HSB - "Hue-Saturation-Brightness color format.") - - ($.definition /.Color - "A color value, independent of color format.") - - ($.definition /.complement - "The opposite color." - [(complement color)]) - - ($.definition /.interpolated - "" - [(interpolated ratio end start)]) - - ($.definition /.analogous - (palette_documentation /.analogous) - [(analogous spread variations color)]) - - ($.definition /.monochromatic - (palette_documentation /.monochromatic) - [(monochromatic spread variations color)]) - - ($.definition /.Alpha - "The degree of transparency of a pigment.") - - ($.definition /.transparent - "The maximum degree of transparency.") - - ($.definition /.translucent - "The average degree of transparency.") - - ($.definition /.opaque - "The minimum degree of transparency.") - - ($.definition /.Pigment - "A color with some degree of transparency.") - - (,, (with_template [<name>] - [(`` ($.definition <name> - (format "A " - (text.replaced "_" "-" (,, (template.text [<name>]))) - " color scheme.")))] - - [/.triad] - [/.clash] - [/.split_complement] - [/.square] - [/.tetradic] - )) - - /named.documentation - ))) + (let [encoding (list ($.definition /.RGB + "Red-Green-Blue color format.") + + ($.definition /.of_rgb) + ($.definition /.rgb) + + ($.definition /.HSL + "Hue-Saturation-Lightness color format.") + + ($.definition /.hsl) + ($.definition /.of_hsl) + + ($.definition /.CMYK + "Cyan-Magenta-Yellow-Key color format.") + + ($.definition /.hsb) + ($.definition /.of_hsb) + + ($.definition /.HSB + "Hue-Saturation-Brightness color format.") + + ($.definition /.cmyk) + ($.definition /.of_cmyk)) + transformation (list ($.definition /.gray_scale) + ($.definition /.darker) + ($.definition /.brighter) + ($.definition /.saturated) + ($.definition /.un_saturated) + + ($.definition /.complement + "The opposite color." + [(complement color)]) + + ($.definition /.interpolated + "" + [(interpolated ratio end start)])) + alpha (list ($.definition /.Alpha + "The degree of transparency of a pigment.") + + ($.definition /.transparent + "The maximum degree of transparency.") + + ($.definition /.translucent + "The medium degree of transparency.") + + ($.definition /.opaque + "The minimum degree of transparency.")) + scheme (list ($.definition /.Spread) + ($.definition /.Palette) + + ($.definition /.analogous + (palette_documentation /.analogous) + [(analogous spread variations color)]) + + ($.definition /.monochromatic + (palette_documentation /.monochromatic) + [(monochromatic spread variations color)]) + + (,, (with_template [<name>] + [(`` ($.definition <name> + (format "A " + (text.replaced "_" "-" (,, (template.text [<name>]))) + " color scheme.")))] + + [/.triad] + [/.clash] + [/.split_complement] + [/.square] + [/.tetradic] + )))] + (list.partial ($.module /._ + "") + + ($.definition /.Color + "A color value, independent of color format.") + + ($.definition /.equivalence) + ($.definition /.hash) + ($.definition /.black) + ($.definition /.white) + ($.definition /.addition) + ($.definition /.subtraction) + + ($.definition /.Pigment + "A color with some degree of transparency.") + + (all list#composite + encoding + transformation + alpha + scheme + + /named.documentation + ) + )))) diff --git a/stdlib/source/documentation/lux/data/color/named.lux b/stdlib/source/documentation/lux/data/color/named.lux index 5e884b82c..cd4e683e0 100644 --- a/stdlib/source/documentation/lux/data/color/named.lux +++ b/stdlib/source/documentation/lux/data/color/named.lux @@ -24,222 +24,171 @@ " B:" (hex#encoded blue) " | " (text.replaced "_" " " name))))])) -(`` (def colors/d-k - (List $.Documentation) - (list (,, (with_template [<name>] - [(description <name>)] - - [/.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] - )) - ))) - -(`` (def colors/l-o - (List $.Documentation) - (list (,, (with_template [<name>] - [(description <name>)] - - [/.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] - )) - ))) - -(`` (def colors/p-y +(`` (def .public documentation (List $.Documentation) - (list (,, (with_template [<name>] - [(description <name>)] + (let [a-c (list (,, (with_template [<name>] + [(description <name>)] - [/.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] + ))) + d-k (list (,, (with_template [<name>] + [(description <name>)] -(`` (def .public documentation - (List $.Documentation) - (list.partial ($.module /._ - "") + [/.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] + ))) + l-o (list (,, (with_template [<name>] + [(description <name>)] - (,, (with_template [<name>] - [(description <name>)] + [/.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] + ))) + p-y (list (,, (with_template [<name>] + [(description <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] - )) + [/.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] + )))] + (list.partial ($.module /._ + "") - (all list#composite - colors/d-k - colors/l-o - colors/p-y - ) - ))) + (all list#composite + a-c + d-k + l-o + p-y + ))))) diff --git a/stdlib/source/documentation/lux/data/format.lux b/stdlib/source/documentation/lux/data/format.lux index b1aaea3b6..f1bd40fbc 100644 --- a/stdlib/source/documentation/lux/data/format.lux +++ b/stdlib/source/documentation/lux/data/format.lux @@ -3,8 +3,6 @@ [lux (.except) ["$" documentation] [data - [text (.only \n) - ["%" \\format (.only format)]] [collection ["[0]" list]]]]] ["[0]" / diff --git a/stdlib/source/documentation/lux/data/format/tar.lux b/stdlib/source/documentation/lux/data/format/tar.lux index ec8c7f373..8c6711eb9 100644 --- a/stdlib/source/documentation/lux/data/format/tar.lux +++ b/stdlib/source/documentation/lux/data/format/tar.lux @@ -3,85 +3,88 @@ [lux (.except) ["$" documentation] [data - [text (.only \n) - ["%" \\format (.only format)]]]]] + [collection + ["[0]" list (.use "[1]#[0]" monoid)]]]]] [\\library ["[0]" /]]) (def .public documentation (List $.Documentation) - (list ($.module /._ - "") + (let [number (list ($.definition /.not_a_small_number) + ($.definition /.small_limit) + ($.definition /.Small) + ($.definition /.small) + ($.definition /.from_small) - ($.definition /.not_a_small_number) - ($.definition /.small_limit) - ($.definition /.Small) - ($.definition /.small) - ($.definition /.from_small) + ($.definition /.not_a_big_number) + ($.definition /.big_limit) + ($.definition /.Big) + ($.definition /.big) + ($.definition /.from_big)) + mode (list ($.definition /.invalid_link_flag) + ($.definition /.Mode) + ($.definition /.mode) + ($.definition /.and) + ($.definition /.invalid_mode) - ($.definition /.not_a_big_number) - ($.definition /.big_limit) - ($.definition /.Big) - ($.definition /.big) - ($.definition /.from_big) + ($.definition /.none) + + ($.definition /.execute_by_other) + ($.definition /.write_by_other) + ($.definition /.read_by_other) - ($.definition /.wrong_character) - ($.definition /.not_ascii) - ($.definition /.name_size) - ($.definition /.path_size) + ($.definition /.execute_by_group) + ($.definition /.write_by_group) + ($.definition /.read_by_group) - ($.definition /.Name) - ($.definition /.name_is_too_long) - ($.definition /.name) - ($.definition /.from_name) - ($.definition /.anonymous) + ($.definition /.execute_by_owner) + ($.definition /.write_by_owner) + ($.definition /.read_by_owner) - ($.definition /.Path) - ($.definition /.path_is_too_long) - ($.definition /.path) - ($.definition /.from_path) - ($.definition /.no_path) + ($.definition /.save_text) + ($.definition /.set_group_id_on_execution) + ($.definition /.set_user_id_on_execution)) + label (list ($.definition /.wrong_character) + ($.definition /.not_ascii) + ($.definition /.name_size) + ($.definition /.path_size) - ($.definition /.invalid_link_flag) - ($.definition /.Mode) - ($.definition /.mode) - ($.definition /.and) - ($.definition /.invalid_mode) + ($.definition /.Name) + ($.definition /.name_is_too_long) + ($.definition /.name) + ($.definition /.from_name) + ($.definition /.anonymous) - ($.definition /.none) - - ($.definition /.execute_by_other) - ($.definition /.write_by_other) - ($.definition /.read_by_other) + ($.definition /.Path) + ($.definition /.path_is_too_long) + ($.definition /.path) + ($.definition /.from_path) + ($.definition /.no_path))] + (list.partial ($.module /._ + "") - ($.definition /.execute_by_group) - ($.definition /.write_by_group) - ($.definition /.read_by_group) + ($.definition /.Content) + ($.definition /.content) + ($.definition /.data) + ($.definition /.ID) + ($.definition /.no_id) + ($.definition /.Owner) + ($.definition /.Ownership) + ($.definition /.File) + ($.definition /.Normal) + ($.definition /.Symbolic_Link) + ($.definition /.Directory) + ($.definition /.Contiguous) + ($.definition /.Entry) + ($.definition /.Tar) + ($.definition /.format) + ($.definition /.wrong_checksum) + ($.definition /.invalid_end_of_archive) + ($.definition /.parser) - ($.definition /.execute_by_owner) - ($.definition /.write_by_owner) - ($.definition /.read_by_owner) - - ($.definition /.save_text) - ($.definition /.set_group_id_on_execution) - ($.definition /.set_user_id_on_execution) - - ($.definition /.Content) - ($.definition /.content) - ($.definition /.data) - ($.definition /.ID) - ($.definition /.no_id) - ($.definition /.Owner) - ($.definition /.Ownership) - ($.definition /.File) - ($.definition /.Normal) - ($.definition /.Symbolic_Link) - ($.definition /.Directory) - ($.definition /.Contiguous) - ($.definition /.Entry) - ($.definition /.Tar) - ($.definition /.format) - ($.definition /.wrong_checksum) - ($.definition /.invalid_end_of_archive) - ($.definition /.parser) - )) + (all list#composite + number + mode + label + ) + ))) diff --git a/stdlib/source/documentation/lux/data/text.lux b/stdlib/source/documentation/lux/data/text.lux index 10b2616a7..c544cc551 100644 --- a/stdlib/source/documentation/lux/data/text.lux +++ b/stdlib/source/documentation/lux/data/text.lux @@ -21,357 +21,367 @@ (def \\format (List $.Documentation) - (list ($.module \\format._ - "") - - ($.definition \\format.functor) - - ($.definition \\format.bit) - ($.definition \\format.nat) - ($.definition \\format.int) - ($.definition \\format.rev) - ($.definition \\format.frac) - ($.definition \\format.text) - - ($.definition \\format.ratio) - ($.definition \\format.symbol) - ($.definition \\format.location) - ($.definition \\format.code) - ($.definition \\format.type) - - ($.definition \\format.instant) - ($.definition \\format.duration) - ($.definition \\format.date) - ($.definition \\format.time) - ($.definition \\format.day) - ($.definition \\format.month) - - ($.definition \\format.xml) - ($.definition \\format.json) - - ($.definition \\format.nat_2) - ($.definition \\format.nat_8) - ($.definition \\format.nat_10) - ($.definition \\format.nat_16) - ($.definition \\format.int_2) - ($.definition \\format.int_8) - ($.definition \\format.int_10) - ($.definition \\format.int_16) - ($.definition \\format.rev_2) - ($.definition \\format.rev_8) - ($.definition \\format.rev_10) - ($.definition \\format.rev_16) - ($.definition \\format.frac_2) - ($.definition \\format.frac_8) - ($.definition \\format.frac_10) - ($.definition \\format.frac_16) - - ($.definition \\format.mod) - ($.definition \\format.list) - ($.definition \\format.maybe) - - ($.definition (\\format.Format it) - "A way to produce readable text from values.") - - ($.definition \\format.format - "Text interpolation." - [(format "Static part " (text static) " does not match URI: " uri)]) - )) + (let [specific (list ($.definition \\format.bit) + ($.definition \\format.nat) + ($.definition \\format.int) + ($.definition \\format.rev) + ($.definition \\format.frac) + ($.definition \\format.text) + + ($.definition \\format.ratio) + ($.definition \\format.symbol) + ($.definition \\format.location) + ($.definition \\format.code) + ($.definition \\format.type) + + ($.definition \\format.instant) + ($.definition \\format.duration) + ($.definition \\format.date) + ($.definition \\format.time) + ($.definition \\format.day) + ($.definition \\format.month) + + ($.definition \\format.xml) + ($.definition \\format.json)) + number (list ($.definition \\format.nat_2) + ($.definition \\format.nat_8) + ($.definition \\format.nat_10) + ($.definition \\format.nat_16) + ($.definition \\format.int_2) + ($.definition \\format.int_8) + ($.definition \\format.int_10) + ($.definition \\format.int_16) + ($.definition \\format.rev_2) + ($.definition \\format.rev_8) + ($.definition \\format.rev_10) + ($.definition \\format.rev_16) + ($.definition \\format.frac_2) + ($.definition \\format.frac_8) + ($.definition \\format.frac_10) + ($.definition \\format.frac_16))] + (list.partial ($.module \\format._ + "") + + ($.definition \\format.functor) + + ($.definition \\format.mod) + ($.definition \\format.list) + ($.definition \\format.maybe) + + ($.definition (\\format.Format it) + "A way to produce readable text from values.") + + ($.definition \\format.format + "Text interpolation." + [(format "Static part " (text static) " does not match URI: " uri)]) + + (all list#composite + specific + number + ) + ))) (`` (def \\parser (List $.Documentation) - (list ($.module \\parser._ - "") + (let [exception (list ($.definition \\parser.unconsumed_input) + ($.definition \\parser.expected_to_fail) + ($.definition \\parser.cannot_parse) + ($.definition \\parser.cannot_slice) + ($.definition \\parser.cannot_match) + ($.definition \\parser.character_should_be) + ($.definition \\parser.character_should_not_be) + ($.definition \\parser.character_does_not_satisfy_predicate)) + specific (list ($.definition \\parser.range + "Only yields characters within a range." + [(range bottom top)]) + + (,, (with_template [<name> <desc>] + [($.definition <name> + (format "Only yields " <desc> " characters."))] + + [\\parser.upper "uppercase"] + [\\parser.lower "lowercase"] + [\\parser.decimal "decimal"] + [\\parser.octal "octal"] + )) + + ($.definition \\parser.alpha + "Yields alphabetic characters.") + + ($.definition \\parser.alpha_num + "Yields alphanumeric characters.") + + ($.definition \\parser.hexadecimal + "Yields hexadecimal digits.") + + ($.definition \\parser.space + "Yields white-space."))] + (list.partial ($.module \\parser._ + "") + + ($.definition \\parser.Offset + "An offset into a block of text.") + + ($.definition (\\parser.Parser it) + "A parser for text.") + + ($.definition \\parser.Slice + "A slice of a block of text.") + + ($.definition \\parser.result + (format "Executes a parser against a block of text." + \n "Verifies that the entire input has been processed.") + [(result parser input)]) + + ($.definition \\parser.offset + "Yields the current offset into the input.") + + ($.definition \\parser.any + "Yields the next character without applying any logic.") + + ($.definition \\parser.any! + "Yields the next character (as a slice) without applying any logic.") + + (,, (with_template [<name> <caveat>] + [(`` ($.definition <name> + (format "Produce a character" (,, (template.text [<caveat>])) " if the parser fails.")))] + + [\\parser.not ""] + [\\parser.not! " (as a slice)"] + )) + + ($.definition \\parser.this + "Checks that a specific text shows up in the input." + [(this reference)]) + + ($.definition \\parser.end + "Ensure the parser's input is empty.") + + ($.definition \\parser.next + "Yields the next character (without consuming it from the input).") + + ($.definition \\parser.remaining + "Get all of the remaining input (without consuming it).") + + (,, (with_template [<name> <description_modifier>] + [($.definition <name> + (format "Yields characters that are" <description_modifier> " part of a piece of text."))] + + [\\parser.one_of ""] + [\\parser.none_of " not"] + )) + + (,, (with_template [<name> <description_modifier>] + [($.definition <name> + (format "Yields characters (as a slice) that are" <description_modifier> " part of a piece of text."))] + + [\\parser.one_of! ""] + [\\parser.none_of! " not"] + )) + + ($.definition \\parser.satisfies + "Yields characters that satisfy a predicate." + [(satisfies parser)]) + + ($.definition \\parser.and + "Yields the outputs of both parsers composed together." + [(and left right)]) + + ($.definition \\parser.and! + "Yields the outputs of both parsers composed together (as a slice)." + [(and! left right)]) - ($.definition \\parser.unconsumed_input) - ($.definition \\parser.expected_to_fail) - ($.definition \\parser.cannot_parse) - ($.definition \\parser.cannot_slice) - ($.definition \\parser.cannot_match) - ($.definition \\parser.character_should_be) - ($.definition \\parser.character_should_not_be) - ($.definition \\parser.character_does_not_satisfy_predicate) + (,, (with_template [<text> <slice>] + [(`` ($.definition <text> + (format "Yields " (,, (template.text [<name>])) " characters as a single continuous text."))) + (`` ($.definition <slice> + (format "Yields " (,, (template.text [<name>])) " characters as a single continuous text (as a slice).")))] - ($.definition \\parser.Offset - "An offset into a block of text.") + [\\parser.some \\parser.some!] + [\\parser.many \\parser.many!] + )) - ($.definition (\\parser.Parser it) - "A parser for text.") + (,, (with_template [<text> <slice> <doc_modifier>] + [(`` ($.definition <text> + (format "Yields " <doc_modifier> " N characters."))) + (`` ($.definition <slice> + (format "Yields " <doc_modifier> " N characters (as a slice).")))] - ($.definition \\parser.Slice - "A slice of a block of text.") + [\\parser.exactly \\parser.exactly! "exactly"] + [\\parser.at_most \\parser.at_most! "at most"] + [\\parser.at_least \\parser.at_least! "at least"] + )) - ($.definition \\parser.result - (format "Executes a parser against a block of text." - \n "Verifies that the entire input has been processed.") - [(result parser input)]) + ($.definition \\parser.between + "" + [(between minimum additional parser)]) - ($.definition \\parser.offset - "Yields the current offset into the input.") + ($.definition \\parser.between! + "" + [(between! minimum additional parser)]) - ($.definition \\parser.any - "Yields the next character without applying any logic.") + ($.definition \\parser.enclosed + "" + [(enclosed [start end] parser)]) - ($.definition \\parser.any! - "Yields the next character (as a slice) without applying any logic.") + ($.definition \\parser.local + "Applies a parser against the given input." + [(local local_input parser)]) - (,, (with_template [<name> <caveat>] - [(`` ($.definition <name> - (format "Produce a character" (,, (template.text [<caveat>])) " if the parser fails.")))] + ($.definition \\parser.slice + "Converts a slice to a block of text." + [(slice parser)]) - [\\parser.not ""] - [\\parser.not! " (as a slice)"] - )) + ($.definition \\parser.then + "Embeds a text parser into an arbitrary parser that yields text." + [(then structured text)]) - ($.definition \\parser.this - "Checks that a specific text shows up in the input." - [(this reference)]) - - ($.definition \\parser.end - "Ensure the parser's input is empty.") - - ($.definition \\parser.next - "Yields the next character (without consuming it from the input).") - - ($.definition \\parser.remaining - "Get all of the remaining input (without consuming it).") - - ($.definition \\parser.range - "Only yields characters within a range." - [(range bottom top)]) - - (,, (with_template [<name> <desc>] - [($.definition <name> - (format "Only yields " <desc> " characters."))] - - [\\parser.upper "uppercase"] - [\\parser.lower "lowercase"] - [\\parser.decimal "decimal"] - [\\parser.octal "octal"] - )) - - ($.definition \\parser.alpha - "Yields alphabetic characters.") - - ($.definition \\parser.alpha_num - "Yields alphanumeric characters.") - - ($.definition \\parser.hexadecimal - "Yields hexadecimal digits.") - - (,, (with_template [<name> <description_modifier>] - [($.definition <name> - (format "Yields characters that are" <description_modifier> " part of a piece of text."))] - - [\\parser.one_of ""] - [\\parser.none_of " not"] - )) - - (,, (with_template [<name> <description_modifier>] - [($.definition <name> - (format "Yields characters (as a slice) that are" <description_modifier> " part of a piece of text."))] - - [\\parser.one_of! ""] - [\\parser.none_of! " not"] - )) - - ($.definition \\parser.satisfies - "Yields characters that satisfy a predicate." - [(satisfies parser)]) - - ($.definition \\parser.space - "Yields white-space.") - - ($.definition \\parser.and - "Yields the outputs of both parsers composed together." - [(and left right)]) - - ($.definition \\parser.and! - "Yields the outputs of both parsers composed together (as a slice)." - [(and! left right)]) - - (,, (with_template [<text> <slice>] - [(`` ($.definition <text> - (format "Yields " (,, (template.text [<name>])) " characters as a single continuous text."))) - (`` ($.definition <slice> - (format "Yields " (,, (template.text [<name>])) " characters as a single continuous text (as a slice).")))] - - [\\parser.some \\parser.some!] - [\\parser.many \\parser.many!] - )) - - (,, (with_template [<text> <slice> <doc_modifier>] - [(`` ($.definition <text> - (format "Yields " <doc_modifier> " N characters."))) - (`` ($.definition <slice> - (format "Yields " <doc_modifier> " N characters (as a slice).")))] - - [\\parser.exactly \\parser.exactly! "exactly"] - [\\parser.at_most \\parser.at_most! "at most"] - [\\parser.at_least \\parser.at_least! "at least"] - )) - - ($.definition \\parser.between - "" - [(between minimum additional parser)]) - - ($.definition \\parser.between! - "" - [(between! minimum additional parser)]) - - ($.definition \\parser.enclosed - "" - [(enclosed [start end] parser)]) - - ($.definition \\parser.local - "Applies a parser against the given input." - [(local local_input parser)]) - - ($.definition \\parser.slice - "Converts a slice to a block of text." - [(slice parser)]) - - ($.definition \\parser.then - "Embeds a text parser into an arbitrary parser that yields text." - [(then structured text)]) - ))) + (all list#composite + exception + specific + ) + )))) (def .public documentation (List $.Documentation) - (list.partial ($.module /._ - "") - - ($.definition /.of_char) - - ($.definition /.\0) - ($.definition /.null) - ($.definition /.\a) - ($.definition /.alarm) - ($.definition /.\b) - ($.definition /.back_space) - ($.definition /.\t) - ($.definition /.tab) - ($.definition /.\n) - ($.definition /.new_line) - ($.definition /.\v) - ($.definition /.vertical_tab) - ($.definition /.\f) - ($.definition /.form_feed) - ($.definition /.\r) - ($.definition /.carriage_return) - ($.definition /.\'') - ($.definition /.double_quote) - - ($.definition /.size) - ($.definition /.format) - ($.definition /.equivalence) - ($.definition /.order) - ($.definition /.monoid) - ($.definition /.hash) - ($.definition /.together) - ($.definition /.empty?) - ($.definition /.space) - ($.definition /.lower_cased) - ($.definition /.upper_cased) - - ($.definition /.Char - "A character code number.") - - ($.definition /.line_feed - "Same as 'new_line'.") - - ($.definition /.char - "Yields the character at the specified index." - [(char index input)]) - - ($.definition /.index_since - "" - [(index_since from pattern input)]) - - ($.definition /.index - "" - [(index pattern input)]) - - ($.definition /.last_index - "" - [(last_index part text)]) - - ($.definition /.starts_with? - "" - [(starts_with? prefix x)]) - - ($.definition /.ends_with? - "" - [(ends_with? postfix x)]) - - ($.definition /.enclosed_by? - "" - [(enclosed_by? boundary value)]) - - ($.definition /.contains? - "" - [(contains? sub text)]) - - ($.definition /.prefix - "" - [(prefix param subject)]) - - ($.definition /.suffix - "" - [(suffix param subject)]) - - ($.definition /.enclosed - "Surrounds the given content text with left and right side additions." - [(enclosed [left right] content)]) - - ($.definition /.enclosed' - "Surrounds the given content text with the same boundary text." - [(enclosed' boundary content)]) - - ($.definition /.clip - "Clips a chunk of text from the input at the specified offset and of the specified size." - [(clip offset size input)]) - - ($.definition /.clip_since - "Clips the remaining text from the input at the specified offset." - [(clip_since offset input)]) - - ($.definition /.split_at - "" - [(split_at at x)]) - - ($.definition /.split_by - "" - [(split_by token sample)]) - - ($.definition /.all_split_by - "" - [(all_split_by token sample)]) - - ($.definition /.replaced_once - "" - [(replaced_once pattern replacement template)]) - - ($.definition /.replaced - "" - [(replaced pattern replacement template)]) - - ($.definition /.interposed - "" - [(interposed separator texts)]) - - ($.definition /.space? - "Checks whether the character is white-space." - [(space? char)]) - - (all list#composite - ..\\format - ..\\parser - - /buffer.documentation - /encoding.documentation - /escape.documentation - /regex.documentation - /unicode.documentation - ) - )) + (let [character (list ($.definition /.Char + "A character code number.") + + ($.definition /.char + "Yields the character at the specified index." + [(char index input)]) + + ($.definition /.of_char) + + ($.definition /.\0) + ($.definition /.null) + ($.definition /.\a) + ($.definition /.alarm) + ($.definition /.\b) + ($.definition /.back_space) + ($.definition /.\t) + ($.definition /.tab) + ($.definition /.\n) + ($.definition /.new_line) + ($.definition /.\v) + ($.definition /.vertical_tab) + ($.definition /.\f) + ($.definition /.form_feed) + ($.definition /.\r) + ($.definition /.carriage_return) + ($.definition /.\'') + ($.definition /.double_quote) + + ($.definition /.space) + + ($.definition /.line_feed + "Same as 'new_line'.")) + query (list ($.definition /.empty?) + + ($.definition /.starts_with? + "" + [(starts_with? prefix x)]) + + ($.definition /.ends_with? + "" + [(ends_with? postfix x)]) + + ($.definition /.enclosed_by? + "" + [(enclosed_by? boundary value)]) + + ($.definition /.contains? + "" + [(contains? sub text)]) + + ($.definition /.space? + "Checks whether the character is white-space." + [(space? char)]))] + (list.partial ($.module /._ + "") + + ($.definition /.size) + ($.definition /.format) + ($.definition /.equivalence) + ($.definition /.order) + ($.definition /.monoid) + ($.definition /.hash) + ($.definition /.together) + + ($.definition /.lower_cased) + ($.definition /.upper_cased) + + ($.definition /.index_since + "" + [(index_since from pattern input)]) + + ($.definition /.index + "" + [(index pattern input)]) + + ($.definition /.last_index + "" + [(last_index part text)]) + + ($.definition /.prefix + "" + [(prefix param subject)]) + + ($.definition /.suffix + "" + [(suffix param subject)]) + + ($.definition /.enclosed + "Surrounds the given content text with left and right side additions." + [(enclosed [left right] content)]) + + ($.definition /.enclosed' + "Surrounds the given content text with the same boundary text." + [(enclosed' boundary content)]) + + ($.definition /.clip + "Clips a chunk of text from the input at the specified offset and of the specified size." + [(clip offset size input)]) + + ($.definition /.clip_since + "Clips the remaining text from the input at the specified offset." + [(clip_since offset input)]) + + ($.definition /.split_at + "" + [(split_at at x)]) + + ($.definition /.split_by + "" + [(split_by token sample)]) + + ($.definition /.all_split_by + "" + [(all_split_by token sample)]) + + ($.definition /.replaced_once + "" + [(replaced_once pattern replacement template)]) + + ($.definition /.replaced + "" + [(replaced pattern replacement template)]) + + ($.definition /.interposed + "" + [(interposed separator texts)]) + + (all list#composite + character + query + + ..\\format + ..\\parser + + /buffer.documentation + /encoding.documentation + /escape.documentation + /regex.documentation + /unicode.documentation + ) + ))) |