aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGabriel Dos Reis <gdr@axiomatics.org>2016-02-06 12:53:32 -0800
committerGabriel Dos Reis <gdr@axiomatics.org>2016-02-06 12:53:32 -0800
commit7ad1bbdc6aa9780b9a7063299bf3b2d049106eed (patch)
tree410db04d8b72aa565b9986ec74022a1c110ba849 /src
parent840651da76b018edd0fac7eac5087e8adb1701c8 (diff)
downloadopen-axiom-7ad1bbdc6aa9780b9a7063299bf3b2d049106eed.tar.gz
optNot: handle conjunction and disjunction operands
Diffstat (limited to 'src')
-rw-r--r--src/interp/g-opt.boot4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot
index 76f629f6..84ad5a13 100644
--- a/src/interp/g-opt.boot
+++ b/src/interp/g-opt.boot
@@ -832,6 +832,10 @@ optNot(x is ['%not,a]) ==
a is '%true => '%false
a is '%false => '%true
a is ['%not,b] => b
+ a is ['%and,:args] =>
+ optOr ['%or,:[optNot ['%not,x] for x in args]]
+ a is ['%or,:args] =>
+ optAnd ['%and,:[optNot ['%not,x] for x in args]]
a is ['%when,:.] =>
optCond [a.op, :[[p,optNot ['%not,c]] for [p,c] in a.args]]
x