(.using
  [library
   [lux {"-" private}
    ["$" documentation {"+" documentation:}]
    [data
     ["[0]" text {"+" \n}
      ["%" format {"+" format}]]]
    [macro
     ["[0]" template]]]]
  [\\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]])

(template [<name> <encoding> <no_commas> <with_commas>]
  [(documentation: <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")]
  )

(.def: .public documentation
  (.List $.Module)
  ($.module /._
            ""
            [..bin
             ..oct
             ..hex]
            [/i8.documentation
             /i16.documentation
             /i32.documentation
             /i64.documentation
             /nat.documentation
             /int.documentation
             /rev.documentation
             /frac.documentation
             /ratio.documentation
             /complex.documentation]))
