(.require
 [library
  [lux (.except)
   ["$" documentation]
   [data
    ["[0]" text (.only \n)
     ["%" \\format (.only format)]]
    [collection
     ["[0]" list (.use "[1]#[0]" monoid)]]]]]
 [\\library
  ["[0]" /]]
 ["[0]" /
  ["[1][0]" date]
  ["[1][0]" day]
  ["[1][0]" duration]
  ["[1][0]" instant]
  ["[1][0]" month]
  ["[1][0]" year]])

(`` (def .public documentation
      (List $.Documentation)
      (list.partial ($.module /._
                              "")

                    ($.definition /.time_exceeds_a_day)
                    ($.definition /.invalid_hour)
                    ($.definition /.invalid_minute)
                    ($.definition /.invalid_second)
                    ($.definition /.millis)
                    ($.definition /.equivalence)
                    ($.definition /.order)
                    ($.definition /.enum)
                    ($.definition /.parser)

                    (,, (with_template [<name> <doc>]
                          [($.definition <name>
                             <doc>)]

                          [/.milli_seconds "Number of milli-seconds in a second."]
                          [/.seconds "Number of seconds in a minute."]
                          [/.minutes "Number of minutes in an hour."]
                          [/.hours "Number of hours in an day."]
                          ))

                    ($.definition /.Time
                      "Time is defined as milliseconds since the start of the day (00:00:00.000).")

                    ($.definition /.midnight
                      "The instant corresponding to the start of the day: 00:00:00.000")

                    ($.definition /.of_millis
                      ""
                      [(of_millis milli_seconds)])

                    ($.definition /.Clock
                      "A clock marking the specific hour, minute, second, and milli-second in a day.")

                    ($.definition /.clock
                      ""
                      [(clock time)])

                    ($.definition /.time
                      ""
                      [(time clock)])

                    ($.definition /.codec
                      (format "Based on ISO 8601."
                              \n "For example: 21:14:51.827"))

                    (all list#composite
                         /date.documentation
                         /day.documentation
                         /duration.documentation
                         /instant.documentation
                         /month.documentation
                         /year.documentation
                         )
                    )))
