aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/documentation
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/documentation')
-rw-r--r--stdlib/source/documentation/lux/abstract.lux2
-rw-r--r--stdlib/source/documentation/lux/abstract/apply.lux20
-rw-r--r--stdlib/source/documentation/lux/abstract/codec.lux30
-rw-r--r--stdlib/source/documentation/lux/abstract/comonad.lux35
-rw-r--r--stdlib/source/documentation/lux/abstract/comonad/free.lux19
-rw-r--r--stdlib/source/documentation/lux/abstract/enum.lux22
-rw-r--r--stdlib/source/documentation/lux/abstract/equivalence.lux24
-rw-r--r--stdlib/source/documentation/lux/abstract/functor.lux38
-rw-r--r--stdlib/source/documentation/lux/abstract/functor/contravariant.lux15
-rw-r--r--stdlib/source/documentation/lux/abstract/hash.lux17
-rw-r--r--stdlib/source/documentation/lux/abstract/interval.lux91
-rw-r--r--stdlib/source/documentation/lux/abstract/mix.lux22
-rw-r--r--stdlib/source/documentation/lux/abstract/monad.lux79
-rw-r--r--stdlib/source/documentation/lux/abstract/monad/free.lux21
-rw-r--r--stdlib/source/documentation/lux/abstract/monoid.lux21
-rw-r--r--stdlib/source/documentation/lux/abstract/order.lux47
16 files changed, 257 insertions, 246 deletions
diff --git a/stdlib/source/documentation/lux/abstract.lux b/stdlib/source/documentation/lux/abstract.lux
index 9e4d591ec..3c1de5143 100644
--- a/stdlib/source/documentation/lux/abstract.lux
+++ b/stdlib/source/documentation/lux/abstract.lux
@@ -20,7 +20,7 @@
["[1][0]" order]])
(.def .public documentation
- (.List $.Module)
+ (.List $.Documentation)
(list.together
(list /apply.documentation
/codec.documentation
diff --git a/stdlib/source/documentation/lux/abstract/apply.lux b/stdlib/source/documentation/lux/abstract/apply.lux
index 95818533d..c97585965 100644
--- a/stdlib/source/documentation/lux/abstract/apply.lux
+++ b/stdlib/source/documentation/lux/abstract/apply.lux
@@ -1,17 +1,17 @@
(.require
[library
- [lux
+ [lux (.except)
["$" documentation]]]
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition (/.Apply f)
- "Applicative functors.")
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
- ($.definition /.composite
- "Applicative functor composition.")]
- []))
+ ($.definition (/.Apply f)
+ "Applicative functors.")
+
+ ($.definition /.composite
+ "Applicative functor composition.")))
diff --git a/stdlib/source/documentation/lux/abstract/codec.lux b/stdlib/source/documentation/lux/abstract/codec.lux
index b23b86df6..b83ba092a 100644
--- a/stdlib/source/documentation/lux/abstract/codec.lux
+++ b/stdlib/source/documentation/lux/abstract/codec.lux
@@ -1,22 +1,22 @@
(.require
[library
- [lux
+ [lux (.except)
["$" documentation]]]
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition (/.Codec medium value)
- "A way to move back-and-forth between a type and an alternative representation for it.")
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
+
+ ($.definition (/.Codec medium value)
+ "A way to move back-and-forth between a type and an alternative representation for it.")
- ($.definition /.composite
- "Codec composition."
- [(is (Codec c a)
- (composite (is (Codec c b)
- cb_codec)
- (is (Codec b a)
- ba_codec)))])]
- []))
+ ($.definition /.composite
+ "Codec composition."
+ [(is (Codec c a)
+ (composite (is (Codec c b)
+ cb_codec)
+ (is (Codec b a)
+ ba_codec)))])))
diff --git a/stdlib/source/documentation/lux/abstract/comonad.lux b/stdlib/source/documentation/lux/abstract/comonad.lux
index 9f24d7d66..dd4fbc2e0 100644
--- a/stdlib/source/documentation/lux/abstract/comonad.lux
+++ b/stdlib/source/documentation/lux/abstract/comonad.lux
@@ -1,27 +1,30 @@
(.require
[library
- [lux
+ [lux (.except)
["$" documentation]
[data
[text (.only \n)
- ["%" \\format (.only format)]]]]]
+ ["%" \\format (.only format)]]
+ [collection
+ ["[0]" list]]]]]
[\\library
["[0]" /]]
["[0]" /
["[1][0]" free]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition (/.CoMonad !)
- (format "Co-monads are the opposite/complement to monads."
- \n "Co-monadic structures are often infinite in size and built upon lazily-evaluated functions."))
+(def .public documentation
+ (List $.Documentation)
+ (list.partial ($.module /._
+ "")
+ ($.definition (/.CoMonad !)
+ (format "Co-monads are the opposite/complement to monads."
+ \n "Co-monadic structures are often infinite in size and built upon lazily-evaluated functions."))
- ($.definition /.be
- "A co-monadic parallel to the 'do' macro."
- [(let [square (function (_ n) (* n n))]
- (be comonad
- [inputs (iterate ++ +2)]
- (square (out inputs))))])]
- [/free.documentation]))
+ ($.definition /.be
+ "A co-monadic parallel to the 'do' macro."
+ [(let [square (function (_ n) (* n n))]
+ (be comonad
+ [inputs (iterate ++ +2)]
+ (square (out inputs))))])
+
+ /free.documentation))
diff --git a/stdlib/source/documentation/lux/abstract/comonad/free.lux b/stdlib/source/documentation/lux/abstract/comonad/free.lux
index 9f8c966a9..5183fc490 100644
--- a/stdlib/source/documentation/lux/abstract/comonad/free.lux
+++ b/stdlib/source/documentation/lux/abstract/comonad/free.lux
@@ -1,17 +1,16 @@
(.require
[library
- [lux
+ [lux (.except)
["$" documentation]]]
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.functor)
- ($.definition /.comonad)
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
+ ($.definition /.functor)
+ ($.definition /.comonad)
- ($.definition (/.Free ! it)
- "The Free CoMonad.")]
- []))
+ ($.definition (/.Free ! it)
+ "The Free CoMonad.")))
diff --git a/stdlib/source/documentation/lux/abstract/enum.lux b/stdlib/source/documentation/lux/abstract/enum.lux
index a2dd452c8..4895c3543 100644
--- a/stdlib/source/documentation/lux/abstract/enum.lux
+++ b/stdlib/source/documentation/lux/abstract/enum.lux
@@ -1,18 +1,18 @@
(.require
[library
- [lux
+ [lux (.except)
["$" documentation]]]
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition (/.Enum it)
- "Enumerable types, with a notion of moving forward and backwards through a type's instances.")
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
- ($.definition /.range
- "An inclusive [from, to] range of values."
- [(range enum from to)])]
- []))
+ ($.definition (/.Enum it)
+ "Enumerable types, with a notion of moving forward and backwards through a type's instances.")
+
+ ($.definition /.range
+ "An inclusive [from, to] range of values."
+ [(range enum from to)])))
diff --git a/stdlib/source/documentation/lux/abstract/equivalence.lux b/stdlib/source/documentation/lux/abstract/equivalence.lux
index 56a8bf544..dd00470b8 100644
--- a/stdlib/source/documentation/lux/abstract/equivalence.lux
+++ b/stdlib/source/documentation/lux/abstract/equivalence.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux
+ [lux (.except)
["$" documentation]
[data
[text (.only \n)
@@ -8,16 +8,16 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.functor)
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
- ($.definition (/.Equivalence it)
- "Equivalence for a type's instances.")
+ ($.definition /.functor)
- ($.definition /.rec
- "A recursive equivalence combinator."
- [(rec recursive_equivalence)])]
- []))
+ ($.definition (/.Equivalence it)
+ "Equivalence for a type's instances.")
+
+ ($.definition /.rec
+ "A recursive equivalence combinator."
+ [(rec recursive_equivalence)])))
diff --git a/stdlib/source/documentation/lux/abstract/functor.lux b/stdlib/source/documentation/lux/abstract/functor.lux
index e0a981e87..6ac43c7cf 100644
--- a/stdlib/source/documentation/lux/abstract/functor.lux
+++ b/stdlib/source/documentation/lux/abstract/functor.lux
@@ -1,30 +1,34 @@
(.require
[library
- [lux
+ [lux (.except)
["$" documentation]
[data
[text (.only \n)
- ["%" \\format (.only format)]]]]]
+ ["%" \\format (.only format)]]
+ [collection
+ ["[0]" list]]]]]
[\\library
["[0]" /]]
["[0]" /
["[1][0]" contravariant]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition (/.Functor !))
- ($.definition (/.Or left right))
- ($.definition (/.And left right))
- ($.definition (/.Then outer inner))
+(def .public documentation
+ (List $.Documentation)
+ (list.partial ($.module /._
+ "")
- ($.definition /.sum
- "Co-product (sum) composition for functors.")
+ ($.definition (/.Functor !))
+ ($.definition (/.Or left right))
+ ($.definition (/.And left right))
+ ($.definition (/.Then outer inner))
- ($.definition /.product
- "Product composition for functors.")
+ ($.definition /.sum
+ "Co-product (sum) composition for functors.")
- ($.definition /.composite
- "Functor composition.")]
- [/contravariant.documentation]))
+ ($.definition /.product
+ "Product composition for functors.")
+
+ ($.definition /.composite
+ "Functor composition.")
+
+ /contravariant.documentation))
diff --git a/stdlib/source/documentation/lux/abstract/functor/contravariant.lux b/stdlib/source/documentation/lux/abstract/functor/contravariant.lux
index b438a6a7c..8d53219f6 100644
--- a/stdlib/source/documentation/lux/abstract/functor/contravariant.lux
+++ b/stdlib/source/documentation/lux/abstract/functor/contravariant.lux
@@ -1,14 +1,13 @@
(.require
[library
- [lux
+ [lux (.except)
["$" documentation]]]
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition (/.Functor !)
- "The contravariant functor.")]
- []))
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
+ ($.definition (/.Functor !)
+ "The contravariant functor.")))
diff --git a/stdlib/source/documentation/lux/abstract/hash.lux b/stdlib/source/documentation/lux/abstract/hash.lux
index 347a14440..12a862759 100644
--- a/stdlib/source/documentation/lux/abstract/hash.lux
+++ b/stdlib/source/documentation/lux/abstract/hash.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux
+ [lux (.except)
["$" documentation]
[data
[text (.only \n)
@@ -8,12 +8,11 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.functor)
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
+ ($.definition /.functor)
- ($.definition (/.Hash it)
- "A way to produce hash-codes for a type's instances.")]
- []))
+ ($.definition (/.Hash it)
+ "A way to produce hash-codes for a type's instances.")))
diff --git a/stdlib/source/documentation/lux/abstract/interval.lux b/stdlib/source/documentation/lux/abstract/interval.lux
index ca898b2b8..0cb58df71 100644
--- a/stdlib/source/documentation/lux/abstract/interval.lux
+++ b/stdlib/source/documentation/lux/abstract/interval.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux
+ [lux (.except)
["$" documentation]
[data
[text (.only \n)
@@ -8,47 +8,48 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.between)
- ($.definition /.inner?)
- ($.definition /.outer?)
- ($.definition /.singleton?)
- ($.definition /.within?)
- ($.definition /.starts_with?)
- ($.definition /.ends_with?)
- ($.definition /.precedes?)
- ($.definition /.succeeds?)
- ($.definition /.before?)
- ($.definition /.after?)
- ($.definition /.touches?)
- ($.definition /.starts?)
- ($.definition /.finishes?)
- ($.definition /.equivalence)
- ($.definition /.nested?)
- ($.definition /.overlaps?)
-
- ($.definition (/.Interval it)
- "A representation of top and bottom boundaries for an ordered type.")
-
- ($.definition /.singleton
- "An interval where both top and bottom are the same value."
- [(singleton enum elem)])
-
- ($.definition /.borders?
- "Where a value is at the border of an interval.")
-
- ($.definition /.union
- "An interval that spans both predecessors.")
-
- ($.definition /.intersection
- "An interval spanned by both predecessors.")
-
- ($.definition /.complement
- "The inverse of an interval.")
-
- ($.definition /.meets?
- "Whether an interval meets another one on its bottom/lower side.")]
- []))
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
+
+ ($.definition /.between)
+ ($.definition /.inner?)
+ ($.definition /.outer?)
+ ($.definition /.singleton?)
+ ($.definition /.within?)
+ ($.definition /.starts_with?)
+ ($.definition /.ends_with?)
+ ($.definition /.precedes?)
+ ($.definition /.succeeds?)
+ ($.definition /.before?)
+ ($.definition /.after?)
+ ($.definition /.touches?)
+ ($.definition /.starts?)
+ ($.definition /.finishes?)
+ ($.definition /.equivalence)
+ ($.definition /.nested?)
+ ($.definition /.overlaps?)
+
+ ($.definition (/.Interval it)
+ "A representation of top and bottom boundaries for an ordered type.")
+
+ ($.definition /.singleton
+ "An interval where both top and bottom are the same value."
+ [(singleton enum elem)])
+
+ ($.definition /.borders?
+ "Where a value is at the border of an interval.")
+
+ ($.definition /.union
+ "An interval that spans both predecessors.")
+
+ ($.definition /.intersection
+ "An interval spanned by both predecessors.")
+
+ ($.definition /.complement
+ "The inverse of an interval.")
+
+ ($.definition /.meets?
+ "Whether an interval meets another one on its bottom/lower side.")
+ ))
diff --git a/stdlib/source/documentation/lux/abstract/mix.lux b/stdlib/source/documentation/lux/abstract/mix.lux
index ed30c665e..d20c7b77e 100644
--- a/stdlib/source/documentation/lux/abstract/mix.lux
+++ b/stdlib/source/documentation/lux/abstract/mix.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux
+ [lux (.except)
["$" documentation]
[data
[text (.only \n)
@@ -8,14 +8,14 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition (/.Mix structure)
- "Iterate over a structure's values to build a summary value.")
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
- ($.definition /.with_monoid
- "Mix a mixable structure using the monoid's identity as the initial value."
- [(with_monoid monoid mix value)])]
- []))
+ ($.definition (/.Mix structure)
+ "Iterate over a structure's values to build a summary value.")
+
+ ($.definition /.with_monoid
+ "Mix a mixable structure using the monoid's identity as the initial value."
+ [(with_monoid monoid mix value)])))
diff --git a/stdlib/source/documentation/lux/abstract/monad.lux b/stdlib/source/documentation/lux/abstract/monad.lux
index 7f35e4b7d..45404fc1b 100644
--- a/stdlib/source/documentation/lux/abstract/monad.lux
+++ b/stdlib/source/documentation/lux/abstract/monad.lux
@@ -1,47 +1,52 @@
(.require
[library
- [lux
+ [lux (.except)
["$" documentation]
[data
[text (.only \n)
- ["%" \\format (.only format)]]]]]
+ ["%" \\format (.only format)]]
+ [collection
+ ["[0]" list]]]]]
[\\library
["[0]" /]]
["[0]" /
["[1][0]" free]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition (/.Monad it)
- (format "A monad is a monoid in the category of endofunctors."
- \n "What's the problem?"))
-
- ($.definition /.do
- "Macro for easy concatenation of monadic operations."
- [(do monad
- [y (f1 x)
- z (f2 z)]
- (in (f3 z)))])
-
- ($.definition /.then
- "Apply a function with monadic effects to a monadic value and yield a new monadic value."
- [(then monad function)])
-
- ($.definition /.all
- "Run all the monadic values in the list and produce a list of the base values."
- [(all monad)])
-
- ($.definition /.each
- "Apply a monadic function to all values in a list."
- [(each monad function items)])
-
- ($.definition /.only
- "Filter the values in a list with a monadic function."
- [(only monad predicate items)])
-
- ($.definition /.mix
- "Mix a list with a monadic function."
- [(mix monad function initial_value items)])]
- [/free.documentation]))
+(def .public documentation
+ (List $.Documentation)
+ (list.partial ($.module /._
+ "")
+
+ ($.definition (/.Monad it)
+ (format "A monad is a monoid in the category of endofunctors."
+ \n "What's the problem?"))
+
+ ($.definition /.do
+ "Macro for easy concatenation of monadic operations."
+ [(do monad
+ [y (f1 x)
+ z (f2 z)]
+ (in (f3 z)))])
+
+ ($.definition /.then
+ "Apply a function with monadic effects to a monadic value and yield a new monadic value."
+ [(then monad function)])
+
+ ($.definition /.all
+ "Run all the monadic values in the list and produce a list of the base values."
+ [(all monad)])
+
+ ($.definition /.each
+ "Apply a monadic function to all values in a list."
+ [(each monad function items)])
+
+ ($.definition /.only
+ "Filter the values in a list with a monadic function."
+ [(only monad predicate items)])
+
+ ($.definition /.mix
+ "Mix a list with a monadic function."
+ [(mix monad function initial_value items)])
+
+ /free.documentation
+ ))
diff --git a/stdlib/source/documentation/lux/abstract/monad/free.lux b/stdlib/source/documentation/lux/abstract/monad/free.lux
index f2cd0bdcf..50138dcd5 100644
--- a/stdlib/source/documentation/lux/abstract/monad/free.lux
+++ b/stdlib/source/documentation/lux/abstract/monad/free.lux
@@ -1,18 +1,17 @@
(.require
[library
- [lux
+ [lux (.except)
["$" documentation]]]
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.functor)
- ($.definition /.apply)
- ($.definition /.monad)
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
+ ($.definition /.functor)
+ ($.definition /.apply)
+ ($.definition /.monad)
- ($.definition (/.Free ! it)
- "The Free Monad.")]
- []))
+ ($.definition (/.Free ! it)
+ "The Free Monad.")))
diff --git a/stdlib/source/documentation/lux/abstract/monoid.lux b/stdlib/source/documentation/lux/abstract/monoid.lux
index 4a6aa158a..de7724679 100644
--- a/stdlib/source/documentation/lux/abstract/monoid.lux
+++ b/stdlib/source/documentation/lux/abstract/monoid.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux
+ [lux (.except)
["$" documentation]
[data
[text (.only \n)
@@ -8,13 +8,14 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.and)
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
- ($.definition (/.Monoid it)
- (format "A way to compose values."
- \n "Includes an identity value which does not alter any other value when combined with."))]
- []))
+ ($.definition /.and)
+
+ ($.definition (/.Monoid it)
+ (format "A way to compose values."
+ \n "Includes an identity value which does not alter any other value when combined with."))
+ ))
diff --git a/stdlib/source/documentation/lux/abstract/order.lux b/stdlib/source/documentation/lux/abstract/order.lux
index 9f0e646e3..f41ed5243 100644
--- a/stdlib/source/documentation/lux/abstract/order.lux
+++ b/stdlib/source/documentation/lux/abstract/order.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux
+ [lux (.except)
["$" documentation]
[data
[text (.only \n)
@@ -8,33 +8,34 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.functor)
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
- ($.definition (/.Order it)
- "A signature for types that possess some sense of ordering among their elements.")
+ ($.definition /.functor)
- ($.definition (/.Comparison it)
- "An arbitrary comparison between two values, with the knowledge of how to order them.")
+ ($.definition (/.Order it)
+ "A signature for types that possess some sense of ordering among their elements.")
- ($.definition /.<=
- "Less than or equal.")
+ ($.definition (/.Comparison it)
+ "An arbitrary comparison between two values, with the knowledge of how to order them.")
- ($.definition /.>
- "Greater than.")
+ ($.definition /.<=
+ "Less than or equal.")
- ($.definition /.>=
- "Greater than or equal.")
+ ($.definition /.>
+ "Greater than.")
- ($.definition (/.Choice it)
- "A choice comparison between two values, with the knowledge of how to order them.")
+ ($.definition /.>=
+ "Greater than or equal.")
- ($.definition /.min
- "Minimum.")
+ ($.definition (/.Choice it)
+ "A choice comparison between two values, with the knowledge of how to order them.")
- ($.definition /.max
- "Maximum.")]
- []))
+ ($.definition /.min
+ "Minimum.")
+
+ ($.definition /.max
+ "Maximum.")
+ ))