aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/specification/lux/abstract/hash.lux
diff options
context:
space:
mode:
authorEduardo Julian2022-11-07 18:52:46 -0400
committerEduardo Julian2022-11-07 18:52:46 -0400
commitcb572295c9a73330531e07f3f6a92b3bb2434514 (patch)
treeae14be0a53235971d897c033879e3d4512ffde68 /stdlib/source/specification/lux/abstract/hash.lux
parent13c594758482bac0a7550bcb89cfeda8c5f0a1f3 (diff)
Can now mark definitions as deprecated in their documentation.
Diffstat (limited to '')
-rw-r--r--stdlib/source/specification/lux/abstract/hash.lux18
1 files changed, 12 insertions, 6 deletions
diff --git a/stdlib/source/specification/lux/abstract/hash.lux b/stdlib/source/specification/lux/abstract/hash.lux
index d95fef663..2b6aa5cd6 100644
--- a/stdlib/source/specification/lux/abstract/hash.lux
+++ b/stdlib/source/specification/lux/abstract/hash.lux
@@ -2,7 +2,9 @@
[library
[lux (.except)
[abstract
- [monad (.only do)]]
+ [monad (.only do)]
+ [\\specification
+ ["[0]S" equivalence]]]
[math
["[0]" random (.only Random)]
[number
@@ -12,12 +14,16 @@
[\\library
["[0]" /]])
-(def .public (spec (open "_#[0]") random)
+(def .public (spec (open "/#[0]") random)
(All (_ a) (-> (/.Hash a) (Random a) Test))
(do random.monad
[parameter random
subject random]
- (_.coverage [/.Hash]
- (if (_#= parameter subject)
- (n.= (_#hash parameter) (_#hash subject))
- true))))
+ (all _.and
+ (_.for [/.equivalence]
+ (equivalenceS.spec /#equivalence random))
+ (_.coverage [/.Hash /.hash]
+ (if (/#= parameter subject)
+ (n.= (/#hash parameter) (/#hash subject))
+ true))
+ )))