From cb572295c9a73330531e07f3f6a92b3bb2434514 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Mon, 7 Nov 2022 18:52:46 -0400 Subject: Can now mark definitions as deprecated in their documentation. --- stdlib/source/specification/lux/abstract/hash.lux | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'stdlib/source/specification') 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)) + ))) -- cgit v1.2.3