(.using
  [library
   [lux {"-" nat int rev}
    ["$" documentation {"+" documentation:}]
    [data
     [text
      ["%" format {"+" format}]]
     [collection
      ["[0]" list]]]]]
  [\\library
   ["[0]" /]])

(template [<name> <type>]
  [(documentation: <name>
     (%.code (' (<name>
                 (: <type>
                    (value generating expression))))))]

  [/.nat .Nat]
  [/.int .Int]
  [/.rev .Rev]
  [/.frac .Frac]
  [/.text .Text]
  )

(documentation: /.literal
  ""
  [(/.literal
    (: (-> ??? Code)
       format)
    (: ???
       (value generating expression)))])

(template [<name> <type>]
  [(documentation: <name>
     (%.code (' (: <type>
                   (<name>)))))]

  [/.random_nat .Nat]
  [/.random_int .Int]
  [/.random_rev .Rev]
  [/.random_frac .Frac]
  )

(documentation: /.random
  ""
  [(/.random
    (: (-> ??? Code)
       format)
    (: (Random ???)
       (random data generator)))])

(.def: .public documentation
  (.List $.Module)
  ($.module /._
            ""
            [..nat
             ..int
             ..rev
             ..frac
             ..text
             ..literal
             ..random_nat
             ..random_int
             ..random_rev
             ..random_frac
             ..random]
            []))