(.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]" i8]
  ["[1][0]" i16]
  ["[1][0]" i32]
  ["[1][0]" i64]
  ["[1][0]" nat]
  ["[1][0]" int]
  ["[1][0]" rev]
  ["[1][0]" frac]
  ["[1][0]" ratio]
  ["[1][0]" complex]])

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

                    (,, (with_template [<name> <encoding> <no_commas> <with_commas>]
                          [($.definition <name>
                             (format "Given syntax for a " <encoding> " number, generates a Nat, an Int, a Rev or a Frac.")
                             [<no_commas>]
                             ["Allows for the presence of commas (,) among the digits."
                              <with_commas>])]

                          [/.bin "binary" (bin "11001001") (bin "11,00,10,01")]
                          [/.oct "octal" (oct "615243") (oct "615,243")]
                          [/.hex "hexadecimal" (hex "deadBEEF") (hex "dead,BEEF")]
                          ))

                    (all list#composite
                         /i8.documentation
                         /i16.documentation
                         /i32.documentation
                         /i64.documentation
                         /nat.documentation
                         /int.documentation
                         /rev.documentation
                         /frac.documentation
                         /ratio.documentation
                         /complex.documentation
                         )
                    )))
