(.using
  [library
   [lux {"-" private}
    ["$" documentation {"+" documentation:}]
    [data
     ["[0]" text {"+" \n}
      ["%" format {"+" format}]]]
    [macro
     ["[0]" template]]]]
  [\\library
   ["[0]" /]])

(documentation: /.=
  "Frac(tion) equivalence."
  [(= reference sample)])

(documentation: /.<
  "Frac(tion) less-than."
  [(< reference sample)])

(documentation: /.<=
  "Frac(tion) less-than or equal."
  [(<= reference sample)])

(documentation: /.>
  "Frac(tion) greater-than."
  [(> reference sample)])

(documentation: /.>=
  "Frac(tion) greater-than or equal."
  [(>= reference sample)])

(template [<name> <doc>]
  [(documentation: <name>
     <doc>)]

  [/.+ "Frac(tion) addition."]
  [/.- "Frac(tion) substraction."]
  [/.* "Frac(tion) multiplication."]
  [/./ "Frac(tion) division."]
  [/.% "Frac(tion) remainder."]
  )

(documentation: /./%
  ""
  [(/% param subject)])

(template [<name> <doc>]
  [(documentation: <name>
     <doc>)]

  [/.min "Frac(tion) minimum."]
  [/.max "Frac(tion) minimum."]
  )

(template [<name> <doc>]
  [(documentation: <name>
     <doc>)]

  [/.not_a_number "Not a number."]
  [/.positive_infinity "Positive infinity."]
  [/.negative_infinity "Negative infinity."]
  )

(documentation: /.not_a_number?
  "Tests whether a frac is actually not-a-number."
  [(not_a_number? it)])

(documentation: /.approximately?
  ""
  [(approximately? margin_of_error standard value)])

(documentation: /.mod
  ""
  [(mod divisor dividend)])

(.def: .public documentation
  (.List $.Module)
  ($.module /._
            ""
            [..=
             ..<
             ..<=
             ..>
             ..>=
             ..+
             ..-
             ..*
             ../
             ..%
             ../%
             ..min
             ..max
             ..not_a_number
             ..positive_infinity
             ..negative_infinity
             ..not_a_number?
             ..approximately?
             ..mod
             ($.default /.positive?)
             ($.default /.negative?)
             ($.default /.zero?)
             ($.default /.opposite)
             ($.default /.abs)
             ($.default /.signum)
             ($.default /.nat)
             ($.default /.int)
             ($.default /.rev)
             ($.default /.equivalence)
             ($.default /.order)
             ($.default /.smallest)
             ($.default /.biggest)
             ($.default /.addition)
             ($.default /.multiplication)
             ($.default /.minimum)
             ($.default /.maximum)
             ($.default /.number?)
             ($.default /.decimal)
             ($.default /.bits)
             ($.default /.of_bits)
             ($.default /.binary)
             ($.default /.octal)
             ($.default /.hex)
             ($.default /.hash)]
            []))
