aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/documentation/lux/type/unit.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/documentation/lux/type/unit.lux89
1 files changed, 0 insertions, 89 deletions
diff --git a/stdlib/source/documentation/lux/type/unit.lux b/stdlib/source/documentation/lux/type/unit.lux
deleted file mode 100644
index c7f4948ab..000000000
--- a/stdlib/source/documentation/lux/type/unit.lux
+++ /dev/null
@@ -1,89 +0,0 @@
-(.require
- [library
- [lux (.except and)
- ["$" documentation]
- [data
- ["[0]" text (.only \n)
- ["%" \\format (.only format)]]]
- [macro
- ["[0]" template]]
- [math
- [number
- ["[0]" ratio]]]]]
- [\\library
- ["[0]" /]])
-
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.default /.Gram)
- ($.default /.Meter)
- ($.default /.Litre)
- ($.default /.Second)
- ($.default /.pure)
- ($.default /.number)
- ($.default /.equivalence)
- ($.default /.order)
- ($.default /.enum)
- ($.default /.Kilo)
- ($.default /.Mega)
- ($.default /.Giga)
- ($.default /.Milli)
- ($.default /.Micro)
- ($.default /.Nano)
- ($.default /.+)
- ($.default /.-)
- ($.default /.*)
- ($.default /./)
-
- ($.documentation (/.Measure unit)
- "A quantity with an associated unit of measurement.")
-
- ($.documentation (/.Unit unit)
- "A unit of measurement, to qualify numbers with.")
-
- ($.documentation (/.Scale scale)
- "A scale of magnitude.")
-
- ($.documentation /.Pure
- "A pure, unit-less measure.")
-
- ($.documentation /.unit
- (format "Define a unit of measurement."
- \n "Both the name of the type, and the name of the Unit implementation must be specified.")
- [(def feet (unit []))])
-
- ($.documentation /.scale
- "Define a scale of magnitude."
- [(def bajillion (scale [1 1,234,567,890]))])
-
- ($.documentation /.re_scaled
- ""
- [(re_scaled from to measure)])
-
- (~~ (with_template [<type> <scale>]
- [(`` ($.documentation <scale>
- (let [numerator (the [/.ratio ratio.#numerator] <scale>)
- denominator (the [/.ratio ratio.#denominator] <scale>)]
- (format "The '" (~~ (template.text [<scale>])) "' scale, from " (%.nat numerator) " to " (%.nat denominator) "."))))]
-
- [/.Kilo /.kilo]
- [/.Mega /.mega]
- [/.Giga /.giga]
-
- [/.Milli /.milli]
- [/.Micro /.micro]
- [/.Nano /.nano]
- ))
-
- (~~ (with_template [<unit>]
- [(`` ($.documentation <unit>
- (format "The '" (~~ (template.text [<unit>])) "' unit of meaurement.")))]
-
- [/.gram]
- [/.meter]
- [/.litre]
- [/.second]
- ))]
- []))