(.using
  [library
   [lux "*"
    ["$" documentation {"+" documentation:}]
    [control
     ["<>" parser
      ["<[0]>" code]]]
    [data
     ["[0]" text {"+" \n}
      ["%" format {"+" format}]]]
    [macro
     ["[0]" template]]]]
  [\\library
   ["[0]" /]])

(documentation: /.Resolution
  "A screen resolution.")

(template [<name>]
  [(documentation: <name>
     (let [name (|> (template.text [<name>])
                    (text.replaced "/" " ")
                    (text.replaced "_" " ")
                    text.upper_cased)]
       (format name " resolution: "
               (%.nat (value@ /.#width <name>))
               "x" (%.nat (value@ /.#height <name>))
               ".")))]

  [/.svga]
  [/.wsvga]
  [/.xga]
  [/.xga+]
  [/.wxga/16:9]
  [/.wxga/5:3]
  [/.wxga/16:10]
  [/.sxga]
  [/.wxga+]
  [/.hd+]
  [/.wsxga+]
  [/.fhd]
  [/.wuxga]
  [/.wqhd]
  [/.uhd_4k]
  )

(.def: .public documentation
  (.List $.Module)
  ($.module /._
            ""
            [..Resolution
             ..svga
             ..wsvga
             ..xga
             ..xga+
             ..wxga/16:9
             ..wxga/5:3
             ..wxga/16:10
             ..sxga
             ..wxga+
             ..hd+
             ..wsxga+
             ..fhd
             ..wuxga
             ..wqhd
             ..uhd_4k
             ($.default /.hash)
             ($.default /.equivalence)]
            []))
