From d0f33f630aedb67d2888e32ceb7bc237839b274e Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Thu, 6 Jan 2022 19:47:43 -0400 Subject: Small optimizations to JVM bytecode generation. --- .../specification/lux/abstract/equivalence.lux | 32 +++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'stdlib/source/specification') diff --git a/stdlib/source/specification/lux/abstract/equivalence.lux b/stdlib/source/specification/lux/abstract/equivalence.lux index 84bcea50f..42d9e3750 100644 --- a/stdlib/source/specification/lux/abstract/equivalence.lux +++ b/stdlib/source/specification/lux/abstract/equivalence.lux @@ -1,24 +1,24 @@ (.using - [library - [lux "*" - ["_" test {"+" Test}] - [abstract - [monad {"+" do}]] - [math - ["[0]" random {"+" Random}]]]] - [\\library - ["[0]" / {"+" Equivalence}]]) + [library + [lux "*" + ["_" test {"+" Test}] + [abstract + [monad {"+" do}]] + [data + ["[0]" bit ("[1]#[0]" equivalence)]] + [math + ["[0]" random {"+" Random}]]]] + [\\library + ["[0]" / {"+" Equivalence}]]) -(def: .public (spec (^open "_//[0]") random) +(def: .public (spec (^open "/#[0]") random) (All (_ a) (-> (Equivalence a) (Random a) Test)) (do random.monad [left random right random] (<| (_.for [/.Equivalence]) ($_ _.and - (_.test "Reflexivity." - (_//= left left)) - (_.test "Symmetry." - (if (_//= left right) - (_//= right left) - (not (_//= right left)))))))) + (_.test "Reflexivity" + (/#= left left)) + (_.test "Symmetry" + (bit#= (/#= left right) (/#= right left))))))) -- cgit v1.2.3