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

(documentation: /.PRNG
  "An abstract way to represent any PRNG.")

(documentation: (/.Random it)
  "A producer of random values based on a PRNG.")

(documentation: /.only
  "Retries the generator until the output satisfies a predicate."
  [(only pred gen)])

(documentation: /.one
  ""
  [(one check random)])

(documentation: /.refined
  "Retries the generator until the output can be refined."
  [(refined refiner gen)])

(documentation: /.safe_frac
  "A number in the interval [0.0,1.0].")

(documentation: /.text
  ""
  [(text char_gen size)])

(documentation: /.and
  "Sequencing combinator."
  [(and left right)])

(documentation: /.or
  "Heterogeneous alternative combinator."
  [(or left right)])

(documentation: /.either
  "Homogeneous alternative combinator."
  [(either left right)])

(documentation: /.rec
  "A combinator for producing recursive random generators."
  [(rec gen)])

(documentation: /.set
  ""
  [(set hash size value_gen)])

(documentation: /.dictionary
  ""
  [(dictionary hash size key_gen value_gen)])

(documentation: /.result
  ""
  [(result prng calc)])

(documentation: /.prng
  ""
  [(prng update return)])

(documentation: /.pcg_32
  (format "An implementation of the PCG32 algorithm."
          \n "For more information, please see: http://www.pcg-random.org/"))

(documentation: /.xoroshiro_128+
  (format "An implementation of the Xoroshiro128+ algorithm."
          \n "For more information, please see: http://xoroshiro.di.unimi.it/"))

(documentation: /.split_mix_64
  "An implementation of the SplitMix64 algorithm.")

(.def: .public documentation
  (.List $.Module)
  ($.module /._
            "Pseudo-random number generation (PRNG) algorithms."
            [..PRNG
             ..Random
             ..only
             ..one
             ..refined
             ..safe_frac
             ..text
             ..and
             ..or
             ..either
             ..rec
             ..set
             ..dictionary
             ..result
             ..prng
             ..pcg_32
             ..xoroshiro_128+
             ..split_mix_64
             ($.default /.functor)
             ($.default /.apply)
             ($.default /.monad)
             
             ($.default /.bit)
             ($.default /.i64)
             ($.default /.nat)
             ($.default /.int)
             ($.default /.rev)
             ($.default /.frac)
             ($.default /.char)

             ($.default /.unicode)
             ($.default /.ascii)
             ($.default /.ascii/alpha)
             ($.default /.ascii/alpha_num)
             ($.default /.ascii/numeric)
             ($.default /.ascii/upper)
             ($.default /.ascii/lower)
             
             ($.default /.ratio)
             ($.default /.complex)

             ($.default /.maybe)
             ($.default /.list)
             ($.default /.sequence)
             ($.default /.array)
             ($.default /.queue)
             ($.default /.stack)

             ($.default /.instant)
             ($.default /.date)
             ($.default /.time)
             ($.default /.duration)
             ($.default /.month)
             ($.default /.day)]
            []))
