diff options
author | Eduardo Julian | 2022-01-06 19:47:43 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-01-06 19:47:43 -0400 |
commit | d0f33f630aedb67d2888e32ceb7bc237839b274e (patch) | |
tree | 1d5d4545a9480caac6bbd7c98ebe9cb044e80ebb /stdlib/source/specification | |
parent | d37982f0af44714d95caf24d7f944e4e659b3e69 (diff) |
Small optimizations to JVM bytecode generation.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/specification/lux/abstract/equivalence.lux | 32 |
1 files changed, 16 insertions, 16 deletions
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))))))) |