From 7ad1bbdc6aa9780b9a7063299bf3b2d049106eed Mon Sep 17 00:00:00 2001 From: Gabriel Dos Reis Date: Sat, 6 Feb 2016 12:53:32 -0800 Subject: optNot: handle conjunction and disjunction operands --- src/interp/g-opt.boot | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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 -- cgit v1.2.3