aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/documentation/lux/data
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/documentation/lux/data')
-rw-r--r--stdlib/source/documentation/lux/data/binary.lux75
-rw-r--r--stdlib/source/documentation/lux/data/collection/dictionary.lux6
-rw-r--r--stdlib/source/documentation/lux/data/collection/list.lux6
-rw-r--r--stdlib/source/documentation/lux/data/collection/list/property.lux (renamed from stdlib/source/documentation/lux/data/collection/dictionary/plist.lux)2
-rw-r--r--stdlib/source/documentation/lux/data/format.lux4
-rw-r--r--stdlib/source/documentation/lux/data/format/binary.lux93
-rw-r--r--stdlib/source/documentation/lux/data/format/json.lux115
-rw-r--r--stdlib/source/documentation/lux/data/format/tar.lux2
-rw-r--r--stdlib/source/documentation/lux/data/format/xml.lux31
-rw-r--r--stdlib/source/documentation/lux/data/text.lux74
-rw-r--r--stdlib/source/documentation/lux/data/text/encoding.lux4
-rw-r--r--stdlib/source/documentation/lux/data/text/format.lux68
-rw-r--r--stdlib/source/documentation/lux/data/text/unicode/block.lux4
13 files changed, 217 insertions, 267 deletions
diff --git a/stdlib/source/documentation/lux/data/binary.lux b/stdlib/source/documentation/lux/data/binary.lux
index 80e05d511..61395234c 100644
--- a/stdlib/source/documentation/lux/data/binary.lux
+++ b/stdlib/source/documentation/lux/data/binary.lux
@@ -7,9 +7,82 @@
["%" \\format (.only format)]]]
[macro
["[0]" template]]]]
+ ["[0]" \\format]
[\\library
["[0]" /]])
+(.def \\format
+ (.List $.Module)
+ ($.module \\format._
+ ""
+ [($.default \\format.monoid)
+ ($.default \\format.bits_8)
+ ($.default \\format.bits_16)
+ ($.default \\format.bits_32)
+ ($.default \\format.bits_64)
+ ($.default \\format.any)
+ ($.default \\format.bit)
+ ($.default \\format.nat)
+ ($.default \\format.int)
+ ($.default \\format.rev)
+ ($.default \\format.frac)
+ ($.default \\format.binary_8)
+ ($.default \\format.binary_16)
+ ($.default \\format.binary_32)
+ ($.default \\format.binary_64)
+ ($.default \\format.utf8_8)
+ ($.default \\format.utf8_16)
+ ($.default \\format.utf8_32)
+ ($.default \\format.utf8_64)
+ ($.default \\format.text)
+ ($.default \\format.sequence_8)
+ ($.default \\format.sequence_16)
+ ($.default \\format.sequence_32)
+ ($.default \\format.sequence_64)
+ ($.default \\format.maybe)
+ ($.default \\format.list)
+ ($.default \\format.set)
+ ($.default \\format.symbol)
+ ($.default \\format.type)
+ ($.default \\format.location)
+ ($.default \\format.code)
+
+ ($.documentation \\format.Mutation
+ "A mutation of binary data, tracking where in the data to transform.")
+
+ ($.documentation \\format.Specification
+ "A description of how to transform binary data.")
+
+ ($.documentation \\format.no_op
+ "A specification for empty binary data.")
+
+ ($.documentation \\format.instance
+ "Given a specification of how to construct binary data, yields a binary blob that matches it.")
+
+ ($.documentation (\\format.Format it)
+ "An operation that knows how to write information into a binary blob.")
+
+ ($.documentation \\format.result
+ "Yields a binary blob with all the information written to it."
+ [(result format value)])
+
+ ($.documentation \\format.or
+ ""
+ [(or left right)])
+
+ ($.documentation \\format.and
+ ""
+ [(and pre post)])
+
+ ($.documentation \\format.rec
+ "A combinator for recursive formats."
+ [(rec body)])
+
+ ($.documentation \\format.segment
+ "Writes at most 'size' bytes of an input binary blob."
+ [(segment size)])]
+ []))
+
(.def .public documentation
(.List $.Module)
($.module /._
@@ -74,4 +147,4 @@
($.documentation /.after
"Yields a binary BLOB with at most the specified number of bytes removed."
[(after bytes binary)])]
- []))
+ [..\\format]))
diff --git a/stdlib/source/documentation/lux/data/collection/dictionary.lux b/stdlib/source/documentation/lux/data/collection/dictionary.lux
index 114050284..342d79f15 100644
--- a/stdlib/source/documentation/lux/data/collection/dictionary.lux
+++ b/stdlib/source/documentation/lux/data/collection/dictionary.lux
@@ -11,8 +11,7 @@
[\\library
["[0]" /]]
["[0]" /
- ["[1][0]" ordered]
- ["[1][0]" plist]])
+ ["[1][0]" ordered]])
(.def .public documentation
(.List $.Module)
@@ -85,5 +84,4 @@
($.documentation /.sub
"A sub-dictionary, with only the specified keys."
[(sub keys dict)])]
- [/ordered.documentation
- /plist.documentation]))
+ [/ordered.documentation]))
diff --git a/stdlib/source/documentation/lux/data/collection/list.lux b/stdlib/source/documentation/lux/data/collection/list.lux
index e0699154e..d3fb2c080 100644
--- a/stdlib/source/documentation/lux/data/collection/list.lux
+++ b/stdlib/source/documentation/lux/data/collection/list.lux
@@ -9,7 +9,9 @@
["[0]" code]
["[0]" template]]]]
[\\library
- ["[0]" /]])
+ ["[0]" /]]
+ ["[0]" /
+ ["[1][0]" property]])
(`` (.def .public documentation
(.List $.Module)
@@ -165,4 +167,4 @@
[value (do_something 1 2 3)
.when (passes_test? value)]
(do_something_else 4 5 6))])]
- [])))
+ [/property.documentation])))
diff --git a/stdlib/source/documentation/lux/data/collection/dictionary/plist.lux b/stdlib/source/documentation/lux/data/collection/list/property.lux
index 2e478812e..99e2faf06 100644
--- a/stdlib/source/documentation/lux/data/collection/dictionary/plist.lux
+++ b/stdlib/source/documentation/lux/data/collection/list/property.lux
@@ -22,7 +22,7 @@
($.default /.values)
($.default /.equivalence)
- ($.documentation (/.PList it)
+ ($.documentation (/.List it)
(format "A property list."
\n "It's a simple dictionary-like structure with Text keys."))
diff --git a/stdlib/source/documentation/lux/data/format.lux b/stdlib/source/documentation/lux/data/format.lux
index 794ebe065..7dbf22055 100644
--- a/stdlib/source/documentation/lux/data/format.lux
+++ b/stdlib/source/documentation/lux/data/format.lux
@@ -8,7 +8,6 @@
[collection
["[0]" list]]]]]
["[0]" /
- ["[1][0]" binary]
["[1][0]" json]
["[1][0]" tar]
["[1][0]" xml]])
@@ -16,8 +15,7 @@
(.def .public documentation
(.List $.Module)
(list.together
- (list /binary.documentation
- /json.documentation
+ (list /json.documentation
/tar.documentation
/xml.documentation
)))
diff --git a/stdlib/source/documentation/lux/data/format/binary.lux b/stdlib/source/documentation/lux/data/format/binary.lux
deleted file mode 100644
index b2ea53f63..000000000
--- a/stdlib/source/documentation/lux/data/format/binary.lux
+++ /dev/null
@@ -1,93 +0,0 @@
-(.require
- [library
- [lux (.except nat int rev list or and symbol)
- ["$" documentation (.only documentation:)]
- [data
- [text (.only \n)
- ["%" \\format (.only format)]]]
- [macro
- ["[0]" template]]]]
- [\\library
- ["[0]" /]])
-
-(documentation: /.Mutation
- "A mutation of binary data, tracking where in the data to transform.")
-
-(documentation: /.Specification
- "A description of how to transform binary data.")
-
-(documentation: /.no_op
- "A specification for empty binary data.")
-
-(documentation: /.instance
- "Given a specification of how to construct binary data, yields a binary blob that matches it.")
-
-(documentation: (/.Format it)
- "An operation that knows how to write information into a binary blob.")
-
-(documentation: /.result
- "Yields a binary blob with all the information written to it."
- [(result format value)])
-
-(documentation: /.or
- ""
- [(or left right)])
-
-(documentation: /.and
- ""
- [(and pre post)])
-
-(documentation: /.rec
- "A combinator for recursive formats."
- [(rec body)])
-
-(documentation: /.segment
- "Writes at most 'size' bytes of an input binary blob."
- [(segment size)])
-
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [..Mutation
- ..Specification
- ..no_op
- ..instance
- ..Format
- ..result
- ..or
- ..and
- ..rec
- ..segment
- ($.default /.monoid)
- ($.default /.bits_8)
- ($.default /.bits_16)
- ($.default /.bits_32)
- ($.default /.bits_64)
- ($.default /.any)
- ($.default /.bit)
- ($.default /.nat)
- ($.default /.int)
- ($.default /.rev)
- ($.default /.frac)
- ($.default /.binary_8)
- ($.default /.binary_16)
- ($.default /.binary_32)
- ($.default /.binary_64)
- ($.default /.utf8_8)
- ($.default /.utf8_16)
- ($.default /.utf8_32)
- ($.default /.utf8_64)
- ($.default /.text)
- ($.default /.sequence_8)
- ($.default /.sequence_16)
- ($.default /.sequence_32)
- ($.default /.sequence_64)
- ($.default /.maybe)
- ($.default /.list)
- ($.default /.set)
- ($.default /.symbol)
- ($.default /.type)
- ($.default /.location)
- ($.default /.code)]
- []))
diff --git a/stdlib/source/documentation/lux/data/format/json.lux b/stdlib/source/documentation/lux/data/format/json.lux
index bda2246e2..2051ee55c 100644
--- a/stdlib/source/documentation/lux/data/format/json.lux
+++ b/stdlib/source/documentation/lux/data/format/json.lux
@@ -1,7 +1,7 @@
(.require
[library
- [lux (.except nat int rev list or and has)
- ["$" documentation (.only documentation:)]
+ [lux (.except)
+ ["$" documentation]
[data
[text (.only \n)
["%" \\format (.only format)]]]
@@ -10,70 +10,59 @@
[\\library
["[0]" /]])
-(documentation: /.json
- "A simple way to produce JSON literals."
- ["null"
- (json #null)]
- ["true"
- (json #1)]
- ["123.456"
- (json +123.456)]
- ["'this is a string'"
- (json "this is a string")]
- ["['this' 'is' 'an' 'array']"
- (json ["this" "is" "an" "array"])]
- ["{'this' 'is', 'an' 'object'}"
- (json {"this" "is" "an" "object"})])
+(`` (.def .public documentation
+ (.List $.Module)
+ ($.module /._
+ (format "Functionality for reading and writing values in the JSON format."
+ \n "For more information, please see: http://www.json.org/")
+ [($.default /.Null)
+ ($.default /.Boolean)
+ ($.default /.Number)
+ ($.default /.String)
+ ($.default /.JSON)
+ ($.default /.Array)
+ ($.default /.Object)
+ ($.default /.null?)
+ ($.default /.object)
+ ($.default /.equivalence)
+ ($.default /.format)
+ ($.default /.codec)
-(documentation: /.fields
- "Get all the fields in a JSON object."
- [(fields json)])
+ ($.documentation /.json
+ "A simple way to produce JSON literals."
+ ["null"
+ (json #null)]
+ ["true"
+ (json #1)]
+ ["123.456"
+ (json +123.456)]
+ ["'this is a string'"
+ (json "this is a string")]
+ ["['this' 'is' 'an' 'array']"
+ (json ["this" "is" "an" "array"])]
+ ["{'this' 'is', 'an' 'object'}"
+ (json {"this" "is" "an" "object"})])
-(documentation: /.field
- "A JSON object field getter."
- [(field key json)])
+ ($.documentation /.fields
+ "Get all the fields in a JSON object."
+ [(fields json)])
-(documentation: /.has
- "A JSON object field setter."
- [(has key value json)])
+ ($.documentation /.field
+ "A JSON object field getter."
+ [(field key json)])
-(with_template [<name> <desc>]
- [(documentation: <name>
- (format "A JSON object field getter for " <desc> "."))]
+ ($.documentation /.has
+ "A JSON object field setter."
+ [(has key value json)])
- [/.boolean_field "booleans"]
- [/.number_field "numbers"]
- [/.string_field "strings"]
- [/.array_field "arrays"]
- [/.object_field "objects"]
- )
+ (~~ (with_template [<name> <desc>]
+ [($.documentation <name>
+ (format "A JSON object field getter for " <desc> "."))]
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- (format "Functionality for reading and writing values in the JSON format."
- \n "For more information, please see: http://www.json.org/")
- [..json
- ..fields
- ..field
- ..has
-
- ..boolean_field
- ..number_field
- ..string_field
- ..array_field
- ..object_field
-
- ($.default /.Null)
- ($.default /.Boolean)
- ($.default /.Number)
- ($.default /.String)
- ($.default /.JSON)
- ($.default /.Array)
- ($.default /.Object)
- ($.default /.null?)
- ($.default /.object)
- ($.default /.equivalence)
- ($.default /.format)
- ($.default /.codec)]
- []))
+ [/.boolean_field "booleans"]
+ [/.number_field "numbers"]
+ [/.string_field "strings"]
+ [/.array_field "arrays"]
+ [/.object_field "objects"]
+ ))]
+ [])))
diff --git a/stdlib/source/documentation/lux/data/format/tar.lux b/stdlib/source/documentation/lux/data/format/tar.lux
index 8da6c890f..353d83876 100644
--- a/stdlib/source/documentation/lux/data/format/tar.lux
+++ b/stdlib/source/documentation/lux/data/format/tar.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/format/xml.lux b/stdlib/source/documentation/lux/data/format/xml.lux
index afb0bc9ee..002f24eff 100644
--- a/stdlib/source/documentation/lux/data/format/xml.lux
+++ b/stdlib/source/documentation/lux/data/format/xml.lux
@@ -1,7 +1,7 @@
(.require
[library
- [lux (.except nat int rev list or and)
- ["$" documentation (.only documentation:)]
+ [lux (.except)
+ ["$" documentation]
[data
[text (.only \n)
["%" \\format (.only format)]]]
@@ -10,27 +10,24 @@
[\\library
["[0]" /]])
-(documentation: /.attributes
- "An empty set of XML attributes.")
-
-(documentation: /.tag
- "The text format of a XML tag."
- [(tag name)])
-
-(documentation: /.attribute
- "The text format of a XML attribute.")
-
(.def .public documentation
(.List $.Module)
($.module /._
""
- [..attributes
- ..tag
- ..attribute
- ($.default /.Tag)
+ [($.default /.Tag)
($.default /.Attribute)
($.default /.Attrs)
($.default /.XML)
($.default /.codec)
- ($.default /.equivalence)]
+ ($.default /.equivalence)
+
+ ($.documentation /.attributes
+ "An empty set of XML attributes.")
+
+ ($.documentation /.tag
+ "The text format of a XML tag."
+ [(tag name)])
+
+ ($.documentation /.attribute
+ "The text format of a XML attribute.")]
[]))
diff --git a/stdlib/source/documentation/lux/data/text.lux b/stdlib/source/documentation/lux/data/text.lux
index d0ca26967..3be4f68f6 100644
--- a/stdlib/source/documentation/lux/data/text.lux
+++ b/stdlib/source/documentation/lux/data/text.lux
@@ -1,22 +1,75 @@
(.require
[library
- [lux (.except char)
- ["$" documentation]
- [data
- [text
- ["%" \\format (.only format)]]
- [collection
- ["[0]" list]]]]]
+ [lux (.except)
+ ["$" documentation]]]
["[0]" /
["[1][0]" buffer]
["[1][0]" encoding]
["[1][0]" escape]
- ["[1][0]" format]
["[1][0]" regex]
["[1][0]" unicode]]
+ ["[0]" \\format]
[\\library
["[0]" /]])
+(.def \\format
+ (.List $.Module)
+ ($.module \\format._
+ ""
+ [($.default \\format.functor)
+
+ ($.default \\format.bit)
+ ($.default \\format.nat)
+ ($.default \\format.int)
+ ($.default \\format.rev)
+ ($.default \\format.frac)
+ ($.default \\format.text)
+
+ ($.default \\format.ratio)
+ ($.default \\format.symbol)
+ ($.default \\format.location)
+ ($.default \\format.code)
+ ($.default \\format.type)
+
+ ($.default \\format.instant)
+ ($.default \\format.duration)
+ ($.default \\format.date)
+ ($.default \\format.time)
+ ($.default \\format.day)
+ ($.default \\format.month)
+
+ ($.default \\format.xml)
+ ($.default \\format.json)
+
+ ($.default \\format.nat_2)
+ ($.default \\format.nat_8)
+ ($.default \\format.nat_10)
+ ($.default \\format.nat_16)
+ ($.default \\format.int_2)
+ ($.default \\format.int_8)
+ ($.default \\format.int_10)
+ ($.default \\format.int_16)
+ ($.default \\format.rev_2)
+ ($.default \\format.rev_8)
+ ($.default \\format.rev_10)
+ ($.default \\format.rev_16)
+ ($.default \\format.frac_2)
+ ($.default \\format.frac_8)
+ ($.default \\format.frac_10)
+ ($.default \\format.frac_16)
+
+ ($.default \\format.mod)
+ ($.default \\format.list)
+ ($.default \\format.maybe)
+
+ ($.documentation (\\format.Format it)
+ "A way to produce readable text from values.")
+
+ ($.documentation \\format.format
+ "Text interpolation."
+ [(format "Static part " (text static) " does not match URI: " uri)])]
+ []))
+
(.def .public documentation
(.List $.Module)
($.module /._
@@ -143,9 +196,10 @@
($.documentation /.space?
"Checks whether the character is white-space."
[(space? char)])]
- [/buffer.documentation
+ [..\\format
+
+ /buffer.documentation
/encoding.documentation
/escape.documentation
- /format.documentation
/regex.documentation
/unicode.documentation]))
diff --git a/stdlib/source/documentation/lux/data/text/encoding.lux b/stdlib/source/documentation/lux/data/text/encoding.lux
index fbc82281a..6a8652b67 100644
--- a/stdlib/source/documentation/lux/data/text/encoding.lux
+++ b/stdlib/source/documentation/lux/data/text/encoding.lux
@@ -18,11 +18,11 @@
""
[($.default /.name)
- (documentation: /.Encoding
+ ($.documentation /.Encoding
"Encoding formats for text.")
(~~ (with_template [<name>]
- [(documentation: <name>
+ [($.documentation <name>
(format "'" (/.name <name>) "' text encoding. "))]
[/.ascii]
diff --git a/stdlib/source/documentation/lux/data/text/format.lux b/stdlib/source/documentation/lux/data/text/format.lux
deleted file mode 100644
index c7dbb68b5..000000000
--- a/stdlib/source/documentation/lux/data/text/format.lux
+++ /dev/null
@@ -1,68 +0,0 @@
-(.require
- [library
- [lux (.except nat int rev list symbol)
- ["$" documentation (.only documentation:)]
- [macro
- ["[0]" template]]]]
- [\\library
- ["[0]" /]])
-
-(documentation: (/.Format it)
- "A way to produce readable text from values.")
-
-(documentation: /.format
- "Text interpolation."
- [(format "Static part " (text static) " does not match URI: " uri)])
-
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [..Format
- ..format
- ($.default /.functor)
-
- ($.default /.bit)
- ($.default /.nat)
- ($.default /.int)
- ($.default /.rev)
- ($.default /.frac)
- ($.default /.text)
-
- ($.default /.ratio)
- ($.default /.symbol)
- ($.default /.location)
- ($.default /.code)
- ($.default /.type)
-
- ($.default /.instant)
- ($.default /.duration)
- ($.default /.date)
- ($.default /.time)
- ($.default /.day)
- ($.default /.month)
-
- ($.default /.xml)
- ($.default /.json)
-
- ($.default /.nat_2)
- ($.default /.nat_8)
- ($.default /.nat_10)
- ($.default /.nat_16)
- ($.default /.int_2)
- ($.default /.int_8)
- ($.default /.int_10)
- ($.default /.int_16)
- ($.default /.rev_2)
- ($.default /.rev_8)
- ($.default /.rev_10)
- ($.default /.rev_16)
- ($.default /.frac_2)
- ($.default /.frac_8)
- ($.default /.frac_10)
- ($.default /.frac_16)
-
- ($.default /.mod)
- ($.default /.list)
- ($.default /.maybe)]
- []))
diff --git a/stdlib/source/documentation/lux/data/text/unicode/block.lux b/stdlib/source/documentation/lux/data/text/unicode/block.lux
index 95868365e..0ee609dd9 100644
--- a/stdlib/source/documentation/lux/data/text/unicode/block.lux
+++ b/stdlib/source/documentation/lux/data/text/unicode/block.lux
@@ -3,13 +3,13 @@
[lux (.except)
["$" documentation]
[data
- ["[0]" text
+ ["[0]" text (.only)
["%" \\format (.only format)]]]
[macro
["[0]" template]]
[math
[number
- ["[0]" nat ("hex#[0]" hex)]]]]]
+ ["[0]" nat (.use "hex#[0]" hex)]]]]]
[\\library
["[0]" /]])