... This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
... If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.

(.require
 [library
  [lux (.except)
   ["$" documentation]
   [data
    ["[0]" text (.only \n)
     ["%" \\injection]]
    [collection
     ["[0]" list (.use "[1]#[0]" monoid)]]]
   [meta
    [macro
     ["[0]" template]]]]]
 [\\library
  ["[0]" /]]
 ["[0]" /
  ["[1][0]" i8]
  ["[1][0]" i16]
  ["[1][0]" i32]
  ["[1][0]" i64]
  ["[1][0]" natural]
  ["[1][0]" integer]
  ["[1][0]" revolution]
  ["[1][0]" decimal]
  ["[1][0]" fraction]
  ["[1][0]" complex]])

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

                    (,, (template.with [<name> <encoding> <no_commas> <with_commas>]
                          [($.definition <name>
                             (%.message "Given syntax for a " <encoding> " number, generates a Natural, an Integer, a Revolution or a Decimal.")
                             ($.example (' <no_commas>))

                             ($.comment "Allows for the presence of commas (,) among the digits.")
                             ($.example (' <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
                         /natural.documentation
                         /integer.documentation
                         /revolution.documentation
                         /decimal.documentation
                         /fraction.documentation
                         /complex.documentation
                         )
                    )))
