... This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
... If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.

(.using
 [library
  [lux (.except)
   [abstract
    ["[0]" monad]
    ["[0]" equality
     ["[1]T" \\test]]
    ["[0]" hash
     ["[1]T" \\test]]]
   [data
    ["[0]" text]]
   [math
    ["[0]" random (.only Random)]]
   [meta
    ["[0]" static]]
   [test
    ["_" property (.only Test)]]
   [compiler
    ["@[0]" type]]]]
 [\\library
  ["[0]" /]])

(the .public test
  Test
  (<| (_.covering /._)
      (_.for [@type.Variable
              @type.:Local @type.:Foreign

              /.random])
      (monad.let [! random.monad]
        [register random.natural]
        (all _.and
             (_.for [/.equality /.=]
                    (static.when (identical? /.equality /.=)
                      (equalityT.spec /.equality /.random)))
             (_.for [/.hash]
                    (hashT.spec /.hash /.random))
             
             (_.coverage [/.self]
               (when (/.self)
                 (/.self) true
                 _ false))
             (_.coverage [/.self?]
               (/.self? (/.self)))
             (_.coverage [/.as_text]
               (not (text.= (/.as_text {@type.:Local register})
                            (/.as_text {@type.:Foreign register}))))
             ))))
