(.require
 [library
  [lux (.except)
   ["$" documentation]
   [data
    [text (.only \n)
     ["%" \\format (.only format)]]
    [collection
     ["[0]" list (.use "[1]#[0]" monoid)]]]]]
 [\\library
  ["[0]" /]])

(def all_1/3
  (List $.Documentation)
  (list ($.definition /.Code)
        ($.definition /.equivalence)
        ($.definition /.hash)
        ($.definition /.manual)
        ($.definition /.code)
        ($.definition /.Expression)
        ($.definition /.Computation)
        ($.definition /.Location)
        ($.definition /.Var)
        ($.definition /.LVar)
        ($.definition /.Statement)
        ($.definition /.Literal)
        ($.definition /.Access)
        ($.definition /.GVar)
        ($.definition /.IVar)
        ($.definition /.SVar)
        ($.definition /.LVar*)
        ($.definition /.LVar**)
        ($.definition /.global)
        ($.definition /.instance)
        ($.definition /.static)
        ($.definition /.local)
        ($.definition /.variadic)
        ($.definition /.splat)
        ($.definition /.variadic_kv)
        ($.definition /.double_splat)
        ($.definition /.latest_error_message)
        ($.definition /.latest_error_location)
        ($.definition /.last_string_read)
        ($.definition /.last_line_number_read)
        ($.definition /.last_string_matched)
        ($.definition /.last_regexp_match)
        ($.definition /.case_insensitivity_flag)
        ($.definition /.input_record_separator)
        ($.definition /.output_record_separator)
        ))

(def all_2/3
  (List $.Documentation)
  (list ($.definition /.script_name)
        ($.definition /.process_id)
        ($.definition /.exit_status)
        ($.definition /.command_line_arguments)
        ($.definition /.nil)
        ($.definition /.bool)
        ($.definition /.int)
        ($.definition /.string)
        ($.definition /.symbol)
        ($.definition /.float)
        ($.definition /.array_range)
        ($.definition /.array)
        ($.definition /.hash)
        ($.definition /.apply)
        ($.definition /.apply_lambda)
        ($.definition /.the)
        ($.definition /.item)
        ($.definition /.?)
        ($.definition /.statement)
        ($.definition /.then)
        ($.definition /.set)
        ($.definition /.if)
        ($.definition /.when)
        ($.definition /.while)
        ($.definition /.for_in)
        ($.definition /.Rescue)
        ($.definition /.begin)
        ($.definition /.catch)
        ($.definition /.return)
        ($.definition /.raise)
        ($.definition /.next)
        ($.definition /.redo)
        ($.definition /.break)
        ($.definition /.function)
        ($.definition /.lambda)
        ))

(def all_3/3
  (List $.Documentation)
  (list ($.definition /.=)
        ($.definition /.<)
        ($.definition /.<=)
        ($.definition /.>)
        ($.definition /.>=)
        ($.definition /.+)
        ($.definition /.-)
        ($.definition /.*)
        ($.definition /./)
        ($.definition /.%)
        ($.definition /.pow)
        ($.definition /.or)
        ($.definition /.and)
        ($.definition /.bit_or)
        ($.definition /.bit_and)
        ($.definition /.bit_xor)
        ($.definition /.bit_shl)
        ($.definition /.bit_shr)
        ($.definition /.not)
        ($.definition /.opposite)
        ($.definition /.comment)
        ($.definition /.do)
        ($.definition /.print/1)
        ($.definition /.require/1)
        ($.definition /.print/2)
        ($.definition /.throw/1)
        ))

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

                (all list#composite
                     all_1/3
                     all_2/3
                     all_3/3
                     )
                ))
